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

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

Issue 183453002: add new onClip* methods to SkCanvas (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove debug 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/core/SkCanvas.h ('k') | include/utils/SkDumpCanvas.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkDeferredCanvas_DEFINED 8 #ifndef SkDeferredCanvas_DEFINED
9 #define SkDeferredCanvas_DEFINED 9 #define SkDeferredCanvas_DEFINED
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, 142 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
143 SaveFlags flags) SK_OVERRIDE; 143 SaveFlags flags) SK_OVERRIDE;
144 virtual void restore() SK_OVERRIDE; 144 virtual void restore() SK_OVERRIDE;
145 virtual bool isDrawingToLayer() const SK_OVERRIDE; 145 virtual bool isDrawingToLayer() const SK_OVERRIDE;
146 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; 146 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
147 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; 147 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
148 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; 148 virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
149 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; 149 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
150 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; 150 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
151 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; 151 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
152 virtual bool clipRect(const SkRect& rect, SkRegion::Op op,
153 bool doAntiAlias) SK_OVERRIDE;
154 virtual bool clipRRect(const SkRRect& rect, SkRegion::Op op,
155 bool doAntiAlias) SK_OVERRIDE;
156 virtual bool clipPath(const SkPath& path, SkRegion::Op op,
157 bool doAntiAlias) SK_OVERRIDE;
158 virtual bool clipRegion(const SkRegion& deviceRgn,
159 SkRegion::Op op) SK_OVERRIDE;
160 virtual void clear(SkColor) SK_OVERRIDE; 152 virtual void clear(SkColor) SK_OVERRIDE;
161 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 153 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
162 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 154 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
163 const SkPaint& paint) SK_OVERRIDE; 155 const SkPaint& paint) SK_OVERRIDE;
164 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 156 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
165 virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; 157 virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
166 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 158 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
167 virtual void drawPath(const SkPath& path, const SkPaint& paint) 159 virtual void drawPath(const SkPath& path, const SkPaint& paint)
168 SK_OVERRIDE; 160 SK_OVERRIDE;
169 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, 161 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left,
(...skipping 27 matching lines...) Expand all
197 const SkColor colors[], SkXfermode* xmode, 189 const SkColor colors[], SkXfermode* xmode,
198 const uint16_t indices[], int indexCount, 190 const uint16_t indices[], int indexCount,
199 const SkPaint& paint) SK_OVERRIDE; 191 const SkPaint& paint) SK_OVERRIDE;
200 virtual SkBounder* setBounder(SkBounder* bounder) SK_OVERRIDE; 192 virtual SkBounder* setBounder(SkBounder* bounder) SK_OVERRIDE;
201 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; 193 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE;
202 194
203 protected: 195 protected:
204 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, 196 virtual void onDrawDRRect(const SkRRect&, const SkRRect&,
205 const SkPaint&) SK_OVERRIDE; 197 const SkPaint&) SK_OVERRIDE;
206 198
199 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
200 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
201 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
202 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
203
207 public: 204 public:
208 class NotificationClient { 205 class NotificationClient {
209 public: 206 public:
210 virtual ~NotificationClient() {} 207 virtual ~NotificationClient() {}
211 208
212 /** 209 /**
213 * Called before executing one or several draw commands, which means 210 * Called before executing one or several draw commands, which means
214 * once per flush when deferred rendering is enabled. 211 * once per flush when deferred rendering is enabled.
215 */ 212 */
216 virtual void prepareForDraw() {} 213 virtual void prepareForDraw() {}
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 void validate() const; 248 void validate() const;
252 void init(); 249 void init();
253 bool fDeferredDrawing; 250 bool fDeferredDrawing;
254 251
255 friend class SkDeferredCanvasTester; // for unit testing 252 friend class SkDeferredCanvasTester; // for unit testing
256 typedef SkCanvas INHERITED; 253 typedef SkCanvas INHERITED;
257 }; 254 };
258 255
259 256
260 #endif 257 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | include/utils/SkDumpCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698