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

Side by Side Diff: include/utils/SkDumpCanvas.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/SkDeferredCanvas.h ('k') | include/utils/SkLuaCanvas.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 #ifndef SkDumpCanvas_DEFINED 8 #ifndef SkDumpCanvas_DEFINED
9 #define SkDumpCanvas_DEFINED 9 #define SkDumpCanvas_DEFINED
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 private: 68 private:
69 typedef SkRefCnt INHERITED; 69 typedef SkRefCnt INHERITED;
70 }; 70 };
71 71
72 Dumper* getDumper() const { return fDumper; } 72 Dumper* getDumper() const { return fDumper; }
73 void setDumper(Dumper*); 73 void setDumper(Dumper*);
74 74
75 int getNestLevel() const { return fNestLevel; } 75 int getNestLevel() const { return fNestLevel; }
76 76
77 virtual int save(SaveFlags) SK_OVERRIDE;
78 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
79 SaveFlags) SK_OVERRIDE;
80 virtual void restore() SK_OVERRIDE;
81
77 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; 82 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
78 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; 83 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
79 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; 84 virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
80 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; 85 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
81 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; 86 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
82 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; 87 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
83 88
84 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 89 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
85 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 90 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
86 const SkPaint& paint) SK_OVERRIDE; 91 const SkPaint& paint) SK_OVERRIDE;
(...skipping 25 matching lines...) Expand all
112 const SkPoint vertices[], const SkPoint texs[], 117 const SkPoint vertices[], const SkPoint texs[],
113 const SkColor colors[], SkXfermode* xmode, 118 const SkColor colors[], SkXfermode* xmode,
114 const uint16_t indices[], int indexCount, 119 const uint16_t indices[], int indexCount,
115 const SkPaint& paint) SK_OVERRIDE; 120 const SkPaint& paint) SK_OVERRIDE;
116 virtual void drawData(const void*, size_t) SK_OVERRIDE; 121 virtual void drawData(const void*, size_t) SK_OVERRIDE;
117 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 122 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
118 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 123 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
119 virtual void endCommentGroup() SK_OVERRIDE; 124 virtual void endCommentGroup() SK_OVERRIDE;
120 125
121 protected: 126 protected:
122 virtual void onSave(SaveFlags) SK_OVERRIDE;
123 virtual bool onSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRI DE;
124 virtual void onRestore() SK_OVERRIDE;
125
126 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 127 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
127 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; 128 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE;
128 virtual void onPopCull() SK_OVERRIDE; 129 virtual void onPopCull() SK_OVERRIDE;
129 130
130 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 131 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
131 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 132 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
132 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 133 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
133 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 134 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
134 135
135 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle); 136 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 public: 169 public:
169 SkDebugfDumper(); 170 SkDebugfDumper();
170 171
171 private: 172 private:
172 typedef SkFormatDumper INHERITED; 173 typedef SkFormatDumper INHERITED;
173 }; 174 };
174 175
175 #endif 176 #endif
176 177
177 #endif 178 #endif
OLDNEW
« no previous file with comments | « include/utils/SkDeferredCanvas.h ('k') | include/utils/SkLuaCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698