Title: [206631] trunk/Source/WebCore
Revision
206631
Author
[email protected]
Date
2016-09-29 23:41:08 -0700 (Thu, 29 Sep 2016)

Log Message

Re-order the arguments to drawPattern() functions
https://bugs.webkit.org/show_bug.cgi?id=162772

Reviewed by Zalan Bujtas.

Re-order the arguments to have the destination rect come near the front,
leaving CompositeOperator and BlendMode hanging out at the back like
other drawing functions.

No behavior change.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::drawPattern):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::drawPattern):
* platform/graphics/GradientImage.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
* platform/graphics/ImageBuffer.h:
* platform/graphics/NamedImageGeneratedImage.cpp:
(WebCore::NamedImageGeneratedImage::drawPattern):
* platform/graphics/NamedImageGeneratedImage.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawPattern):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::drawPattern):
* platform/graphics/cairo/ImageCairo.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawPattern):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::drawPattern):
* platform/graphics/cg/ImageCG.cpp: This file can probably be removed and the code moved, since the
code is almost the same as the cairo code, and not platform-specific.
(WebCore::Image::drawPattern):
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawPattern::DrawPattern):
(WebCore::DisplayList::DrawPattern::apply):
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawPattern::create):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawPattern):
* platform/graphics/displaylists/DisplayListRecorder.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::drawPattern):
* svg/graphics/SVGImageForContainer.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (206630 => 206631)


--- trunk/Source/WebCore/ChangeLog	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/ChangeLog	2016-09-30 06:41:08 UTC (rev 206631)
@@ -1,3 +1,61 @@
+2016-09-29  Simon Fraser  <[email protected]>
+
+        Re-order the arguments to drawPattern() functions
+        https://bugs.webkit.org/show_bug.cgi?id=162772
+
+        Reviewed by Zalan Bujtas.
+        
+        Re-order the arguments to have the destination rect come near the front,
+        leaving CompositeOperator and BlendMode hanging out at the back like
+        other drawing functions.
+
+        No behavior change.
+
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::drawPattern):
+        * platform/graphics/BitmapImage.h:
+        * platform/graphics/CrossfadeGeneratedImage.cpp:
+        (WebCore::CrossfadeGeneratedImage::drawPattern):
+        * platform/graphics/CrossfadeGeneratedImage.h:
+        * platform/graphics/GeneratedImage.h:
+        * platform/graphics/GradientImage.cpp:
+        (WebCore::GradientImage::drawPattern):
+        * platform/graphics/GradientImage.h:
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/Image.cpp:
+        (WebCore::Image::drawTiled):
+        * platform/graphics/Image.h:
+        * platform/graphics/ImageBuffer.h:
+        * platform/graphics/NamedImageGeneratedImage.cpp:
+        (WebCore::NamedImageGeneratedImage::drawPattern):
+        * platform/graphics/NamedImageGeneratedImage.h:
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::drawPattern):
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        (WebCore::ImageBuffer::drawPattern):
+        * platform/graphics/cairo/ImageCairo.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::drawPattern):
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::ImageBuffer::drawPattern):
+        * platform/graphics/cg/ImageCG.cpp: This file can probably be removed and the code moved, since the
+        code is almost the same as the cairo code, and not platform-specific.
+        (WebCore::Image::drawPattern):
+        * platform/graphics/displaylists/DisplayListItems.cpp:
+        (WebCore::DisplayList::DrawPattern::DrawPattern):
+        (WebCore::DisplayList::DrawPattern::apply):
+        * platform/graphics/displaylists/DisplayListItems.h:
+        (WebCore::DisplayList::DrawPattern::create):
+        * platform/graphics/displaylists/DisplayListRecorder.cpp:
+        (WebCore::DisplayList::Recorder::drawPattern):
+        * platform/graphics/displaylists/DisplayListRecorder.h:
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::drawPatternForContainer):
+        * svg/graphics/SVGImageForContainer.cpp:
+        (WebCore::SVGImageForContainer::drawPattern):
+        * svg/graphics/SVGImageForContainer.h:
+
 2016-09-29  Chris Dumez  <[email protected]>
 
         Add support for download attribute on area elements

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -171,13 +171,13 @@
         imageObserver()->didDraw(this);
 }
 
-void BitmapImage::drawPattern(GraphicsContext& ctxt, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+void BitmapImage::drawPattern(GraphicsContext& ctxt, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& transform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
 {
     if (tileRect.isEmpty())
         return;
 
     if (!ctxt.drawLuminanceMask()) {
-        Image::drawPattern(ctxt, tileRect, transform, phase, spacing, op, destRect, blendMode);
+        Image::drawPattern(ctxt, destRect, tileRect, transform, phase, spacing, op, blendMode);
         return;
     }
 
@@ -202,7 +202,7 @@
     }
 
     ctxt.setDrawLuminanceMask(false);
-    m_cachedImage->drawPattern(ctxt, tileRect, transform, phase, spacing, op, destRect, blendMode);
+    m_cachedImage->drawPattern(ctxt, destRect, tileRect, transform, phase, spacing, op, blendMode);
 }
 
 bool BitmapImage::shouldAnimate()

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -142,7 +142,7 @@
     void destroyDecodedDataIfNecessary(bool destroyAll = true);
 
     void draw(GraphicsContext&, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientationDescription) override;
-    void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal) override;
+    void drawPattern(GraphicsContext&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode = BlendModeNormal) override;
 #if PLATFORM(WIN)
     void drawFrameMatchingSourceSize(GraphicsContext&, const FloatRect& dstRect, const IntSize& srcSize, CompositeOperator) override;
 #endif

Modified: trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -99,7 +99,7 @@
     drawCrossfade(context);
 }
 
-void CrossfadeGeneratedImage::drawPattern(GraphicsContext& context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode)
+void CrossfadeGeneratedImage::drawPattern(GraphicsContext& context, const FloatRect& dstRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, BlendMode blendMode)
 {
     std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::create(size(), context.renderingMode());
     if (!imageBuffer)
@@ -110,7 +110,7 @@
     drawCrossfade(graphicsContext);
 
     // Tile the image buffer into the context.
-    imageBuffer->drawPattern(context, srcRect, patternTransform, phase, spacing, compositeOp, dstRect, blendMode);
+    imageBuffer->drawPattern(context, dstRect, srcRect, patternTransform, phase, spacing, compositeOp, blendMode);
 }
 
 void CrossfadeGeneratedImage::dump(TextStream& ts) const

Modified: trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -50,7 +50,7 @@
 
 protected:
     void draw(GraphicsContext&, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientationDescription) override;
-    void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& dstRect, BlendMode) override;
+    void drawPattern(GraphicsContext&, const FloatRect& dstRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode) override;
 
     CrossfadeGeneratedImage(Image& fromImage, Image& toImage, float percentage, const FloatSize& crossfadeSize, const FloatSize&);
 

Modified: trunk/Source/WebCore/platform/graphics/GeneratedImage.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/GeneratedImage.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/GeneratedImage.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -48,8 +48,8 @@
 
 protected:
     void draw(GraphicsContext&, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientationDescription) override = 0;
-    void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform,
-        const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode) override = 0;
+    void drawPattern(GraphicsContext&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
+        const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode) override = 0;
 
     // FIXME: Implement this to be less conservative.
     bool currentFrameKnownToBeOpaque() const override { return false; }

Modified: trunk/Source/WebCore/platform/graphics/GradientImage.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/GradientImage.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/GradientImage.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -56,8 +56,8 @@
     destContext.fillRect(FloatRect(FloatPoint(), size()), *m_gradient.get());
 }
 
-void GradientImage::drawPattern(GraphicsContext& destContext, const FloatRect& srcRect, const AffineTransform& patternTransform,
-    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, const FloatRect& destRect, BlendMode blendMode)
+void GradientImage::drawPattern(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
+    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, BlendMode blendMode)
 {
     // Allow the generator to provide visually-equivalent tiling parameters for better performance.
     FloatSize adjustedSize = size();
@@ -92,7 +92,7 @@
     destContext.setDrawLuminanceMask(false);
 
     // Tile the image buffer into the context.
-    m_cachedImageBuffer->drawPattern(destContext, adjustedSrcRect, adjustedPatternCTM, phase, spacing, compositeOp, destRect, blendMode);
+    m_cachedImageBuffer->drawPattern(destContext, destRect, adjustedSrcRect, adjustedPatternCTM, phase, spacing, compositeOp, blendMode);
 }
 
 void GradientImage::dump(TextStream& ts) const

Modified: trunk/Source/WebCore/platform/graphics/GradientImage.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/GradientImage.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/GradientImage.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -47,8 +47,8 @@
 
 protected:
     void draw(GraphicsContext&, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientationDescription) override;
-    void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform,
-        const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode) override;
+    void drawPattern(GraphicsContext&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
+        const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode) override;
 
     GradientImage(PassRefPtr<Gradient>, const FloatSize&);
 

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -359,7 +359,7 @@
     void drawImageBuffer(ImageBuffer&, const FloatRect& destination, const ImagePaintingOptions& = ImagePaintingOptions());
     void drawImageBuffer(ImageBuffer&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = ImagePaintingOptions());
 
