Extend platform layer so it can pass blend modes to the compositing calls
https://bugs.webkit.org/show_bug.cgi?id=104176

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-12-07
Reviewed by Dirk Schulze.

Source/WebCore:

Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context

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):

Source/WebKit/chromium:

Adding blend mode enumeration to draw functions

* tests/DragImageTest.cpp:
(WebCore::TestImage::draw):
* tests/ImageLayerChromiumTest.cpp:
(WebCore::TestImage::draw):

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