OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SKY_ENGINE_CORE_PAINTING_CANVAS_H_ | 5 #ifndef SKY_ENGINE_CORE_PAINTING_CANVAS_H_ |
6 #define SKY_ENGINE_CORE_PAINTING_CANVAS_H_ | 6 #define SKY_ENGINE_CORE_PAINTING_CANVAS_H_ |
7 | 7 |
| 8 #include "sky/engine/core/painting/CanvasPath.h" |
8 #include "sky/engine/core/painting/Paint.h" | 9 #include "sky/engine/core/painting/Paint.h" |
9 #include "sky/engine/core/painting/Picture.h" | 10 #include "sky/engine/core/painting/Picture.h" |
10 #include "sky/engine/core/painting/Rect.h" | 11 #include "sky/engine/core/painting/Rect.h" |
11 #include "sky/engine/platform/graphics/DisplayList.h" | 12 #include "sky/engine/platform/graphics/DisplayList.h" |
12 #include "sky/engine/tonic/dart_wrappable.h" | 13 #include "sky/engine/tonic/dart_wrappable.h" |
13 #include "sky/engine/wtf/PassRefPtr.h" | 14 #include "sky/engine/wtf/PassRefPtr.h" |
14 #include "sky/engine/wtf/RefCounted.h" | 15 #include "sky/engine/wtf/RefCounted.h" |
15 | 16 |
16 namespace blink { | 17 namespace blink { |
17 class Element; | 18 class Element; |
(...skipping 19 matching lines...) Expand all Loading... |
37 void skew(float sx, float sy); | 38 void skew(float sx, float sy); |
38 void concat(const Vector<float>& matrix); | 39 void concat(const Vector<float>& matrix); |
39 | 40 |
40 void clipRect(const Rect& rect); | 41 void clipRect(const Rect& rect); |
41 | 42 |
42 void drawPicture(Picture* picture); | 43 void drawPicture(Picture* picture); |
43 void drawPaint(const Paint* paint); | 44 void drawPaint(const Paint* paint); |
44 void drawRect(const Rect& rect, const Paint* paint); | 45 void drawRect(const Rect& rect, const Paint* paint); |
45 void drawOval(const Rect& rect, const Paint* paint); | 46 void drawOval(const Rect& rect, const Paint* paint); |
46 void drawCircle(float x, float y, float radius, const Paint* paint); | 47 void drawCircle(float x, float y, float radius, const Paint* paint); |
| 48 void drawPath(const CanvasPath* path, const Paint* paint); |
47 | 49 |
48 SkCanvas* skCanvas() { return m_canvas; } | 50 SkCanvas* skCanvas() { return m_canvas; } |
49 | 51 |
50 protected: | 52 protected: |
51 PassRefPtr<DisplayList> finishRecording(); | 53 PassRefPtr<DisplayList> finishRecording(); |
52 | 54 |
53 bool isRecording() const { return m_canvas; } | 55 bool isRecording() const { return m_canvas; } |
54 | 56 |
55 private: | 57 private: |
56 FloatSize m_size; | 58 FloatSize m_size; |
57 RefPtr<DisplayList> m_displayList; | 59 RefPtr<DisplayList> m_displayList; |
58 SkCanvas* m_canvas; | 60 SkCanvas* m_canvas; |
59 }; | 61 }; |
60 | 62 |
61 } // namespace blink | 63 } // namespace blink |
62 | 64 |
63 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ | 65 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ |
OLD | NEW |