Title: [130706] trunk/Source/WebCore
- Revision
- 130706
- Author
- commit-qu...@webkit.org
- Date
- 2012-10-08 17:55:34 -0700 (Mon, 08 Oct 2012)
Log Message
[CAIRO] Adjust the source rect size when IMAGE_DECODER_DOWN_SAMPLING is enabled
https://bugs.webkit.org/show_bug.cgi?id=98630
Patch by Jaehun Lim <ljaehun....@samsung.com> on 2012-10-08
Reviewed by Martin Robinson.
IMAGE_DECODER_DOWN_SAMPLING scales down the size of the big image.
CAIRO needs to adjust the source size to the scaled value.
No new tests.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (130705 => 130706)
--- trunk/Source/WebCore/ChangeLog 2012-10-09 00:08:57 UTC (rev 130705)
+++ trunk/Source/WebCore/ChangeLog 2012-10-09 00:55:34 UTC (rev 130706)
@@ -1,3 +1,18 @@
+2012-10-08 Jaehun Lim <ljaehun....@samsung.com>
+
+ [CAIRO] Adjust the source rect size when IMAGE_DECODER_DOWN_SAMPLING is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=98630
+
+ Reviewed by Martin Robinson.
+
+ IMAGE_DECODER_DOWN_SAMPLING scales down the size of the big image.
+ CAIRO needs to adjust the source size to the scaled value.
+
+ No new tests.
+
+ * platform/graphics/cairo/BitmapImageCairo.cpp:
+ (WebCore::BitmapImage::draw):
+
2012-10-08 Adam Barth <aba...@webkit.org>
Remove unused features of BlobBuilder
Modified: trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp (130705 => 130706)
--- trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp 2012-10-09 00:08:57 UTC (rev 130705)
+++ trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp 2012-10-09 00:55:34 UTC (rev 130706)
@@ -97,8 +97,17 @@
context->setCompositeOperation(CompositeCopy);
else
context->setCompositeOperation(op);
- context->platformContext()->drawSurfaceToContext(nativeImage->surface(), dstRect, srcRect, context);
+#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
+ cairo_surface_t* surface = nativeImage->surface();
+ IntSize scaledSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface));
+ FloatRect adjustedSrcRect = adjustSourceRectForDownSampling(srcRect, scaledSize);
+#else
+ FloatRect adjustedSrcRect(srcRect);
+#endif
+
+ context->platformContext()->drawSurfaceToContext(nativeImage->surface(), dstRect, adjustedSrcRect, context);
+
context->restore();
if (imageObserver())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes