Unreviewed, rolling out r169529.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jun 2014 15:03:30 +0000 (15:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jun 2014 15:03:30 +0000 (15:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133447

caused assert in drawImage() (Requested by zalan on #webkit).

Reverted changeset:

"Provide better encapsulation for image related painting
properties."
https://bugs.webkit.org/show_bug.cgi?id=133434
http://trac.webkit.org/changeset/169529

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/filters/FEComposite.cpp
Source/WebCore/rendering/FilterEffectRenderer.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp

index 80c432b..14a4c64 100644 (file)
@@ -1,3 +1,17 @@
+2014-06-02  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r169529.
+        https://bugs.webkit.org/show_bug.cgi?id=133447
+
+        caused assert in drawImage() (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "Provide better encapsulation for image related painting
+        properties."
+        https://bugs.webkit.org/show_bug.cgi?id=133434
+        http://trac.webkit.org/changeset/169529
+
 2014-06-02  Zalan Bujtas  <zalan@apple.com>
 
         Provide better encapsulation for image related painting properties.
index 9792f79..c7220c5 100644 (file)
@@ -526,7 +526,7 @@ __ZN7WebCore15GraphicsContext8fillPathERKNS_4PathE
 __ZN7WebCore15GraphicsContext8fillRectERKNS_9FloatRectE
 __ZN7WebCore15GraphicsContext8fillRectERKNS_9FloatRectERKNS_5ColorENS_10ColorSpaceE
 __ZN7WebCore15GraphicsContext9clearRectERKNS_9FloatRectE
-__ZN7WebCore15GraphicsContext9drawImageEPNS_5ImageENS_10ColorSpaceERKNS_10FloatPointERKNS_20ImagePaintingContextE
+__ZN7WebCore15GraphicsContext9drawImageEPNS_5ImageENS_10ColorSpaceERKNS_10FloatPointENS_17CompositeOperatorENS_27ImageOrientationDescriptionE
 __ZN7WebCore15GraphicsContext9setShadowERKNS_9FloatSizeEfRKNS_5ColorENS_10ColorSpaceE
 __ZN7WebCore15GraphicsContext9translateEff
 __ZN7WebCore15GraphicsContextD1Ev
index fdd530f..7512123 100644 (file)
@@ -403,9 +403,9 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const LayoutRect& r, boo
 #if ENABLE(CSS_IMAGE_ORIENTATION)
                 orientationDescription.setImageOrientationEnum(renderer()->style().imageOrientation());
 #endif 
-                context->drawImage(m_presentedImage.get(), ColorSpaceDeviceRGB, pixelSnappedIntRect(r), ImagePaintingContext(orientationDescription, useLowQualityScale));
+                context->drawImage(m_presentedImage.get(), ColorSpaceDeviceRGB, pixelSnappedIntRect(r), CompositeSourceOver, orientationDescription, useLowQualityScale);
             } else
-                context->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, pixelSnappedIntRect(r), useLowQualityScale);
+                context->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, pixelSnappedIntRect(r), CompositeSourceOver, BlendModeNormal, useLowQualityScale);
         }
     }
 
index 266e90c..5dde5cb 100755 (executable)
@@ -1378,17 +1378,17 @@ void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRec
     checkOrigin(image);
 
     if (rectContainsCanvas(normalizedDstRect)) {
-        c->drawImage(cachedImage->imageForRenderer(image->renderer()), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, ImagePaintingContext(op, blendMode));
+        c->drawImage(cachedImage->imageForRenderer(image->renderer()), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, op, blendMode);
         didDrawEntireCanvas();
     } else if (isFullCanvasCompositeMode(op)) {
         fullCanvasCompositedDrawImage(cachedImage->imageForRenderer(image->renderer()), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, op);
         didDrawEntireCanvas();
     } else if (op == CompositeCopy) {
         clearCanvas();
-        c->drawImage(cachedImage->imageForRenderer(image->renderer()), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, ImagePaintingContext(op, blendMode));
+        c->drawImage(cachedImage->imageForRenderer(image->renderer()), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, op, blendMode);
         didDrawEntireCanvas();
     } else {
-        c->drawImage(cachedImage->imageForRenderer(image->renderer()), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, ImagePaintingContext(op, blendMode));
+        c->drawImage(cachedImage->imageForRenderer(image->renderer()), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, op, blendMode);
         didDraw(normalizedDstRect);
     }
 }
@@ -1461,17 +1461,17 @@ void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const
 #endif
 
     if (rectContainsCanvas(dstRect)) {
-        c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingContext(state().m_globalComposite, state().m_globalBlend));
+        c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite, state().m_globalBlend);
         didDrawEntireCanvas();
     } else if (isFullCanvasCompositeMode(state().m_globalComposite)) {
         fullCanvasCompositedDrawImage(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite);
         didDrawEntireCanvas();
     } else if (state().m_globalComposite == CompositeCopy) {
         clearCanvas();
-        c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingContext(state().m_globalComposite, state().m_globalBlend));
+        c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite, state().m_globalBlend);
         didDrawEntireCanvas();
     } else {
-        c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingContext(state().m_globalComposite, state().m_globalBlend));
+        c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite, state().m_globalBlend);
         didDraw(dstRect);
     }
 }
@@ -1652,6 +1652,7 @@ void CanvasRenderingContext2D::compositeBuffer(ImageBuffer* buffer, const IntRec
     c->clipOut(bufferRect);
     c->clearRect(canvasRect);
     c->restore();
+
     c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, bufferRect.location(), state().m_globalComposite);
     c->restore();
 }
index cda2d15..1b0c657 100644 (file)
@@ -570,75 +570,87 @@ float GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const
 #endif
 }
 
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatPoint& destination, const ImagePaintingContext& imagePaintingContext)
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatPoint& p, CompositeOperator op, ImageOrientationDescription description)
 {
     if (!image)
         return;
-    drawImage(image, styleColorSpace, FloatRect(destination, image->size()), FloatRect(FloatPoint(), image->size()), imagePaintingContext);
+    drawImage(image, styleColorSpace, FloatRect(p, image->size()), FloatRect(FloatPoint(), image->size()), op, BlendModeNormal, description);
 }
 
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& destination, const ImagePaintingContext& imagePaintingContext)
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& r, CompositeOperator op, ImageOrientationDescription description, bool useLowQualityScale)
 {
     if (!image)
         return;
-    drawImage(image, styleColorSpace, destination, FloatRect(FloatPoint(), image->size()), imagePaintingContext);
+    drawImage(image, styleColorSpace, r, FloatRect(FloatPoint(), image->size()), op, BlendModeNormal, description, useLowQualityScale);
 }
 
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingContext& imagePaintingContext)
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatPoint& dest, const FloatRect& srcRect, CompositeOperator op, ImageOrientationDescription description)
 {
+    drawImage(image, styleColorSpace, FloatRect(dest, srcRect.size()), srcRect, op, BlendModeNormal, description);
+}
+
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, BlendMode blendMode, ImageOrientationDescription description, bool useLowQualityScale)
+{
+    if (paintingDisabled() || !image)
+        return;
+    
     // FIXME (49002): Should be InterpolationLow
-    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingContext.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
-    image->draw(this, destination, source, styleColorSpace, imagePaintingContext.m_compositeOperator, imagePaintingContext.m_blendMode, imagePaintingContext.m_orientationDescription);
+    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
+    image->draw(this, dest, src, styleColorSpace, op, blendMode, description);
 }
 
-void GraphicsContext::drawTiledImage(Image* image, ColorSpace colorSpace, const FloatRect& destination, const FloatPoint& source, const FloatSize& tileSize,
-    const ImagePaintingContext& imagePaintingContext)
+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;
 
-    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingContext.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
-    image->drawTiled(this, destination, source, tileSize, colorSpace, imagePaintingContext.m_compositeOperator, imagePaintingContext.m_blendMode);
+    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
+    image->drawTiled(this, destRect, srcPoint, tileSize, styleColorSpace, op, blendMode);
 }
 
-void GraphicsContext::drawTiledImage(Image* image, ColorSpace colorSpace, const FloatRect& destination, const FloatRect& source, const FloatSize& tileScaleFactor,
-    Image::TileRule hRule, Image::TileRule vRule, const ImagePaintingContext& imagePaintingContext)
+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)
         return;
 
     if (hRule == Image::StretchTile && vRule == Image::StretchTile) {
         // Just do a scale.
-        drawImage(image, colorSpace, destination, source, imagePaintingContext);
+        drawImage(image, styleColorSpace, dest, srcRect, op);
         return;
     }
 
-    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingContext.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
-    image->drawTiled(this, destination, source, tileScaleFactor, hRule, vRule, colorSpace, imagePaintingContext.m_compositeOperator);
+    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
+    image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, styleColorSpace, op);
 }
 
-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace colorSpace, const FloatPoint& destination, const ImagePaintingContext& imagePaintingContext)
+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const FloatPoint& p, CompositeOperator op, BlendMode blendMode)
 {
     if (!image)
         return;
-    drawImageBuffer(image, colorSpace, FloatRect(destination, image->logicalSize()), FloatRect(FloatPoint(), image->logicalSize()), imagePaintingContext);
+    drawImageBuffer(image, styleColorSpace, FloatRect(p, image->logicalSize()), FloatRect(FloatPoint(), image->logicalSize()), op, blendMode);
 }
 
-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace colorSpace, const FloatRect& destination, const ImagePaintingContext& imagePaintingContext)
+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const FloatRect& dest, CompositeOperator op, BlendMode blendMode, bool useLowQualityScale)
 {
     if (!image)
         return;
-    drawImageBuffer(image, colorSpace, destination, FloatRect(FloatPoint(), FloatSize(image->logicalSize())), imagePaintingContext);
+    drawImageBuffer(image, styleColorSpace, dest, FloatRect(FloatPoint(), FloatSize(image->logicalSize())), op, blendMode, useLowQualityScale);
+}
+
+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const FloatPoint& dest, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode)
+{
+    drawImageBuffer(image, styleColorSpace, FloatRect(dest, srcRect.size()), srcRect, op, blendMode);
 }
 
-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace colorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingContext& imagePaintingContext)
+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, BlendMode blendMode, bool useLowQualityScale)
 {
     if (paintingDisabled() || !image)
         return;
 
     // FIXME (49002): Should be InterpolationLow
-    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingContext.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
-    image->draw(this, colorSpace, destination, source, imagePaintingContext.m_compositeOperator, imagePaintingContext.m_blendMode, imagePaintingContext.m_useLowQualityScale);
+    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
+    image->draw(this, styleColorSpace, dest, src, op, blendMode, useLowQualityScale);
 }
 
 void GraphicsContext::clip(const IntRect& rect)
index 8b3c615..99a6b76 100644 (file)
@@ -193,37 +193,6 @@ namespace WebCore {
     void setStrokeAndFillColor(PlatformGraphicsContext*, CGColorRef);
 #endif
 
-    struct ImagePaintingContext {
-        ImagePaintingContext(CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal, ImageOrientationDescription orientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false)
-            : m_compositeOperator(compositeOperator)
-            , m_blendMode(blendMode)
-            , m_orientationDescription(orientationDescription)
-            , m_useLowQualityScale(useLowQualityScale)
-        {
-        }
-
-        ImagePaintingContext(ImageOrientationDescription orientationDescription, bool useLowQualityScale = false, CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal)
-            : m_compositeOperator(compositeOperator)
-            , m_blendMode(blendMode)
-            , m_orientationDescription(orientationDescription)
-            , m_useLowQualityScale(useLowQualityScale)
-        {
-        }
-
-        ImagePaintingContext(bool useLowQualityScale, ImageOrientationDescription orientationDescription = ImageOrientationDescription(), CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal)
-            : m_compositeOperator(compositeOperator)
-            , m_blendMode(blendMode)
-            , m_orientationDescription(orientationDescription)
-            , m_useLowQualityScale(useLowQualityScale)
-        {
-        }
-
-        CompositeOperator m_compositeOperator;
-        BlendMode m_blendMode;
-        ImageOrientationDescription m_orientationDescription;
-        bool m_useLowQualityScale;
-    };
-
     class GraphicsContext {
         WTF_MAKE_NONCOPYABLE(GraphicsContext); WTF_MAKE_FAST_ALLOCATED;
     public:
@@ -333,18 +302,21 @@ namespace WebCore {
 
         void strokeRect(const FloatRect&, float lineWidth);
 
-        void drawImage(Image*, ColorSpace, const FloatPoint& destination, const ImagePaintingContext& = ImagePaintingContext());
-        void drawImage(Image*, ColorSpace, const FloatRect& destination, const ImagePaintingContext& = ImagePaintingContext());
-        void drawImage(Image*, ColorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingContext& = ImagePaintingContext());
-
-        void drawTiledImage(Image*, ColorSpace, const FloatRect& destination, const FloatPoint& source, const FloatSize& tileSize,
-            const ImagePaintingContext& = ImagePaintingContext());
-        void drawTiledImage(Image*, ColorSpace, const FloatRect& destination, const FloatRect& source, const FloatSize& tileScaleFactor,
-            Image::TileRule, Image::TileRule, const ImagePaintingContext& = ImagePaintingContext());
-
-        void drawImageBuffer(ImageBuffer*, ColorSpace, const FloatPoint& destination, const ImagePaintingContext& = ImagePaintingContext());
-        void drawImageBuffer(ImageBuffer*, ColorSpace, const FloatRect& destination, const ImagePaintingContext& = ImagePaintingContext());
-        void drawImageBuffer(ImageBuffer*, ColorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingContext& = ImagePaintingContext());
+        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 FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription());
+        void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, ImageOrientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false);
+        
+        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 FloatRect& destRect, const FloatRect& srcRect,
+                            const FloatSize& tileScaleFactor, Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile,
+                            CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
+
+        void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatPoint&, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal);
+        void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRect&, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false);
+        void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatPoint& destPoint, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal);
+        void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false);
 
         void setImageInterpolationQuality(InterpolationQuality);
         InterpolationQuality imageInterpolationQuality() const;
index 917ce09..2e91785 100644 (file)
@@ -916,7 +916,7 @@ void ShadowBlur::endShadowLayer(GraphicsContext* context)
     GraphicsContextStateSaver stateSave(*context);
 
     context->clearShadow();
-    context->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, FloatRect(roundedIntPoint(m_layerOrigin), m_layerSize), FloatRect(FloatPoint(), m_layerSize), context->compositeOperation());
+    context->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, roundedIntPoint(m_layerOrigin), IntRect(0, 0, m_layerSize.width(), m_layerSize.height()), context->compositeOperation());
 
     m_layerImage = 0;
     ScratchBuffer::shared().scheduleScratchBufferPurge();
index ed2fcdd..4f094a6 100644 (file)
@@ -149,7 +149,7 @@ void ImageBuffer::draw(GraphicsContext* destinationContext, ColorSpace styleColo
 {
     BackingStoreCopy copyMode = destinationContext == context() ? CopyBackingStore : DontCopyBackingStore;
     RefPtr<Image> image = copyImage(copyMode);
-    destinationContext->drawImage(image.get(), styleColorSpace, destRect, srcRect, ImagePaintingContext(op, blendMode, ImageOrientationDescription(), useLowQualityScale));
+    destinationContext->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, blendMode, ImageOrientationDescription(), useLowQualityScale);
 }
 
 void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
index f56ca46..44ed0f1 100644 (file)
@@ -297,8 +297,8 @@ void FEComposite::platformApplySoftware()
                                     destinationRect.y() - in->absolutePaintRect().y()), destinationRect.size());
         IntRect source2Rect(IntPoint(destinationRect.x() - in2->absolutePaintRect().x(),
                                      destinationRect.y() - in2->absolutePaintRect().y()), destinationRect.size());
-        filterContext->drawImageBuffer(imageBuffer2, ColorSpaceDeviceRGB, IntRect(destinationPoint, source2Rect.size()), source2Rect);
-        filterContext->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, IntRect(destinationPoint, sourceRect.size()), sourceRect, CompositeSourceIn);
+        filterContext->drawImageBuffer(imageBuffer2, ColorSpaceDeviceRGB, destinationPoint, source2Rect);
+        filterContext->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, destinationPoint, sourceRect, CompositeSourceIn);
         break;
     }
     case FECOMPOSITE_OPERATOR_OUT:
index dd14e9b..37aa580 100644 (file)
@@ -438,7 +438,7 @@ void FilterEffectRendererHelper::applyFilterEffect(GraphicsContext* destinationC
     destRect.move(m_paintOffset.x(), m_paintOffset.y());
 
     destinationContext->drawImageBuffer(filter->output(), m_renderLayer->renderer().style().colorSpace(),
-        pixelSnappedForPainting(destRect, m_renderLayer->renderer().document().deviceScaleFactor()));
+        pixelSnappedForPainting(destRect, m_renderLayer->renderer().document().deviceScaleFactor()), CompositeSourceOver);
 
     filter->clearIntermediateResults();
 }
index 77c627a..fa696bb 100644 (file)
@@ -841,7 +841,7 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
             bool useLowQualityScaling = shouldPaintAtLowQuality(context, image.get(), bgLayer, geometry.tileSize());
             if (image.get())
                 image->setSpaceSize(geometry.spaceSize());
-            context->drawTiledImage(image.get(), style().colorSpace(), geometry.destRect(), geometry.relativePhase(), geometry.tileSize(), ImagePaintingContext(compositeOp, bgLayer->blendMode(), ImageOrientationDescription(), useLowQualityScaling));
+            context->drawTiledImage(image.get(), style().colorSpace(), geometry.destRect(), geometry.relativePhase(), geometry.tileSize(), compositeOp, useLowQualityScaling, bgLayer->blendMode());
         }
     }
 
index 2d74d0f..0932a5a 100644 (file)
@@ -219,7 +219,7 @@ void RenderEmbeddedObject::paintSnapshotImage(PaintInfo& paintInfo, const Layout
 #if ENABLE(CSS_IMAGE_ORIENTATION)
     orientationDescription.setImageOrientationEnum(style().imageOrientation());
 #endif
-    context->drawImage(image, style().colorSpace(), alignedRect, ImagePaintingContext(orientationDescription, useLowQualityScaling));
+    context->drawImage(image, style().colorSpace(), alignedRect, CompositeSourceOver, orientationDescription, useLowQualityScaling);
 }
 
 void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
index e4ca9dd..e34f2cc 100644 (file)
@@ -439,7 +439,7 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf
 #if ENABLE(CSS_IMAGE_ORIENTATION)
                 orientationDescription.setImageOrientationEnum(style().imageOrientation());
 #endif
-                context->drawImage(image.get(), style().colorSpace(), pixelSnappedForPainting(LayoutRect(paintOffset + imageOffset, imageSize), deviceScaleFactor), orientationDescription);
+                context->drawImage(image.get(), style().colorSpace(), pixelSnappedForPainting(LayoutRect(paintOffset + imageOffset, imageSize), deviceScaleFactor), CompositeSourceOver, orientationDescription);
                 errorPictureDrawn = true;
             }
 
@@ -568,8 +568,7 @@ void RenderImage::paintIntoRect(GraphicsContext* context, const FloatRect& rect)
 #if ENABLE(CSS_IMAGE_ORIENTATION)
     orientationDescription.setImageOrientationEnum(style().imageOrientation());
 #endif
-    context->drawImage(imageResource().image(rect.width(), rect.height()).get(), style().colorSpace(), rect,
-        ImagePaintingContext(compositeOperator, BlendModeNormal, orientationDescription, useLowQualityScaling));
+    context->drawImage(imageResource().image(rect.width(), rect.height()).get(), style().colorSpace(), rect, compositeOperator, orientationDescription, useLowQualityScaling);
 }
 
 bool RenderImage::boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance bleedAvoidance, InlineFlowBox*) const
index c091473..7259fc5 100644 (file)
@@ -141,7 +141,7 @@ void RenderSnapshottedPlugIn::paintSnapshot(PaintInfo& paintInfo, const LayoutPo
 #if ENABLE(CSS_IMAGE_ORIENTATION)
     orientationDescription.setImageOrientationEnum(style().imageOrientation());
 #endif
-    context->drawImage(image, style().colorSpace(), alignedRect, ImagePaintingContext(orientationDescription, useLowQualityScaling));
+    context->drawImage(image, style().colorSpace(), alignedRect, CompositeSourceOver, orientationDescription, useLowQualityScaling);
 }
 
 CursorDirective RenderSnapshottedPlugIn::getCursor(const LayoutPoint& point, Cursor& overrideCursor) const