Title: [173143] trunk/Source/WebCore
- Revision
- 173143
- Author
- [email protected]
- Date
- 2014-08-31 00:41:50 -0700 (Sun, 31 Aug 2014)
Log Message
SVGImage::drawPatternForContainer creates a buffer without respecting the destination's acceleration setting
https://bugs.webkit.org/show_bug.cgi?id=136408
<rdar://problem/12013317>
Reviewed by Dan Bernstein.
No new tests required, just a performance improvement.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
Use ImageBuffer::createCompatibleBuffer, which passes the destination's
acceleration setting through to the ImageBuffer constructor.
I didn't use GraphicsContext::createCompatibleBuffer because adjusting
how this function applies the destination's CTM is outside the scope of this patch.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (173142 => 173143)
--- trunk/Source/WebCore/ChangeLog 2014-08-30 23:19:32 UTC (rev 173142)
+++ trunk/Source/WebCore/ChangeLog 2014-08-31 07:41:50 UTC (rev 173143)
@@ -1,3 +1,21 @@
+2014-08-31 Tim Horton <[email protected]>
+
+ SVGImage::drawPatternForContainer creates a buffer without respecting the destination's acceleration setting
+ https://bugs.webkit.org/show_bug.cgi?id=136408
+ <rdar://problem/12013317>
+
+ Reviewed by Dan Bernstein.
+
+ No new tests required, just a performance improvement.
+
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::drawPatternForContainer):
+ Use ImageBuffer::createCompatibleBuffer, which passes the destination's
+ acceleration setting through to the ImageBuffer constructor.
+
+ I didn't use GraphicsContext::createCompatibleBuffer because adjusting
+ how this function applies the destination's CTM is outside the scope of this patch.
+
2014-08-30 Joseph Pecoraro <[email protected]>
Convert string literals to character literals in makeString usage
Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (173142 => 173143)
--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp 2014-08-30 23:19:32 UTC (rev 173142)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp 2014-08-31 07:41:50 UTC (rev 173143)
@@ -194,7 +194,7 @@
FloatRect imageBufferSize = zoomedContainerRect;
imageBufferSize.scale(imageBufferScale.width(), imageBufferScale.height());
- std::unique_ptr<ImageBuffer> buffer = ImageBuffer::create(expandedIntSize(imageBufferSize.size()), 1);
+ std::unique_ptr<ImageBuffer> buffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(imageBufferSize.size()), 1, ColorSpaceDeviceRGB, context, true);
if (!buffer) // Failed to allocate buffer.
return;
drawForContainer(buffer->context(), containerSize, zoom, imageBufferSize, zoomedContainerRect, ColorSpaceDeviceRGB, CompositeSourceOver, BlendModeNormal);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes