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

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

Issue 23484007: call drawRect to try GrAARectRenderer if the path is a rect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: if the path is a rect, call drawRect in SkCanvas::drawPath for potential accelerated rasterization … Created 7 years, 2 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
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool doAntiAlias) SK_OVERRIDE; 155 bool doAntiAlias) SK_OVERRIDE;
156 virtual bool clipPath(const SkPath& path, SkRegion::Op op, 156 virtual bool clipPath(const SkPath& path, SkRegion::Op op,
157 bool doAntiAlias) SK_OVERRIDE; 157 bool doAntiAlias) SK_OVERRIDE;
158 virtual bool clipRegion(const SkRegion& deviceRgn, 158 virtual bool clipRegion(const SkRegion& deviceRgn,
159 SkRegion::Op op) SK_OVERRIDE; 159 SkRegion::Op op) SK_OVERRIDE;
160 virtual void clear(SkColor) SK_OVERRIDE; 160 virtual void clear(SkColor) SK_OVERRIDE;
161 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 161 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
162 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 162 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
163 const SkPaint& paint) SK_OVERRIDE; 163 const SkPaint& paint) SK_OVERRIDE;
164 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 164 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
165 virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; 165 virtual void onDrawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRID E;
166 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 166 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
167 virtual void drawPath(const SkPath& path, const SkPaint& paint) 167 virtual void onDrawPath(const SkPath& path, const SkPaint& paint)
168 SK_OVERRIDE; 168 SK_OVERRIDE;
169 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, 169 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left,
170 SkScalar top, const SkPaint* paint) 170 SkScalar top, const SkPaint* paint)
171 SK_OVERRIDE; 171 SK_OVERRIDE;
172 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 172 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
173 const SkRect& dst, const SkPaint* paint, 173 const SkRect& dst, const SkPaint* paint,
174 DrawBitmapRectFlags flags) SK_OVERRIDE; 174 DrawBitmapRectFlags flags) SK_OVERRIDE;
175 175
176 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, 176 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
177 const SkPaint* paint) SK_OVERRIDE; 177 const SkPaint* paint) SK_OVERRIDE;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void validate() const; 247 void validate() const;
248 void init(); 248 void init();
249 bool fDeferredDrawing; 249 bool fDeferredDrawing;
250 250
251 friend class SkDeferredCanvasTester; // for unit testing 251 friend class SkDeferredCanvasTester; // for unit testing
252 typedef SkCanvas INHERITED; 252 typedef SkCanvas INHERITED;
253 }; 253 };
254 254
255 255
256 #endif 256 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698