-    void drawPattern(Image&, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
+    void drawPattern(Image&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode = BlendModeNormal);
 
     WEBCORE_EXPORT void drawConsumingImageBuffer(std::unique_ptr<ImageBuffer>, const FloatPoint& destination, const ImagePaintingOptions& = ImagePaintingOptions());
     void drawConsumingImageBuffer(std::unique_ptr<ImageBuffer>, const FloatRect& destination, const ImagePaintingOptions& = ImagePaintingOptions());

Modified: trunk/Source/WebCore/platform/graphics/Image.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/Image.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/Image.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -192,7 +192,7 @@
 
     AffineTransform patternTransform = AffineTransform().scaleNonUniform(scale.width(), scale.height());
     FloatRect tileRect(FloatPoint(), intrinsicTileSize);
-    drawPattern(ctxt, tileRect, patternTransform, oneTileRect.location(), spacing, op, destRect, blendMode);
+    drawPattern(ctxt, destRect, tileRect, patternTransform, oneTileRect.location(), spacing, op, blendMode);
 
 #if PLATFORM(IOS)
     startAnimation(DoNotCatchUp);
@@ -277,7 +277,7 @@
         vPhase -= (dstRect.height() - scaledTileHeight) / 2;
 
     FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase);
-    drawPattern(ctxt, srcRect, patternTransform, patternPhase, spacing, op, dstRect);
+    drawPattern(ctxt, dstRect, srcRect, patternTransform, patternPhase, spacing, op);
 
 #if PLATFORM(IOS)
     startAnimation(DoNotCatchUp);

Modified: trunk/Source/WebCore/platform/graphics/Image.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/Image.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/Image.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -166,8 +166,8 @@
     virtual Evas_Object* getEvasObject(Evas*) { return nullptr; }
 #endif
 
-    virtual void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform,
-        const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
+    virtual void drawPattern(GraphicsContext&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
+        const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode = BlendModeNormal);
 
 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
     FloatRect adjustSourceRectForDownSampling(const FloatRect& srcRect, const IntSize& scaledSize) const;

Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -152,7 +152,7 @@
 #endif
     
     void draw(GraphicsContext&, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal);
-    void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
+    void drawPattern(GraphicsContext&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode = BlendModeNormal);
 
     static void drawConsuming(std::unique_ptr<ImageBuffer>, GraphicsContext&, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal);
 

Modified: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -61,7 +61,7 @@
 #endif
 }
 
-void NamedImageGeneratedImage::drawPattern(GraphicsContext& context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode)
+void NamedImageGeneratedImage::drawPattern(GraphicsContext& context, const FloatRect& dstRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, BlendMode blendMode)
 {
 #if USE(NEW_THEME)
     auto imageBuffer = ImageBuffer::createCompatibleBuffer(size(), context);
@@ -72,7 +72,7 @@
     platformTheme()->drawNamedImage(m_name, graphicsContext, FloatRect(0, 0, size().width(), size().height()));
 
     // Tile the image buffer into the context.
-    imageBuffer->drawPattern(context, srcRect, patternTransform, phase, spacing, compositeOp, dstRect, blendMode);
+    imageBuffer->drawPattern(context, dstRect, srcRect, patternTransform, phase, spacing, compositeOp, blendMode);
 #else
     UNUSED_PARAM(context);
     UNUSED_PARAM(srcRect);

Modified: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -41,7 +41,7 @@
 
 protected:
     void draw(GraphicsContext&, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientationDescription) override;
-    void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& dstRect, BlendMode) override;
+    void drawPattern(GraphicsContext&, const FloatRect& dstRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode) override;
 
     NamedImageGeneratedImage(String name, const FloatSize&);
 

Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -1186,13 +1186,13 @@
     cairo_restore(cr);
 }
 
