Title: [173145] trunk/Source/WebCore
- Revision
- 173145
- Author
- [email protected]
- Date
- 2014-08-31 01:06:29 -0700 (Sun, 31 Aug 2014)
Log Message
Adjust an antique comment in Image::drawPattern
https://bugs.webkit.org/show_bug.cgi?id=136411
Reviewed by Dan Bernstein.
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):
Reword the comment.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (173144 => 173145)
--- trunk/Source/WebCore/ChangeLog 2014-08-31 08:04:25 UTC (rev 173144)
+++ trunk/Source/WebCore/ChangeLog 2014-08-31 08:06:29 UTC (rev 173145)
@@ -1,5 +1,16 @@
2014-08-31 Tim Horton <[email protected]>
+ Adjust an antique comment in Image::drawPattern
+ https://bugs.webkit.org/show_bug.cgi?id=136411
+
+ Reviewed by Dan Bernstein.
+
+ * platform/graphics/cg/ImageCG.cpp:
+ (WebCore::Image::drawPattern):
+ Reword the comment.
+
+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>
Modified: trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp (173144 => 173145)
--- trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp 2014-08-31 08:04:25 UTC (rev 173144)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp 2014-08-31 08:06:29 UTC (rev 173145)
@@ -133,16 +133,13 @@
// Adjust the color space.
subImage = Image::imageWithColorSpace(subImage.get(), styleColorSpace);
- // Leopard has an optimized call for the tiling of image patterns, but we can only use it if the image has been decoded enough that
- // its buffer is the same size as the overall image. Because a partially decoded CGImageRef with a smaller width or height than the
- // overall image buffer needs to tile with "gaps", we can't use the optimized tiling call in that case.
- // FIXME: We cannot use CGContextDrawTiledImage with scaled tiles on Leopard, because it suffers from rounding errors. Snow Leopard is ok.
+ // If we need to paint gaps between tiles because we have a partially loaded image or non-zero spaceSize(),
+ // fall back to the less efficient CGPattern-based mechanism.
float scaledTileWidth = tileRect.width() * narrowPrecisionToFloat(patternTransform.a());
float w = CGImageGetWidth(tileImage);
if (w == size().width() && h == size().height() && !spaceSize().width() && !spaceSize().height())
CGContextDrawTiledImage(context, FloatRect(adjustedX, adjustedY, scaledTileWidth, scaledTileHeight), subImage.get());
else {
- // On Leopard and newer, this code now only runs for partially decoded images whose buffers do not yet match the overall size of the image.
static const CGPatternCallbacks patternCallbacks = { 0, drawPatternCallback, patternReleaseCallback };
CGAffineTransform matrix = CGAffineTransformMake(narrowPrecisionToCGFloat(patternTransform.a()), 0, 0, narrowPrecisionToCGFloat(patternTransform.d()), adjustedX, adjustedY);
matrix = CGAffineTransformConcat(matrix, CGContextGetCTM(context));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes