| 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 <memory> | 8 #include <memory> |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "modules/canvas2d/BaseRenderingContext2D.h" | 10 #include "modules/canvas2d/BaseRenderingContext2D.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 bool ParseColorOrCurrentColor(Color&, const String& color_string) const final; | 52 bool ParseColorOrCurrentColor(Color&, const String& color_string) const final; |
| 53 | 53 |
| 54 PaintCanvas* DrawingCanvas() const final; | 54 PaintCanvas* DrawingCanvas() const final; |
| 55 PaintCanvas* ExistingDrawingCanvas() const final; | 55 PaintCanvas* ExistingDrawingCanvas() const final; |
| 56 void DisableDeferral(DisableDeferralReason) final {} | 56 void DisableDeferral(DisableDeferralReason) final {} |
| 57 | 57 |
| 58 AffineTransform BaseTransform() const final; | 58 AffineTransform BaseTransform() const final; |
| 59 | 59 |
| 60 void DidDraw(const SkIRect& dirty_rect) final; | 60 void DidDraw(const SkIRect& dirty_rect) final; |
| 61 | 61 |
| 62 ColorBehavior DrawImageColorBehavior() const final; | |
| 63 | |
| 64 // TODO(ikilpatrick): We'll need to either only accept resolved filters | 62 // TODO(ikilpatrick): We'll need to either only accept resolved filters |
| 65 // from a typed-om <filter> object, or use the appropriate style resolution | 63 // from a typed-om <filter> object, or use the appropriate style resolution |
| 66 // host to determine 'em' units etc in filters. At the moment just pretend | 64 // host to determine 'em' units etc in filters. At the moment just pretend |
| 67 // that we don't have a filter set. | 65 // that we don't have a filter set. |
| 68 bool StateHasFilter() final { return false; } | 66 bool StateHasFilter() final { return false; } |
| 69 sk_sp<SkImageFilter> StateGetFilter() final { return nullptr; } | 67 sk_sp<SkImageFilter> StateGetFilter() final { return nullptr; } |
| 70 void SnapshotStateForFilter() final {} | 68 void SnapshotStateForFilter() final {} |
| 71 | 69 |
| 72 void ValidateStateStack() const final; | 70 void ValidateStateStack() const final; |
| 73 | 71 |
| 74 bool HasAlpha() const final { return has_alpha_; } | 72 bool HasAlpha() const final { return has_alpha_; } |
| 75 | 73 |
| 76 // PaintRenderingContext2D cannot lose it's context. | 74 // PaintRenderingContext2D cannot lose it's context. |
| 77 bool isContextLost() const final { return false; } | 75 bool isContextLost() const final { return false; } |
| 78 | 76 |
| 79 private: | 77 private: |
| 80 PaintRenderingContext2D(std::unique_ptr<ImageBuffer>, | 78 PaintRenderingContext2D(std::unique_ptr<ImageBuffer>, |
| 81 bool has_alpha, | 79 bool has_alpha, |
| 82 float zoom); | 80 float zoom); |
| 83 | 81 |
| 84 std::unique_ptr<ImageBuffer> image_buffer_; | 82 std::unique_ptr<ImageBuffer> image_buffer_; |
| 85 bool has_alpha_; | 83 bool has_alpha_; |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 } // namespace blink | 86 } // namespace blink |
| 89 | 87 |
| 90 #endif // PaintRenderingContext2D_h | 88 #endif // PaintRenderingContext2D_h |
| OLD | NEW |