Title: [102893] trunk/Source/WebCore
- Revision
- 102893
- Author
- [email protected]
- Date
- 2011-12-14 22:48:32 -0800 (Wed, 14 Dec 2011)
Log Message
Generated images should respect the accelerated state of the context they're going to be drawn into
https://bugs.webkit.org/show_bug.cgi?id=74577
<rdar://problem/10584392>
Reviewed by Simon Fraser.
The tiled code path for GeneratorGeneratedImage and CrossfadeGeneratedImage blindly creates
an unaccelerated ImageBuffer. Instead, take into account the accelerated state of the destination context.
No new tests, as this is a simple performance improvement.
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102892 => 102893)
--- trunk/Source/WebCore/ChangeLog 2011-12-15 06:36:25 UTC (rev 102892)
+++ trunk/Source/WebCore/ChangeLog 2011-12-15 06:48:32 UTC (rev 102893)
@@ -1,3 +1,21 @@
+2011-12-14 Tim Horton <[email protected]>
+
+ Generated images should respect the accelerated state of the context they're going to be drawn into
+ https://bugs.webkit.org/show_bug.cgi?id=74577
+ <rdar://problem/10584392>
+
+ Reviewed by Simon Fraser.
+
+ The tiled code path for GeneratorGeneratedImage and CrossfadeGeneratedImage blindly creates
+ an unaccelerated ImageBuffer. Instead, take into account the accelerated state of the destination context.
+
+ No new tests, as this is a simple performance improvement.
+
+ * platform/graphics/CrossfadeGeneratedImage.cpp:
+ (WebCore::CrossfadeGeneratedImage::drawPattern):
+ * platform/graphics/GeneratorGeneratedImage.cpp:
+ (WebCore::GeneratorGeneratedImage::drawPattern):
+
2011-12-14 Ilya Tikhonovsky <[email protected]>
Web Inspector: cleanup unused variable introduced at r102803
Modified: trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp (102892 => 102893)
--- trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp 2011-12-15 06:36:25 UTC (rev 102892)
+++ trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp 2011-12-15 06:48:32 UTC (rev 102893)
@@ -95,7 +95,7 @@
void CrossfadeGeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& dstRect)
{
- OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(m_size);
+ OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(m_size, ColorSpaceDeviceRGB, context->isAcceleratedContext() ? Accelerated : Unaccelerated);
if (!imageBuffer)
return;
Modified: trunk/Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp (102892 => 102893)
--- trunk/Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp 2011-12-15 06:36:25 UTC (rev 102892)
+++ trunk/Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp 2011-12-15 06:48:32 UTC (rev 102893)
@@ -54,7 +54,7 @@
m_generator->adjustParametersForTiledDrawing(adjustedSize, adjustedSrcRect);
// Create a BitmapImage and call drawPattern on it.
- OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(adjustedSize);
+ OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(adjustedSize, ColorSpaceDeviceRGB, context->isAcceleratedContext() ? Accelerated : Unaccelerated);
if (!imageBuffer)
return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes