| 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" |
| 11 #include "platform/graphics/ImageBuffer.h" | 11 #include "platform/graphics/ImageBuffer.h" |
| 12 #include "skia/ext/cdl_common.h" |
| 12 #include <memory> | 13 #include <memory> |
| 13 | 14 |
| 14 class SkCanvas; | |
| 15 | |
| 16 namespace blink { | 15 namespace blink { |
| 17 | 16 |
| 18 class CanvasImageSource; | 17 class CanvasImageSource; |
| 19 class Color; | 18 class Color; |
| 20 | 19 |
| 21 class MODULES_EXPORT PaintRenderingContext2D | 20 class MODULES_EXPORT PaintRenderingContext2D |
| 22 : public BaseRenderingContext2D, | 21 : public BaseRenderingContext2D, |
| 23 public GarbageCollectedFinalized<PaintRenderingContext2D>, | 22 public GarbageCollectedFinalized<PaintRenderingContext2D>, |
| 24 public ScriptWrappable { | 23 public ScriptWrappable { |
| 25 DEFINE_WRAPPERTYPEINFO(); | 24 DEFINE_WRAPPERTYPEINFO(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 43 } | 42 } |
| 44 | 43 |
| 45 int width() const final; | 44 int width() const final; |
| 46 int height() const final; | 45 int height() const final; |
| 47 | 46 |
| 48 bool hasImageBuffer() const final { return m_imageBuffer.get(); } | 47 bool hasImageBuffer() const final { return m_imageBuffer.get(); } |
| 49 ImageBuffer* imageBuffer() const final { return m_imageBuffer.get(); } | 48 ImageBuffer* imageBuffer() const final { return m_imageBuffer.get(); } |
| 50 | 49 |
| 51 bool parseColorOrCurrentColor(Color&, const String& colorString) const final; | 50 bool parseColorOrCurrentColor(Color&, const String& colorString) const final; |
| 52 | 51 |
| 53 SkCanvas* drawingCanvas() const final; | 52 CdlCanvas* drawingCanvas() const final; |
| 54 SkCanvas* existingDrawingCanvas() const final; | 53 CdlCanvas* existingDrawingCanvas() const final; |
| 55 void disableDeferral(DisableDeferralReason) final {} | 54 void disableDeferral(DisableDeferralReason) final {} |
| 56 | 55 |
| 57 AffineTransform baseTransform() const final; | 56 AffineTransform baseTransform() const final; |
| 58 | 57 |
| 59 void didDraw(const SkIRect& dirtyRect) final; | 58 void didDraw(const SkIRect& dirtyRect) final; |
| 60 | 59 |
| 61 // TODO(ikilpatrick): We'll need to either only accept resolved filters | 60 // TODO(ikilpatrick): We'll need to either only accept resolved filters |
| 62 // from a typed-om <filter> object, or use the appropriate style resolution | 61 // 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 | 62 // host to determine 'em' units etc in filters. At the moment just pretend |
| 64 // that we don't have a filter set. | 63 // that we don't have a filter set. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 78 bool hasAlpha, | 77 bool hasAlpha, |
| 79 float zoom); | 78 float zoom); |
| 80 | 79 |
| 81 std::unique_ptr<ImageBuffer> m_imageBuffer; | 80 std::unique_ptr<ImageBuffer> m_imageBuffer; |
| 82 bool m_hasAlpha; | 81 bool m_hasAlpha; |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 } // namespace blink | 84 } // namespace blink |
| 86 | 85 |
| 87 #endif // PaintRenderingContext2D_h | 86 #endif // PaintRenderingContext2D_h |
| OLD | NEW |