| Index: Source/core/platform/graphics/ImageBuffer.h
|
| diff --git a/Source/core/platform/graphics/ImageBuffer.h b/Source/core/platform/graphics/ImageBuffer.h
|
| index cda6678fad18ba1dd0efe105b382a4d36e199e5e..3d97575fd2523921c845902089780f40f7a4b4dd 100644
|
| --- a/Source/core/platform/graphics/ImageBuffer.h
|
| +++ b/Source/core/platform/graphics/ImageBuffer.h
|
| @@ -73,14 +73,19 @@ namespace WebCore {
|
| Unscaled
|
| };
|
|
|
| + enum OpacityMode {
|
| + NonOpaque,
|
| + Opaque,
|
| + };
|
| +
|
| class ImageBuffer {
|
| WTF_MAKE_NONCOPYABLE(ImageBuffer); WTF_MAKE_FAST_ALLOCATED;
|
| public:
|
| // Will return a null pointer on allocation failure.
|
| - static PassOwnPtr<ImageBuffer> create(const IntSize& size, float resolutionScale = 1, ColorSpace colorSpace = ColorSpaceDeviceRGB, RenderingMode renderingMode = Unaccelerated)
|
| + static PassOwnPtr<ImageBuffer> create(const IntSize& size, float resolutionScale = 1, ColorSpace colorSpace = ColorSpaceDeviceRGB, RenderingMode renderingMode = Unaccelerated, OpacityMode opacityMode = NonOpaque)
|
| {
|
| bool success = false;
|
| - OwnPtr<ImageBuffer> buf = adoptPtr(new ImageBuffer(size, resolutionScale, colorSpace, renderingMode, success));
|
| + OwnPtr<ImageBuffer> buf = adoptPtr(new ImageBuffer(size, resolutionScale, colorSpace, renderingMode, opacityMode, success));
|
| if (!success)
|
| return nullptr;
|
| return buf.release();
|
| @@ -144,7 +149,7 @@ namespace WebCore {
|
|
|
| // This constructor will place its success into the given out-variable
|
| // so that create() knows when it should return failure.
|
| - ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, RenderingMode, bool& success);
|
| + ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, RenderingMode, OpacityMode, bool& success);
|
| ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, const GraphicsContext*, bool hasAlpha, bool& success);
|
| };
|
|
|
|
|