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/Paint.h" | 8 #include "sky/engine/core/painting/Paint.h" |
9 #include "sky/engine/platform/graphics/DisplayList.h" | 9 #include "sky/engine/platform/graphics/DisplayList.h" |
10 #include "sky/engine/tonic/dart_wrappable.h" | 10 #include "sky/engine/tonic/dart_wrappable.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 void skew(float sx, float sy); | 35 void skew(float sx, float sy); |
36 void concat(const Vector<float>& matrix); | 36 void concat(const Vector<float>& matrix); |
37 | 37 |
38 void clipRect(const Vector<float>& rect); | 38 void clipRect(const Vector<float>& rect); |
39 | 39 |
40 void drawPaint(Paint* paint); | 40 void drawPaint(Paint* paint); |
41 void drawRect(const Vector<float>& rect, const Paint* paint); | 41 void drawRect(const Vector<float>& rect, const Paint* paint); |
42 void drawOval(const Vector<float>& rect, const Paint* paint); | 42 void drawOval(const Vector<float>& rect, const Paint* paint); |
43 void drawCircle(float x, float y, float radius, Paint* paint); | 43 void drawCircle(float x, float y, float radius, Paint* paint); |
44 | 44 |
| 45 SkCanvas* skCanvas() { return m_canvas; } |
| 46 |
45 protected: | 47 protected: |
46 PassRefPtr<DisplayList> finishRecording(); | 48 PassRefPtr<DisplayList> finishRecording(); |
47 | 49 |
48 bool isRecording() const { return m_canvas; } | 50 bool isRecording() const { return m_canvas; } |
49 | 51 |
50 private: | 52 private: |
51 FloatSize m_size; | 53 FloatSize m_size; |
52 RefPtr<DisplayList> m_displayList; | 54 RefPtr<DisplayList> m_displayList; |
53 SkCanvas* m_canvas; | 55 SkCanvas* m_canvas; |
54 }; | 56 }; |
55 | 57 |
56 } // namespace blink | 58 } // namespace blink |
57 | 59 |
58 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ | 60 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ |
OLD | NEW |