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

Side by Side Diff: include/utils/SkNWayCanvas.h

Issue 194923008: Revert "De-virtualize SkCanvas save/restore." (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « include/utils/SkLuaCanvas.h ('k') | include/utils/SkProxyCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SkNWayCanvas_DEFINED 9 #ifndef SkNWayCanvas_DEFINED
10 #define SkNWayCanvas_DEFINED 10 #define SkNWayCanvas_DEFINED
11 11
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 13
14 class SK_API SkNWayCanvas : public SkCanvas { 14 class SK_API SkNWayCanvas : public SkCanvas {
15 public: 15 public:
16 SkNWayCanvas(int width, int height); 16 SkNWayCanvas(int width, int height);
17 virtual ~SkNWayCanvas(); 17 virtual ~SkNWayCanvas();
18 18
19 virtual void addCanvas(SkCanvas*); 19 virtual void addCanvas(SkCanvas*);
20 virtual void removeCanvas(SkCanvas*); 20 virtual void removeCanvas(SkCanvas*);
21 virtual void removeAll(); 21 virtual void removeAll();
22 22
23 /////////////////////////////////////////////////////////////////////////// 23 ///////////////////////////////////////////////////////////////////////////
24 // These are forwarded to the N canvases we're referencing 24 // These are forwarded to the N canvases we're referencing
25 25
26 virtual int save(SaveFlags) SK_OVERRIDE;
27 virtual int saveLayer(const SkRect* bounds, const SkPaint*,
28 SaveFlags) SK_OVERRIDE;
29 virtual void restore() SK_OVERRIDE;
26 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; 30 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
27 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; 31 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
28 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; 32 virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
29 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; 33 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
30 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; 34 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
31 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; 35 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
32 virtual void clear(SkColor) SK_OVERRIDE; 36 virtual void clear(SkColor) SK_OVERRIDE;
33 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 37 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
34 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 38 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
35 const SkPaint&) SK_OVERRIDE; 39 const SkPaint&) SK_OVERRIDE;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual SkBounder* setBounder(SkBounder*) SK_OVERRIDE; 74 virtual SkBounder* setBounder(SkBounder*) SK_OVERRIDE;
71 virtual SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE; 75 virtual SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE;
72 76
73 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 77 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
74 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 78 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
75 virtual void endCommentGroup() SK_OVERRIDE; 79 virtual void endCommentGroup() SK_OVERRIDE;
76 80
77 protected: 81 protected:
78 SkTDArray<SkCanvas*> fList; 82 SkTDArray<SkCanvas*> fList;
79 83
80 virtual void onSave(SaveFlags) SK_OVERRIDE;
81 virtual bool onSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRI DE;
82 virtual void onRestore() SK_OVERRIDE;
83
84 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 84 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
85 85
86 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 86 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
87 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 87 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
88 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 88 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
89 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 89 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
90 90
91 class Iter; 91 class Iter;
92 92
93 private: 93 private:
94 typedef SkCanvas INHERITED; 94 typedef SkCanvas INHERITED;
95 }; 95 };
96 96
97 97
98 #endif 98 #endif
OLDNEW
« no previous file with comments | « include/utils/SkLuaCanvas.h ('k') | include/utils/SkProxyCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698