Title: [166644] trunk/Source/WebCore
Revision
166644
Author
[email protected]
Date
2014-04-02 07:37:22 -0700 (Wed, 02 Apr 2014)

Log Message

Subpixel rendering: Make GraphicsContext::drawTiledImage* functions float based.
https://bugs.webkit.org/show_bug.cgi?id=131062

Reviewed by Simon Fraser.

This is in preparation to support subpixel positioned/sized background images. Generated images
need to be able to sized on device pixels.

No change in behavior.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
* platform/graphics/GraphicsContext.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (166643 => 166644)


--- trunk/Source/WebCore/ChangeLog	2014-04-02 14:27:43 UTC (rev 166643)
+++ trunk/Source/WebCore/ChangeLog	2014-04-02 14:37:22 UTC (rev 166644)
@@ -1,3 +1,20 @@
+2014-04-02  Zalan Bujtas  <[email protected]>
+
+        Subpixel rendering: Make GraphicsContext::drawTiledImage* functions float based.
+        https://bugs.webkit.org/show_bug.cgi?id=131062
+
+        Reviewed by Simon Fraser.
+
+        This is in preparation to support subpixel positioned/sized background images. Generated images
+        need to be able to sized on device pixels.
+
+        No change in behavior.
+
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore::GraphicsContext::drawImage):
+        (WebCore::GraphicsContext::drawTiledImage):
+        * platform/graphics/GraphicsContext.h:
+
 2014-04-02  Alex Christensen  <[email protected]>
 
         [WinCairo] Build fix after r166496.

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (166643 => 166644)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2014-04-02 14:27:43 UTC (rev 166643)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2014-04-02 14:37:22 UTC (rev 166644)
@@ -569,9 +569,9 @@
     drawImage(image, styleColorSpace, r, FloatRect(FloatPoint(), image->size()), op, description, useLowQualityScale);
 }
 
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatPoint& dest, const IntRect& srcRect, CompositeOperator op, ImageOrientationDescription description)
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatPoint& dest, const FloatRect& srcRect, CompositeOperator op, ImageOrientationDescription description)
 {
-    drawImage(image, styleColorSpace, FloatRect(dest, srcRect.size()), FloatRect(srcRect), op, description);
+    drawImage(image, styleColorSpace, FloatRect(dest, srcRect.size()), srcRect, op, description);
 }
 
 void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, ImageOrientationDescription description, bool useLowQualityScale)
@@ -597,7 +597,7 @@
         setImageInterpolationQuality(previousInterpolationQuality);
 }
 
-void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, bool useLowQualityScale, BlendMode blendMode)
+void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& tileSize, CompositeOperator op, bool useLowQualityScale, BlendMode blendMode)
 {
     if (paintingDisabled() || !image)
         return;
@@ -611,7 +611,7 @@
         image->drawTiled(this, destRect, srcPoint, tileSize, styleColorSpace, op, blendMode);
 }
 
-void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect,
+void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& srcRect,
     const FloatSize& tileScaleFactor, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op, bool useLowQualityScale)
 {
     if (paintingDisabled() || !image)

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (166643 => 166644)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2014-04-02 14:27:43 UTC (rev 166643)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2014-04-02 14:37:22 UTC (rev 166644)
@@ -304,13 +304,13 @@
 
         void drawImage(Image*, ColorSpace styleColorSpace, const FloatPoint&, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription());
         void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect&, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false);
-        void drawImage(Image*, ColorSpace styleColorSpace, const FloatPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription());
+        void drawImage(Image*, ColorSpace styleColorSpace, const FloatPoint& destPoint, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription());
         void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false);
         void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false);
         
-        void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize,
+        void drawTiledImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& tileSize,
             CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false, BlendMode = BlendModeNormal);
-        void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect,
+        void drawTiledImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
                             const FloatSize& tileScaleFactor, Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile,
                             CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to