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..6a64ef553a77908cbca90dc0babf69396e8dfea4 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 hasAlphaChannel) |
| { |
| - return new PaintRenderingContext2D(std::move(imageBuffer)); |
| + return new PaintRenderingContext2D(std::move(imageBuffer), hasAlphaChannel); |
| } |
| // BaseRenderingContext2D |
| @@ -62,15 +62,16 @@ public: |
| void validateStateStack() final; |
| - bool hasAlpha() const final { return true; } |
| + bool hasAlpha() const final { return m_hasAlphaChannel; } |
|
ikilpatrick
2016/06/22 16:00:24
we can probably remove this virtual method now.
T
Gleb Lanbin
2016/06/22 21:23:45
hasAlpha is declared as a pure virtual method in B
|
| // 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 hasAlphaChannel); |
| std::unique_ptr<ImageBuffer> m_imageBuffer; |
| + bool m_hasAlphaChannel; |
| }; |
| } // namespace blink |