OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PaintRenderingContext2D_h | 5 #ifndef PaintRenderingContext2D_h |
6 #define PaintRenderingContext2D_h | 6 #define PaintRenderingContext2D_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "modules/canvas2d/BaseRenderingContext2D.h" | 10 #include "modules/canvas2d/BaseRenderingContext2D.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 AffineTransform baseTransform() const final; | 57 AffineTransform baseTransform() const final; |
58 | 58 |
59 void didDraw(const SkIRect& dirtyRect) final; | 59 void didDraw(const SkIRect& dirtyRect) final; |
60 | 60 |
61 // TODO(ikilpatrick): We'll need to either only accept resolved filters | 61 // TODO(ikilpatrick): We'll need to either only accept resolved filters |
62 // from a typed-om <filter> object, or use the appropriate style resolution | 62 // from a typed-om <filter> object, or use the appropriate style resolution |
63 // host to determine 'em' units etc in filters. At the moment just pretend | 63 // host to determine 'em' units etc in filters. At the moment just pretend |
64 // that we don't have a filter set. | 64 // that we don't have a filter set. |
65 bool stateHasFilter() final { return false; } | 65 bool stateHasFilter() final { return false; } |
66 SkImageFilter* stateGetFilter() final { return nullptr; } | 66 sk_sp<SkImageFilter> stateGetFilter() final { return nullptr; } |
67 void snapshotStateForFilter() final {} | 67 void snapshotStateForFilter() final {} |
68 | 68 |
69 void validateStateStack() const final; | 69 void validateStateStack() const final; |
70 | 70 |
71 bool hasAlpha() const final { return m_hasAlpha; } | 71 bool hasAlpha() const final { return m_hasAlpha; } |
72 | 72 |
73 // PaintRenderingContext2D cannot lose it's context. | 73 // PaintRenderingContext2D cannot lose it's context. |
74 bool isContextLost() const final { return false; } | 74 bool isContextLost() const final { return false; } |
75 | 75 |
76 private: | 76 private: |
77 PaintRenderingContext2D(std::unique_ptr<ImageBuffer>, | 77 PaintRenderingContext2D(std::unique_ptr<ImageBuffer>, |
78 bool hasAlpha, | 78 bool hasAlpha, |
79 float zoom); | 79 float zoom); |
80 | 80 |
81 std::unique_ptr<ImageBuffer> m_imageBuffer; | 81 std::unique_ptr<ImageBuffer> m_imageBuffer; |
82 bool m_hasAlpha; | 82 bool m_hasAlpha; |
83 }; | 83 }; |
84 | 84 |
85 } // namespace blink | 85 } // namespace blink |
86 | 86 |
87 #endif // PaintRenderingContext2D_h | 87 #endif // PaintRenderingContext2D_h |
OLD | NEW |