-void GraphicsContext::drawPattern(Image& image, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+void GraphicsContext::drawPattern(Image& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
 {
     if (paintingDisabled())
         return;
 
     if (isRecording()) {
-        m_displayListRecorder->drawPattern(image, tileRect, patternTransform, phase, spacing, op, destRect, blendMode);
+        m_displayListRecorder->drawPattern(image, destRect, tileRect, patternTransform, phase, spacing, op, blendMode);
         return;
     }
 

Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -275,11 +275,11 @@
     destinationContext.drawImage(*image, destRect, srcRect, ImagePaintingOptions(op, blendMode, ImageOrientationDescription()));
 }
 
-void ImageBuffer::drawPattern(GraphicsContext& context, const FloatRect& srcRect, const AffineTransform& patternTransform,
-    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode)
+void ImageBuffer::drawPattern(GraphicsContext& context, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
+    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode)
 {
     if (RefPtr<Image> image = copyImage(DontCopyBackingStore))
-        image->drawPattern(context, srcRect, patternTransform, phase, spacing, op, destRect);
+        image->drawPattern(context, destRect, srcRect, patternTransform, phase, spacing, op);
 }
 
 void ImageBuffer::platformTransformColorSpace(const Vector<int>& lookUpTable)

Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageCairo.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/cairo/ImageCairo.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageCairo.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -31,20 +31,16 @@
 #if USE(CAIRO)
 
 #include "AffineTransform.h"
-#include "CairoUtilities.h"
 #include "Color.h"
 #include "GraphicsContext.h"
 #include "ImageObserver.h"
-#include "PlatformContextCairo.h"
-#include <cairo.h>
-#include <math.h>
 
 namespace WebCore {
 
-void Image::drawPattern(GraphicsContext& context, const FloatRect& tileRect, const AffineTransform& patternTransform,
-    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+void Image::drawPattern(GraphicsContext& context, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform,
+    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
 {
-    context.drawPattern(*this, tileRect, patternTransform, phase, spacing, op, destRect, blendMode);
+    context.drawPattern(*this, destRect, tileRect, patternTransform, phase, spacing, op, blendMode);
 
     if (imageObserver())
         imageObserver()->didDraw(this);

Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -300,13 +300,13 @@
     });
 }
 
-void GraphicsContext::drawPattern(Image& image, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+void GraphicsContext::drawPattern(Image& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
 {
     if (paintingDisabled() || !patternTransform.isInvertible())
         return;
 
     if (isRecording()) {
-        m_displayListRecorder->drawPattern(image, tileRect, patternTransform, phase, spacing, op, destRect, blendMode);
+        m_displayListRecorder->drawPattern(image, destRect, tileRect, patternTransform, phase, spacing, op, blendMode);
         return;
     }
 

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -363,7 +363,7 @@
     destContext.drawNativeImage(image.get(), m_data.backingStoreSize, destRect, adjustedSrcRect, op, blendMode);
 }
 
-void ImageBuffer::drawPattern(GraphicsContext& destContext, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+void ImageBuffer::drawPattern(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
 {
     FloatRect adjustedSrcRect = srcRect;
     adjustedSrcRect.scale(m_resolutionScale, m_resolutionScale);
@@ -371,14 +371,14 @@
     if (!context().isAcceleratedContext()) {
         if (&destContext == &context() || destContext.isAcceleratedContext()) {
             if (RefPtr<Image> copy = copyImage(CopyBackingStore)) // Drawing into our own buffer, need to deep copy.
-                copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, spacing, op, destRect, blendMode);
+                copy->drawPattern(destContext, destRect, adjustedSrcRect, patternTransform, phase, spacing, op, blendMode);
         } else {
             if (RefPtr<Image> imageForRendering = copyImage(DontCopyBackingStore))
-                imageForRendering->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, spacing, op, destRect, blendMode);
+                imageForRendering->drawPattern(destContext, destRect, adjustedSrcRect, patternTransform, phase, spacing, op, blendMode);
         }
     } else {
         if (RefPtr<Image> copy = copyImage(CopyBackingStore))
-            copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, spacing, op, destRect, blendMode);
+            copy->drawPattern(destContext, destRect, adjustedSrcRect, patternTransform, phase, spacing, op, blendMode);
     }
 }
 

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -28,29 +28,19 @@
 
 #if USE(CG)
 
-#include "FloatConversion.h"
 #include "FloatRect.h"
 #include "GraphicsContextCG.h"
 #include "ImageObserver.h"
-#include <CoreGraphics/CoreGraphics.h>
 
-#if PLATFORM(COCOA)
-#include "WebCoreSystemInterface.h"
-#endif
-
-#if PLATFORM(WIN)
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
-
 namespace WebCore {
 
-void Image::drawPattern(GraphicsContext& ctxt, const FloatRect& tileRect, const AffineTransform& patternTransform,
-    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+void Image::drawPattern(GraphicsContext& ctxt, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform,
+    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
 {
     if (!nativeImageForCurrentFrame())
         return;
 
-    ctxt.drawPattern(*this, tileRect, patternTransform, phase, spacing, op, destRect, blendMode);
+    ctxt.drawPattern(*this, destRect, tileRect, patternTransform, phase, spacing, op, blendMode);
 
     if (imageObserver())
         imageObserver()->didDraw(this);

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -532,7 +532,7 @@
 }
 #endif
 
-DrawPattern::DrawPattern(Image& image, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+DrawPattern::DrawPattern(Image& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
     : DrawingItem(ItemType::DrawPattern)
     , m_image(image)
     , m_patternTransform(patternTransform)
@@ -547,7 +547,7 @@
 
 void DrawPattern::apply(GraphicsContext& context) const
 {
-    context.drawPattern(m_image.get(), m_tileRect, m_patternTransform, m_phase, m_spacing, m_op, m_destination, m_blendMode);
+    context.drawPattern(m_image.get(), m_destination, m_tileRect, m_patternTransform, m_phase, m_spacing, m_op, m_blendMode);
 }
 
 static TextStream& operator<<(TextStream& ts, const DrawPattern& item)

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -670,9 +670,9 @@
 
 class DrawPattern : public DrawingItem {
 public:
-    static Ref<DrawPattern> create(Image& image, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+    static Ref<DrawPattern> create(Image& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
     {
-        return adoptRef(*new DrawPattern(image, tileRect, patternTransform, phase, spacing, op, destRect, blendMode));
+        return adoptRef(*new DrawPattern(image, destRect, tileRect, patternTransform, phase, spacing, op, blendMode));
     }
 
     const Image& image() const { return m_image.get(); }
@@ -683,7 +683,7 @@
     FloatSize spacing() const { return m_spacing; }
 
 private:
-    DrawPattern(Image&, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
+    DrawPattern(Image&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode = BlendModeNormal);
 
     void apply(GraphicsContext&) const override;
 

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -132,9 +132,9 @@
     updateItemExtent(newItem);
 }
 
-void Recorder::drawPattern(Image& image, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode)
+void Recorder::drawPattern(Image& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
 {
-    DrawingItem& newItem = downcast<DrawingItem>(appendItem(DrawPattern::create(image, tileRect, patternTransform, phase, spacing, op, destRect, blendMode)));
+    DrawingItem& newItem = downcast<DrawingItem>(appendItem(DrawPattern::create(image, destRect, tileRect, patternTransform, phase, spacing, op, blendMode)));
     updateItemExtent(newItem);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (206630 => 206631)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -88,7 +88,7 @@
 #if USE(CG) || USE(CAIRO)
     void drawNativeImage(const NativeImagePtr&, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientation);
 #endif
-    void drawPattern(Image&, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
+    void drawPattern(Image&, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, BlendMode = BlendModeNormal);
 
     void drawRect(const FloatRect&, float borderThickness);
     void drawLine(const FloatPoint&, const FloatPoint&);

Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (206630 => 206631)


--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -237,7 +237,7 @@
     unscaledPatternTransform.scale(1 / imageBufferScale.width(), 1 / imageBufferScale.height());
 
     context.setDrawLuminanceMask(false);
-    image->drawPattern(context, scaledSrcRect, unscaledPatternTransform, phase, spacing, compositeOp, dstRect, blendMode);
+    image->drawPattern(context, dstRect, scaledSrcRect, unscaledPatternTransform, phase, spacing, compositeOp, blendMode);
 }
 
 void SVGImage::draw(GraphicsContext& context, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription)

Modified: trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp (206630 => 206631)


--- trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp	2016-09-30 06:41:08 UTC (rev 206631)
@@ -40,8 +40,8 @@
     m_image->drawForContainer(context, m_containerSize, m_zoom, dstRect, srcRect, compositeOp, blendMode);
 }
 
-void SVGImageForContainer::drawPattern(GraphicsContext& context, const FloatRect& srcRect, const AffineTransform& patternTransform,
-    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode)
+void SVGImageForContainer::drawPattern(GraphicsContext& context, const FloatRect& dstRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
+    const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, BlendMode blendMode)
 {
     m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, spacing, compositeOp, dstRect, blendMode);
 }

Modified: trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h (206630 => 206631)


--- trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h	2016-09-30 05:05:35 UTC (rev 206630)
+++ trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h	2016-09-30 06:41:08 UTC (rev 206631)
@@ -58,7 +58,7 @@
 
     void draw(GraphicsContext&, const FloatRect&, const FloatRect&, CompositeOperator, BlendMode, ImageOrientationDescription) final;
 
-    void drawPattern(GraphicsContext&, const FloatRect&, const AffineTransform&, const FloatPoint&, const FloatSize&, CompositeOperator, const FloatRect&, BlendMode) final;
+    void drawPattern(GraphicsContext&, const FloatRect&, const FloatRect&, const AffineTransform&, const FloatPoint&, const FloatSize&, CompositeOperator, BlendMode) final;
 
     // FIXME: Implement this to be less conservative.
     bool currentFrameKnownToBeOpaque() const final { return false; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to