Title: [90020] trunk/Source/WebCore
- Revision
- 90020
- Author
- [email protected]
- Date
- 2011-06-29 08:56:52 -0700 (Wed, 29 Jun 2011)
Log Message
2011-06-29 Igor Oliveira <[email protected]>
Reviewed by Andreas Kling.
[Qt] GraphicsContext::clipToImageBuffer does not support scale transformation
https://bugs.webkit.org/show_bug.cgi?id=63555
Scale alphaMask if GraphicsContext is scaled
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::pushTransparencyLayerInternal):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::clip):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (90019 => 90020)
--- trunk/Source/WebCore/ChangeLog 2011-06-29 15:20:22 UTC (rev 90019)
+++ trunk/Source/WebCore/ChangeLog 2011-06-29 15:56:52 UTC (rev 90020)
@@ -1,3 +1,17 @@
+2011-06-29 Igor Oliveira <[email protected]>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] GraphicsContext::clipToImageBuffer does not support scale transformation
+ https://bugs.webkit.org/show_bug.cgi?id=63555
+
+ Scale alphaMask if GraphicsContext is scaled
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::pushTransparencyLayerInternal):
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::ImageBuffer::clip):
+
2011-06-29 Andrey Kosyakov <[email protected]>
Reviewed by Pavel Feldman.
Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp (90019 => 90020)
--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2011-06-29 15:20:22 UTC (rev 90019)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2011-06-29 15:56:52 UTC (rev 90020)
@@ -950,7 +950,12 @@
void GraphicsContext::pushTransparencyLayerInternal(const QRect &rect, qreal opacity, QPixmap& alphaMask)
{
QPainter* p = m_data->p();
- m_data->layers.push(new TransparencyLayer(p, p->transform().mapRect(rect), 1.0, alphaMask));
+
+ QRect deviceClip = p->transform().mapRect(rect);
+ if (alphaMask.width() != deviceClip.width() || alphaMask.height() != deviceClip.height())
+ alphaMask = alphaMask.scaled(deviceClip.width(), deviceClip.height());
+
+ m_data->layers.push(new TransparencyLayer(p, deviceClip, 1.0, alphaMask));
}
void GraphicsContext::beginTransparencyLayer(float opacity)
Modified: trunk/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp (90019 => 90020)
--- trunk/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp 2011-06-29 15:20:22 UTC (rev 90019)
+++ trunk/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp 2011-06-29 15:56:52 UTC (rev 90020)
@@ -161,8 +161,6 @@
IntRect rect = enclosingIntRect(floatRect);
QPixmap alphaMask = *nativeImage;
- if (alphaMask.width() != rect.width() || alphaMask.height() != rect.height())
- alphaMask = alphaMask.scaled(rect.width(), rect.height());
context->pushTransparencyLayerInternal(rect, 1.0, alphaMask);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes