WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-104176-20121205231343.patch (text/plain), 49.43 KB, created by
Rik Cabanier
on 2012-12-05 23:16:19 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rik Cabanier
Created:
2012-12-05 23:16:19 PST
Size:
49.43 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 136808) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,89 @@ >+2012-12-05 Rik Cabanier <cabanier@adobe.com> >+ >+ Extend platform layer so it can pass blend modes to the compositing calls >+ https://bugs.webkit.org/show_bug.cgi?id=104176 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Interface changes for the new blend modes >+ >+ No new tests, no new functionality. >+ >+ * html/HTMLCanvasElement.cpp: >+ (WebCore::HTMLCanvasElement::paint): >+ * platform/graphics/BitmapImage.h: >+ * platform/graphics/CrossfadeGeneratedImage.cpp: >+ (WebCore::CrossfadeGeneratedImage::draw): >+ * platform/graphics/CrossfadeGeneratedImage.h: >+ (CrossfadeGeneratedImage): >+ * platform/graphics/GeneratedImage.h: >+ (GeneratedImage): >+ * platform/graphics/GeneratorGeneratedImage.cpp: >+ (WebCore::GeneratorGeneratedImage::draw): >+ * platform/graphics/GeneratorGeneratedImage.h: >+ (GeneratorGeneratedImage): >+ * platform/graphics/GraphicsContext.cpp: >+ (WebCore::GraphicsContext::drawImage): >+ (WebCore): >+ (WebCore::GraphicsContext::drawImageBuffer): >+ (WebCore::GraphicsContext::setCompositeOperation): >+ * platform/graphics/GraphicsContext.h: >+ (WebCore::GraphicsContextState::GraphicsContextState): >+ (GraphicsContextState): >+ (GraphicsContext): >+ * platform/graphics/Image.cpp: >+ (WebCore::Image::draw): >+ (WebCore::Image::drawTiled): >+ * platform/graphics/Image.h: >+ (Image): >+ * platform/graphics/ImageBuffer.h: >+ (ImageBuffer): >+ * platform/graphics/cairo/BitmapImageCairo.cpp: >+ (WebCore::BitmapImage::draw): >+ * platform/graphics/cairo/GraphicsContextCairo.cpp: >+ (WebCore::GraphicsContext::setPlatformCompositeOperation): >+ * platform/graphics/cairo/ImageBufferCairo.cpp: >+ (WebCore::ImageBuffer::draw): >+ * platform/graphics/cg/BitmapImageCG.cpp: >+ (WebCore::BitmapImage::draw): >+ * platform/graphics/cg/GraphicsContextCG.cpp: >+ (WebCore::GraphicsContext::drawNativeImage): >+ (WebCore::GraphicsContext::setPlatformCompositeOperation): >+ * platform/graphics/cg/ImageBufferCG.cpp: >+ (WebCore::ImageBuffer::draw): >+ * platform/graphics/cg/PDFDocumentImage.cpp: >+ (WebCore::PDFDocumentImage::draw): >+ * platform/graphics/cg/PDFDocumentImage.h: >+ (PDFDocumentImage): >+ * platform/graphics/qt/GraphicsContextQt.cpp: >+ (WebCore::GraphicsContext::setPlatformCompositeOperation): >+ * platform/graphics/qt/ImageBufferQt.cpp: >+ (WebCore::ImageBuffer::draw): >+ * platform/graphics/qt/ImageQt.cpp: >+ (WebCore::BitmapImage::draw): >+ * platform/graphics/qt/StillImageQt.cpp: >+ (WebCore::StillImage::draw): >+ * platform/graphics/qt/StillImageQt.h: >+ (StillImage): >+ * platform/graphics/skia/BitmapImageSingleFrameSkia.h: >+ (BitmapImageSingleFrameSkia): >+ * platform/graphics/skia/GraphicsContextSkia.cpp: >+ (WebCore::GraphicsContext::setPlatformCompositeOperation): >+ * platform/graphics/skia/ImageBufferSkia.cpp: >+ (WebCore::ImageBuffer::draw): >+ * platform/graphics/skia/ImageSkia.cpp: >+ (WebCore::BitmapImage::draw): >+ (WebCore::BitmapImageSingleFrameSkia::draw): >+ * platform/graphics/win/ImageCGWin.cpp: >+ (WebCore::BitmapImage::getHBITMAPOfSize): >+ (WebCore::BitmapImage::drawFrameMatchingSourceSize): >+ * svg/graphics/SVGImage.cpp: >+ (WebCore::SVGImage::drawSVGToImageBuffer): >+ (WebCore::SVGImage::draw): >+ (WebCore::SVGImage::nativeImageForCurrentFrame): >+ * svg/graphics/SVGImage.h: >+ (SVGImage): >+ > 2012-12-03 Kent Tamura <tkent@chromium.org> > > INPUT_MULTIPLE_FIELDS_UI doesn't show digits well in RTL locales >Index: Source/WebCore/html/HTMLCanvasElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLCanvasElement.cpp (revision 136597) >+++ Source/WebCore/html/HTMLCanvasElement.cpp (working copy) >@@ -354,7 +354,7 @@ void HTMLCanvasElement::paint(GraphicsCo > if (m_presentedImage) > context->drawImage(m_presentedImage.get(), ColorSpaceDeviceRGB, pixelSnappedIntRect(r), CompositeSourceOver, DoNotRespectImageOrientation, useLowQualityScale); > else >- context->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, pixelSnappedIntRect(r), CompositeSourceOver, useLowQualityScale); >+ context->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, pixelSnappedIntRect(r), CompositeSourceOver, BlendModeNormal, useLowQualityScale); > } > } > >Index: Source/WebCore/platform/graphics/BitmapImage.h >=================================================================== >--- Source/WebCore/platform/graphics/BitmapImage.h (revision 136597) >+++ Source/WebCore/platform/graphics/BitmapImage.h (working copy) >@@ -207,9 +207,9 @@ protected: > #if PLATFORM(WIN) > virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator); > #endif >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator); >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); > #if USE(CG) || PLATFORM(CHROMIUM) || USE(CAIRO) >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, RespectImageOrientationEnum) OVERRIDE; >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, RespectImageOrientationEnum) OVERRIDE; > #endif > > #if (OS(WINCE) && !PLATFORM(QT)) >Index: Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp >=================================================================== >--- Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp (working copy) >@@ -81,7 +81,7 @@ void CrossfadeGeneratedImage::drawCrossf > context->endTransparencyLayer(); > } > >-void CrossfadeGeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp) >+void CrossfadeGeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode) > { > GraphicsContextStateSaver stateSaver(*context); > context->setCompositeOperation(compositeOp); >Index: Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h >=================================================================== >--- Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h (revision 136597) >+++ Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h (working copy) >@@ -53,7 +53,7 @@ public: > void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; > > protected: >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator); >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); > virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& dstRect); > > CrossfadeGeneratedImage(Image* fromImage, Image* toImage, float percentage, IntSize crossfadeSize, const IntSize&); >Index: Source/WebCore/platform/graphics/GeneratedImage.h >=================================================================== >--- Source/WebCore/platform/graphics/GeneratedImage.h (revision 136597) >+++ Source/WebCore/platform/graphics/GeneratedImage.h (working copy) >@@ -53,7 +53,7 @@ public: > virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; > > protected: >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator) = 0; >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) = 0; > virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, > const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect) = 0; > >Index: Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp >=================================================================== >--- Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp (working copy) >@@ -33,7 +33,7 @@ > > namespace WebCore { > >-void GeneratorGeneratedImage::draw(GraphicsContext* destContext, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp) >+void GeneratorGeneratedImage::draw(GraphicsContext* destContext, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode) > { > GraphicsContextStateSaver stateSaver(*destContext); > destContext->setCompositeOperation(compositeOp); >Index: Source/WebCore/platform/graphics/GeneratorGeneratedImage.h >=================================================================== >--- Source/WebCore/platform/graphics/GeneratorGeneratedImage.h (revision 136597) >+++ Source/WebCore/platform/graphics/GeneratorGeneratedImage.h (working copy) >@@ -53,7 +53,7 @@ public: > virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; > > protected: >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator); >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); > virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, > const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect); > >Index: Source/WebCore/platform/graphics/GraphicsContext.cpp >=================================================================== >--- Source/WebCore/platform/graphics/GraphicsContext.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/GraphicsContext.cpp (working copy) >@@ -468,7 +468,11 @@ void GraphicsContext::drawImage(Image* i > > void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) > { >- if (paintingDisabled() || !image) >+ drawImage(image, styleColorSpace, FloatRect(dest), src, op, BlendModeNormal, shouldRespectImageOrientation, useLowQualityScale); >+} >+ >+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, BlendMode blendMode, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) >+{ if (paintingDisabled() || !image) > return; > > float tsw = src.width(); >@@ -498,7 +502,7 @@ void GraphicsContext::drawImage(Image* i > #endif > } > >- image->draw(this, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), styleColorSpace, op, shouldRespectImageOrientation); >+ image->draw(this, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), styleColorSpace, op, blendMode, shouldRespectImageOrientation); > > if (useLowQualityScale) > setImageInterpolationQuality(previousInterpolationQuality); >@@ -539,27 +543,27 @@ void GraphicsContext::drawTiledImage(Ima > image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, styleColorSpace, op); > } > >-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntPoint& p, CompositeOperator op) >+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntPoint& p, CompositeOperator op, BlendMode blendMode) > { >- drawImageBuffer(image, styleColorSpace, p, IntRect(0, 0, -1, -1), op); >+ drawImageBuffer(image, styleColorSpace, p, IntRect(0, 0, -1, -1), op, blendMode); > } > >-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntRect& r, CompositeOperator op, bool useLowQualityScale) >+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntRect& r, CompositeOperator op, BlendMode blendMode, bool useLowQualityScale) > { >- drawImageBuffer(image, styleColorSpace, r, IntRect(0, 0, -1, -1), op, useLowQualityScale); >+ drawImageBuffer(image, styleColorSpace, r, IntRect(0, 0, -1, -1), op, blendMode, useLowQualityScale); > } > >-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op) >+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op, BlendMode blendMode) > { >- drawImageBuffer(image, styleColorSpace, IntRect(dest, srcRect.size()), srcRect, op); >+ drawImageBuffer(image, styleColorSpace, IntRect(dest, srcRect.size()), srcRect, op, blendMode); > } > >-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, bool useLowQualityScale) >+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, BlendMode blendMode, bool useLowQualityScale) > { >- drawImageBuffer(image, styleColorSpace, FloatRect(dest), srcRect, op, useLowQualityScale); >+ drawImageBuffer(image, styleColorSpace, FloatRect(dest), srcRect, op, blendMode, useLowQualityScale); > } > >-void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale) >+void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, BlendMode blendMode, bool useLowQualityScale) > { > if (paintingDisabled() || !image) > return; >@@ -587,10 +591,10 @@ void GraphicsContext::drawImageBuffer(Im > // FIXME (49002): Should be InterpolationLow > setImageInterpolationQuality(InterpolationNone); > #endif >- image->draw(this, styleColorSpace, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op, useLowQualityScale); >+ image->draw(this, styleColorSpace, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op, blendMode, useLowQualityScale); > setImageInterpolationQuality(previousInterpolationQuality); > } else >- image->draw(this, styleColorSpace, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op, useLowQualityScale); >+ image->draw(this, styleColorSpace, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op, blendMode, useLowQualityScale); > } > > #if !PLATFORM(QT) >@@ -701,8 +705,14 @@ void GraphicsContext::fillRectWithRounde > > void GraphicsContext::setCompositeOperation(CompositeOperator compositeOperation) > { >+ setCompositeOperation(compositeOperation, BlendModeNormal); >+} >+ >+void GraphicsContext::setCompositeOperation(CompositeOperator compositeOperation, BlendMode blendMode) >+{ > m_state.compositeOperator = compositeOperation; >- setPlatformCompositeOperation(compositeOperation); >+ m_state.blendMode = blendMode; >+ setPlatformCompositeOperation(compositeOperation, blendMode); > } > > CompositeOperator GraphicsContext::compositeOperation() const >Index: Source/WebCore/platform/graphics/GraphicsContext.h >=================================================================== >--- Source/WebCore/platform/graphics/GraphicsContext.h (revision 136597) >+++ Source/WebCore/platform/graphics/GraphicsContext.h (working copy) >@@ -165,6 +165,7 @@ namespace WebCore { > , fillColorSpace(ColorSpaceDeviceRGB) > , shadowColorSpace(ColorSpaceDeviceRGB) > , compositeOperator(CompositeSourceOver) >+ , blendMode(BlendModeNormal) > , shouldAntialias(true) > , shouldSmoothFonts(true) > , shouldSubpixelQuantizeFonts(true) >@@ -203,6 +204,7 @@ namespace WebCore { > ColorSpace shadowColorSpace; > > CompositeOperator compositeOperator; >+ BlendMode blendMode; > > bool shouldAntialias : 1; > bool shouldSmoothFonts : 1; >@@ -271,7 +273,7 @@ namespace WebCore { > void applyFillPattern(); > void drawPath(const Path&); > >- void drawNativeImage(NativeImagePtr, const FloatSize& selfSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientation = DefaultImageOrientation); >+ void drawNativeImage(NativeImagePtr, const FloatSize& selfSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, ImageOrientation = DefaultImageOrientation); > > // Allow font smoothing (LCD antialiasing). Not part of the graphics state. > void setAllowsFontSmoothing(bool); >@@ -322,18 +324,19 @@ namespace WebCore { > void drawImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, RespectImageOrientationEnum = DoNotRespectImageOrientation, bool useLowQualityScale = false); > void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), > CompositeOperator = CompositeSourceOver, RespectImageOrientationEnum = DoNotRespectImageOrientation, bool useLowQualityScale = false); >+ void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, RespectImageOrientationEnum = DoNotRespectImageOrientation, bool useLowQualityScale = false); >+ > void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, > CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); > void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& 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 IntPoint&, CompositeOperator = CompositeSourceOver); >- void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect&, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); >- void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver); >- void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); >- void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), >- CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); >+ void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoint&, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal); >+ void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect&, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); >+ void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal); >+ void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); >+ void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); > > void setImageInterpolationQuality(InterpolationQuality); > InterpolationQuality imageInterpolationQuality() const; >@@ -403,6 +406,7 @@ namespace WebCore { > void setAlpha(float); > > void setCompositeOperation(CompositeOperator); >+ void setCompositeOperation(CompositeOperator, BlendMode); > CompositeOperator compositeOperation() const; > > void clip(const Path&); >@@ -556,7 +560,7 @@ namespace WebCore { > void setPlatformShadow(const FloatSize&, float blur, const Color&, ColorSpace); > void clearPlatformShadow(); > >- void setPlatformCompositeOperation(CompositeOperator); >+ void setPlatformCompositeOperation(CompositeOperator, BlendMode = BlendModeNormal); > > void beginPlatformTransparencyLayer(float opacity); > void endPlatformTransparencyLayer(); >Index: Source/WebCore/platform/graphics/Image.cpp >=================================================================== >--- Source/WebCore/platform/graphics/Image.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/Image.cpp (working copy) >@@ -91,9 +91,9 @@ void Image::fillWithSolidColor(GraphicsC > ctxt->setCompositeOperation(previousOperator); > } > >-void Image::draw(GraphicsContext* ctx, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op, RespectImageOrientationEnum) >+void Image::draw(GraphicsContext* ctx, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode, RespectImageOrientationEnum) > { >- draw(ctx, dstRect, srcRect, styleColorSpace, op); >+ draw(ctx, dstRect, srcRect, styleColorSpace, op, blendMode); > } > > void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, ColorSpace styleColorSpace, CompositeOperator op) >@@ -129,7 +129,7 @@ void Image::drawTiled(GraphicsContext* c > visibleSrcRect.setY((destRect.y() - oneTileRect.y()) / scale.height()); > visibleSrcRect.setWidth(destRect.width() / scale.width()); > visibleSrcRect.setHeight(destRect.height() / scale.height()); >- draw(ctxt, destRect, visibleSrcRect, styleColorSpace, op); >+ draw(ctxt, destRect, visibleSrcRect, styleColorSpace, op, BlendModeNormal); > return; > } > >Index: Source/WebCore/platform/graphics/Image.h >=================================================================== >--- Source/WebCore/platform/graphics/Image.h (revision 136597) >+++ Source/WebCore/platform/graphics/Image.h (working copy) >@@ -192,8 +192,8 @@ protected: > #if PLATFORM(WIN) > virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator) { } > #endif >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator) = 0; >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, RespectImageOrientationEnum); >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) = 0; >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, RespectImageOrientationEnum); > void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatPoint& srcPoint, const FloatSize& tileSize, ColorSpace styleColorSpace, CompositeOperator); > void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, const FloatSize& tileScaleFactor, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator); > >Index: Source/WebCore/platform/graphics/ImageBuffer.h >=================================================================== >--- Source/WebCore/platform/graphics/ImageBuffer.h (revision 136597) >+++ Source/WebCore/platform/graphics/ImageBuffer.h (working copy) >@@ -136,7 +136,7 @@ namespace WebCore { > #endif > void clip(GraphicsContext*, const FloatRect&) const; > >- void draw(GraphicsContext*, ColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); >+ void draw(GraphicsContext*, ColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); > void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect); > > inline void genericConvertToLuminanceMask(); >Index: Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp >=================================================================== >--- Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp (working copy) >@@ -71,12 +71,13 @@ BitmapImage::BitmapImage(NativeImageCair > checkForSolidColor(); > } > >-void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op) >+void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode) > { >- draw(context, dst, src, styleColorSpace, op, DoNotRespectImageOrientation); >+ draw(context, dst, src, styleColorSpace, op, blendMode, DoNotRespectImageOrientation); > } > >-void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation) >+void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op, >+ BlendMode, RespectImageOrientationEnum shouldRespectImageOrientation) > { > if (!dst.width() || !dst.height() || !src.width() || !src.height()) > return; >Index: Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp >=================================================================== >--- Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (working copy) >@@ -1006,7 +1006,7 @@ void GraphicsContext::setAlpha(float alp > platformContext()->setGlobalAlpha(alpha); > } > >-void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op) >+void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op, BlendMode) > { > if (paintingDisabled()) > return; >Index: Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >=================================================================== >--- Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (working copy) >@@ -97,11 +97,11 @@ void ImageBuffer::clip(GraphicsContext* > } > > void ImageBuffer::draw(GraphicsContext* destinationContext, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, >- CompositeOperator op , bool useLowQualityScale) >+ CompositeOperator op, BlendMode blendMode, bool useLowQualityScale) > { > BackingStoreCopy copyMode = destinationContext == context() ? CopyBackingStore : DontCopyBackingStore; > RefPtr<Image> image = copyImage(copyMode); >- destinationContext->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, DoNotRespectImageOrientation, useLowQualityScale); >+ destinationContext->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, blendMode, DoNotRespectImageOrientation, useLowQualityScale); > } > > void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, >Index: Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp >=================================================================== >--- Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp (working copy) >@@ -157,12 +157,12 @@ RetainPtr<CFArrayRef> BitmapImage::getCG > return RetainPtr<CFArrayRef>(AdoptCF, array); > } > >-void BitmapImage::draw(GraphicsContext* ctx, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op) >+void BitmapImage::draw(GraphicsContext* ctx, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode) > { >- draw(ctx, dstRect, srcRect, styleColorSpace, op, DoNotRespectImageOrientation); >+ draw(ctx, dstRect, srcRect, styleColorSpace, op, blendMode, DoNotRespectImageOrientation); > } > >-void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, RespectImageOrientationEnum shouldRespectImageOrientation) >+void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode, RespectImageOrientationEnum shouldRespectImageOrientation) > { > startAnimation(); > >@@ -181,7 +181,7 @@ void BitmapImage::draw(GraphicsContext* > if (shouldRespectImageOrientation == RespectImageOrientation) > orientation = frameOrientationAtIndex(m_currentFrame); > >- ctxt->drawNativeImage(image, selfSize, styleColorSpace, destRect, srcRect, compositeOp, orientation); >+ ctxt->drawNativeImage(image, selfSize, styleColorSpace, destRect, srcRect, compositeOp, blendMode, orientation); > > if (imageObserver()) > imageObserver()->didDraw(this); >Index: Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp >=================================================================== >--- Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (working copy) >@@ -265,7 +265,7 @@ void GraphicsContext::restorePlatformSta > m_data->m_userToDeviceTransformKnownToBeIdentity = false; > } > >-void GraphicsContext::drawNativeImage(NativeImagePtr imagePtr, const FloatSize& imageSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, ImageOrientation orientation) >+void GraphicsContext::drawNativeImage(NativeImagePtr imagePtr, const FloatSize& imageSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation) > { > RetainPtr<CGImageRef> image(imagePtr); > >@@ -324,7 +324,7 @@ void GraphicsContext::drawNativeImage(Na > if (!shouldUseSubimage && currHeight < imageSize.height()) > adjustedDestRect.setHeight(adjustedDestRect.height() * currHeight / imageSize.height()); > >- setPlatformCompositeOperation(op); >+ setPlatformCompositeOperation(op, blendMode); > > // ImageOrientation expects the origin to be at (0, 0) > CGContextTranslateCTM(context, adjustedDestRect.x(), adjustedDestRect.y()); >@@ -1698,7 +1698,7 @@ void GraphicsContext::setPlatformShouldS > CGContextSetShouldSmoothFonts(platformContext(), enable); > } > >-void GraphicsContext::setPlatformCompositeOperation(CompositeOperator mode) >+void GraphicsContext::setPlatformCompositeOperation(CompositeOperator mode, BlendMode) > { > if (paintingDisabled()) > return; >Index: Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp >=================================================================== >--- Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (working copy) >@@ -259,7 +259,7 @@ NativeImagePtr ImageBuffer::copyNativeIm > return image; > } > >-void ImageBuffer::draw(GraphicsContext* destContext, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, bool useLowQualityScale) >+void ImageBuffer::draw(GraphicsContext* destContext, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, bool useLowQualityScale) > { > UNUSED_PARAM(useLowQualityScale); > ColorSpace colorSpace = (destContext == m_context) ? ColorSpaceDeviceRGB : styleColorSpace; >@@ -272,7 +272,7 @@ void ImageBuffer::draw(GraphicsContext* > > FloatRect adjustedSrcRect = srcRect; > adjustedSrcRect.scale(m_resolutionScale, m_resolutionScale); >- destContext->drawNativeImage(image.get(), internalSize(), colorSpace, destRect, adjustedSrcRect, op); >+ destContext->drawNativeImage(image.get(), internalSize(), colorSpace, destRect, adjustedSrcRect, op, blendMode); > } > > void ImageBuffer::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect) >Index: Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp >=================================================================== >--- Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (working copy) >@@ -163,7 +163,7 @@ int PDFDocumentImage::pageCount() const > return m_document ? CGPDFDocumentGetNumberOfPages(m_document) : 0; > } > >-void PDFDocumentImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator op) >+void PDFDocumentImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator op, BlendMode) > { > if (!m_document || m_currentPage == -1) > return; >Index: Source/WebCore/platform/graphics/cg/PDFDocumentImage.h >=================================================================== >--- Source/WebCore/platform/graphics/cg/PDFDocumentImage.h (revision 136597) >+++ Source/WebCore/platform/graphics/cg/PDFDocumentImage.h (working copy) >@@ -63,7 +63,7 @@ namespace WebCore { > virtual IntSize size() const; > > PDFDocumentImage(); >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator); >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); > > void setCurrentPage(int); > int pageCount() const; >Index: Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp >=================================================================== >--- Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp (working copy) >@@ -1243,7 +1243,7 @@ void GraphicsContext::setAlpha(float opa > p->setOpacity(opacity); > } > >-void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op) >+void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op, BlendMode) > { > if (paintingDisabled()) > return; >Index: Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp >=================================================================== >--- Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp (working copy) >@@ -126,7 +126,7 @@ PassRefPtr<Image> ImageBuffer::copyImage > } > > void ImageBuffer::draw(GraphicsContext* destContext, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, >- CompositeOperator op, bool useLowQualityScale) >+ CompositeOperator op, BlendMode, bool useLowQualityScale) > { > if (destContext == context()) { > // We're drawing into our own buffer. In order for this to work, we need to copy the source buffer first. >Index: Source/WebCore/platform/graphics/qt/ImageQt.cpp >=================================================================== >--- Source/WebCore/platform/graphics/qt/ImageQt.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/qt/ImageQt.cpp (working copy) >@@ -232,7 +232,7 @@ void BitmapImage::invalidatePlatformData > > // Drawing Routines > void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst, >- const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op) >+ const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op, BlendMode) > { > QRectF normalizedDst = dst.normalized(); > QRectF normalizedSrc = src.normalized(); >Index: Source/WebCore/platform/graphics/qt/StillImageQt.cpp >=================================================================== >--- Source/WebCore/platform/graphics/qt/StillImageQt.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/qt/StillImageQt.cpp (working copy) >@@ -68,7 +68,7 @@ NativeImagePtr StillImage::nativeImageFo > } > > void StillImage::draw(GraphicsContext* ctxt, const FloatRect& dst, >- const FloatRect& src, ColorSpace, CompositeOperator op) >+ const FloatRect& src, ColorSpace, CompositeOperator op, BlendMode) > { > if (m_pixmap->isNull()) > return; >Index: Source/WebCore/platform/graphics/qt/StillImageQt.h >=================================================================== >--- Source/WebCore/platform/graphics/qt/StillImageQt.h (revision 136597) >+++ Source/WebCore/platform/graphics/qt/StillImageQt.h (working copy) >@@ -53,7 +53,7 @@ namespace WebCore { > > virtual IntSize size() const; > virtual NativeImagePtr nativeImageForCurrentFrame(); >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator); >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); > > private: > StillImage(const QPixmap&); >Index: Source/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h >=================================================================== >--- Source/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h (revision 136597) >+++ Source/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h (working copy) >@@ -70,7 +70,7 @@ public: > #endif > > protected: >- virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator); >+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); > > private: > NativeImageSkia m_nativeImage; >Index: Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp >=================================================================== >--- Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (working copy) >@@ -874,7 +874,7 @@ void GraphicsContext::setAlpha(float alp > platformContext()->setAlpha(alpha); > } > >-void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op) >+void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op, BlendMode) > { > if (paintingDisabled()) > return; >Index: Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp >=================================================================== >--- Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (working copy) >@@ -209,7 +209,7 @@ static bool drawNeedsCopy(GraphicsContex > } > > void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, >- CompositeOperator op, bool useLowQualityScale) >+ CompositeOperator op, BlendMode, bool useLowQualityScale) > { > RefPtr<Image> image = BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap(), drawNeedsCopy(m_context.get(), context)); > context->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, DoNotRespectImageOrientation, useLowQualityScale); >Index: Source/WebCore/platform/graphics/skia/ImageSkia.cpp >=================================================================== >--- Source/WebCore/platform/graphics/skia/ImageSkia.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/skia/ImageSkia.cpp (working copy) >@@ -583,12 +583,12 @@ void BitmapImage::checkForSolidColor() > } > } > >-void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp) >+void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp, BlendMode blendMode) > { >- draw(ctxt, dstRect, srcRect, colorSpace, compositeOp, DoNotRespectImageOrientation); >+ draw(ctxt, dstRect, srcRect, colorSpace, compositeOp, blendMode, DoNotRespectImageOrientation); > } > >-void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp, RespectImageOrientationEnum shouldRespectImageOrientation) >+void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp, BlendMode, RespectImageOrientationEnum shouldRespectImageOrientation) > { > if (!m_source.initialized()) > return; >@@ -643,10 +643,10 @@ void BitmapImage::draw(GraphicsContext* > // FIXME: These should go into BitmapImageSingleFrameSkia.cpp > > void BitmapImageSingleFrameSkia::draw(GraphicsContext* ctxt, >- const FloatRect& dstRect, >- const FloatRect& srcRect, >- ColorSpace styleColorSpace, >- CompositeOperator compositeOp) >+ const FloatRect& dstRect, >+ const FloatRect& srcRect, >+ ColorSpace styleColorSpace, >+ CompositeOperator compositeOp, BlendMode) > { > FloatRect normDstRect = normalizeRect(dstRect); > FloatRect normSrcRect = normalizeRect(srcRect); >Index: Source/WebCore/platform/graphics/win/ImageCGWin.cpp >=================================================================== >--- Source/WebCore/platform/graphics/win/ImageCGWin.cpp (revision 136597) >+++ Source/WebCore/platform/graphics/win/ImageCGWin.cpp (working copy) >@@ -78,7 +78,7 @@ bool BitmapImage::getHBITMAPOfSize(HBITM > if (size) > drawFrameMatchingSourceSize(&gc, FloatRect(0.0f, 0.0f, bmpInfo.bmWidth, bmpInfo.bmHeight), IntSize(*size), ColorSpaceDeviceRGB, CompositeCopy); > else >- draw(&gc, FloatRect(0.0f, 0.0f, bmpInfo.bmWidth, bmpInfo.bmHeight), FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), ColorSpaceDeviceRGB, CompositeCopy); >+ draw(&gc, FloatRect(0.0f, 0.0f, bmpInfo.bmWidth, bmpInfo.bmHeight), FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), ColorSpaceDeviceRGB, CompositeCopy, BlendModeNormal); > > // Do cleanup > CGContextRelease(cgContext); >@@ -94,7 +94,7 @@ void BitmapImage::drawFrameMatchingSourc > if (image && CGImageGetHeight(image) == static_cast<size_t>(srcSize.height()) && CGImageGetWidth(image) == static_cast<size_t>(srcSize.width())) { > size_t currentFrame = m_currentFrame; > m_currentFrame = i; >- draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, srcSize.width(), srcSize.height()), styleColorSpace, compositeOp); >+ draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, srcSize.width(), srcSize.height()), styleColorSpace, compositeOp, BlendModeNormal); > m_currentFrame = currentFrame; > return; > } >@@ -102,7 +102,7 @@ void BitmapImage::drawFrameMatchingSourc > > // No image of the correct size was found, fallback to drawing the current frame > IntSize imageSize = BitmapImage::size(); >- draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), styleColorSpace, compositeOp); >+ draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), styleColorSpace, compositeOp, BlendModeNormal); > } > > } // namespace WebCore >Index: Source/WebCore/svg/graphics/SVGImage.cpp >=================================================================== >--- Source/WebCore/svg/graphics/SVGImage.cpp (revision 136597) >+++ Source/WebCore/svg/graphics/SVGImage.cpp (working copy) >@@ -146,7 +146,7 @@ void SVGImage::drawSVGToImageBuffer(Imag > buffer->context()->clearRect(enclosingIntRect(scaledRect)); > > // Draw SVG on top of ImageBuffer. >- draw(buffer->context(), enclosingIntRect(scaledRect), rect, ColorSpaceDeviceRGB, CompositeSourceOver); >+ draw(buffer->context(), enclosingIntRect(scaledRect), rect, ColorSpaceDeviceRGB, CompositeSourceOver, BlendModeNormal); > > // Reset container size & zoom to initial state. Otherwhise the size() of this > // image would return whatever last size was set by drawSVGToImageBuffer(). >@@ -167,7 +167,7 @@ void SVGImage::drawSVGToImageBuffer(Imag > frame->view()->endDisableRepaints(); > } > >-void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp) >+void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode) > { > if (!m_page) > return; >@@ -277,7 +277,7 @@ NativeImagePtr SVGImage::nativeImageForC > OwnPtr<ImageBuffer> buffer = ImageBuffer::create(size(), 1); > if (!buffer) // failed to allocate image > return 0; >- draw(buffer->context(), rect(), rect(), ColorSpaceDeviceRGB, CompositeSourceOver); >+ draw(buffer->context(), rect(), rect(), ColorSpaceDeviceRGB, CompositeSourceOver, BlendModeNormal); > m_frameCache = buffer->copyImage(CopyBackingStore); > } > return m_frameCache->nativeImageForCurrentFrame(); >Index: Source/WebCore/svg/graphics/SVGImage.h >=================================================================== >--- Source/WebCore/svg/graphics/SVGImage.h (revision 136597) >+++ Source/WebCore/svg/graphics/SVGImage.h (working copy) >@@ -83,7 +83,7 @@ private: > virtual NativeImagePtr frameAtIndex(size_t) { return 0; } > > SVGImage(ImageObserver*); >- virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRect& toRect, ColorSpace styleColorSpace, CompositeOperator); >+ virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRect& toRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode); > > virtual NativeImagePtr nativeImageForCurrentFrame(); > >Index: Source/WebKit/chromium/ChangeLog >=================================================================== >--- Source/WebKit/chromium/ChangeLog (revision 136808) >+++ Source/WebKit/chromium/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2012-12-05 Rik Cabanier <cabanier@adobe.com> >+ >+ Extend platform layer so it can pass blend modes to the compositing calls >+ https://bugs.webkit.org/show_bug.cgi?id=104176 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Interface changes for the new blend modes >+ >+ * tests/DragImageTest.cpp: >+ (WebCore::TestImage::draw): >+ * tests/ImageLayerChromiumTest.cpp: >+ (WebCore::TestImage::draw): >+ > 2012-12-05 Takashi Sakamoto <tasak@google.com> > > Unreviewed, WebKit gardening. >Index: Source/WebKit/chromium/tests/DragImageTest.cpp >=================================================================== >--- Source/WebKit/chromium/tests/DragImageTest.cpp (revision 136597) >+++ Source/WebKit/chromium/tests/DragImageTest.cpp (working copy) >@@ -84,7 +84,7 @@ public: > > virtual void draw(WebCore::GraphicsContext*, const WebCore::FloatRect&, > const WebCore::FloatRect&, WebCore::ColorSpace, >- WebCore::CompositeOperator) >+ WebCore::CompositeOperator, WebCore::BlendMode) > { > } > >Index: Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp >=================================================================== >--- Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp (revision 136597) >+++ Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp (working copy) >@@ -96,7 +96,7 @@ public: > > virtual void draw(WebCore::GraphicsContext*, const WebCore::FloatRect&, > const WebCore::FloatRect&, WebCore::ColorSpace, >- WebCore::CompositeOperator) >+ WebCore::CompositeOperator, WebCore::BlendMode) > { > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 104176
:
177847
|
177854
|
177866
|
177908
|
177949
|
178089
|
178099
|
178242
|
178266
|
178304