Extend platform layer so it can pass blend modes to the compositing calls
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2012 04:03:05 +0000 (04:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2012 04:03:05 +0000 (04:03 +0000)
commitc44c096c532ade04fe867cfaccd02032dd8c36b0
treedc2b16cd067d2e8889f61d0c687345c7259d7872
parent227906c9a5b6cff05060343882a3a46b84e290cb
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: https://svn.webkit.org/repository/webkit/trunk@137011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
38 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h
Source/WebCore/platform/graphics/GeneratedImage.h
Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp
Source/WebCore/platform/graphics/GeneratorGeneratedImage.h
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/graphics/Image.h
Source/WebCore/platform/graphics/ImageBuffer.h
Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp
Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp
Source/WebCore/platform/graphics/qt/ImageQt.cpp
Source/WebCore/platform/graphics/qt/StillImageQt.cpp
Source/WebCore/platform/graphics/qt/StillImageQt.h
Source/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h
Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
Source/WebCore/platform/graphics/skia/ImageSkia.cpp
Source/WebCore/platform/graphics/win/ImageCGWin.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebCore/svg/graphics/SVGImage.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/DragImageTest.cpp
Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp
Source/WebKit2/win/WebKit2.def.in