Chromium Code Reviews| Index: third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h |
| diff --git a/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h b/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h |
| index 03b3fa65a15a3af1ace2a25a74309149e2ab2bb5..9ce602fc19701322f307c93d6417b0422508df0d 100644 |
| --- a/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h |
| +++ b/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h |
| @@ -23,9 +23,9 @@ class MODULES_EXPORT PaintRenderingContext2D : public BaseRenderingContext2D, pu |
| USING_GARBAGE_COLLECTED_MIXIN(PaintRenderingContext2D); |
| WTF_MAKE_NONCOPYABLE(PaintRenderingContext2D); |
| public: |
| - static PaintRenderingContext2D* create(std::unique_ptr<ImageBuffer> imageBuffer) |
| + static PaintRenderingContext2D* create(std::unique_ptr<ImageBuffer> imageBuffer, bool hasAlpha) |
| { |
| - return new PaintRenderingContext2D(std::move(imageBuffer)); |
| + return new PaintRenderingContext2D(std::move(imageBuffer), hasAlpha); |
| } |
| // BaseRenderingContext2D |
| @@ -62,15 +62,16 @@ public: |
| void validateStateStack() final; |
| - bool hasAlpha() const final { return true; } |
| + bool hasAlpha() const final { return m_hasAlpha; } |
|
ikilpatrick
2016/06/23 16:53:42
This method can probably be now implemented as a n
Gleb Lanbin
2016/06/23 22:26:03
I tried to pass hasAlpha directly to BaseRendering
|
| // PaintRenderingContext2D cannot lose it's context. |
| bool isContextLost() const final { return false; } |
| private: |
| - explicit PaintRenderingContext2D(std::unique_ptr<ImageBuffer>); |
| + PaintRenderingContext2D(std::unique_ptr<ImageBuffer>, bool hasAlpha); |
| std::unique_ptr<ImageBuffer> m_imageBuffer; |
| + bool m_hasAlpha; |
| }; |
| } // namespace blink |