Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Side by Side Diff: sky/engine/core/painting/Canvas.h

Issue 1135283005: Sky: Add a CustomDart attribute to the IDL compiler, and use that with Canvas (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: . Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/core/painting/Picture.h" 9 #include "sky/engine/core/painting/Picture.h"
10 #include "sky/engine/platform/graphics/DisplayList.h" 10 #include "sky/engine/platform/graphics/DisplayList.h"
(...skipping 21 matching lines...) Expand all
32 32
33 void translate(float dx, float dy); 33 void translate(float dx, float dy);
34 void scale(float sx, float sy); 34 void scale(float sx, float sy);
35 void rotateDegrees(float degrees); 35 void rotateDegrees(float degrees);
36 void skew(float sx, float sy); 36 void skew(float sx, float sy);
37 void concat(const Vector<float>& matrix); 37 void concat(const Vector<float>& matrix);
38 38
39 void clipRect(const Vector<float>& rect); 39 void clipRect(const Vector<float>& rect);
40 40
41 void drawPicture(Picture* picture); 41 void drawPicture(Picture* picture);
42 42 void drawPaint(const Paint* paint);
43 void drawPaint(Paint* paint);
44 void drawRect(const Vector<float>& rect, const Paint* paint); 43 void drawRect(const Vector<float>& rect, const Paint* paint);
45 void drawOval(const Vector<float>& rect, const Paint* paint); 44 void drawOval(const Vector<float>& rect, const Paint* paint);
46 void drawCircle(float x, float y, float radius, Paint* paint); 45 void drawCircle(float x, float y, float radius, const Paint* paint);
47 46
48 SkCanvas* skCanvas() { return m_canvas; } 47 SkCanvas* skCanvas() { return m_canvas; }
49 48
50 protected: 49 protected:
51 PassRefPtr<DisplayList> finishRecording(); 50 PassRefPtr<DisplayList> finishRecording();
52 51
53 bool isRecording() const { return m_canvas; } 52 bool isRecording() const { return m_canvas; }
54 53
55 private: 54 private:
56 FloatSize m_size; 55 FloatSize m_size;
57 RefPtr<DisplayList> m_displayList; 56 RefPtr<DisplayList> m_displayList;
58 SkCanvas* m_canvas; 57 SkCanvas* m_canvas;
59 }; 58 };
60 59
61 } // namespace blink 60 } // namespace blink
62 61
63 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ 62 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_
OLDNEW
« no previous file with comments | « sky/engine/bindings/scripts/templates/interface_dart.template ('k') | sky/engine/core/painting/Canvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698