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

Side by Side Diff: src/core/SkPictureRecord.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: check for inverse fill 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 /* 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 SkPictureRecord_DEFINED 8 #ifndef SkPictureRecord_DEFINED
9 #define SkPictureRecord_DEFINED 9 #define SkPictureRecord_DEFINED
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; 46 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
47 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE; 47 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE;
48 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE; 48 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE;
49 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE; 49 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE;
50 virtual bool clipRegion(const SkRegion& region, SkRegion::Op op) SK_OVERRIDE ; 50 virtual bool clipRegion(const SkRegion& region, SkRegion::Op op) SK_OVERRIDE ;
51 virtual void clear(SkColor) SK_OVERRIDE; 51 virtual void clear(SkColor) SK_OVERRIDE;
52 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 52 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
53 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[], 53 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
54 const SkPaint&) SK_OVERRIDE; 54 const SkPaint&) SK_OVERRIDE;
55 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; 55 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
56 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
57 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; 56 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
58 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
59 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, 57 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
60 const SkPaint*) SK_OVERRIDE; 58 const SkPaint*) SK_OVERRIDE;
61 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src, 59 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
62 const SkRect& dst, const SkPaint* paint, 60 const SkRect& dst, const SkPaint* paint,
63 DrawBitmapRectFlags flags) SK_OVERRIDE; 61 DrawBitmapRectFlags flags) SK_OVERRIDE;
64 virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&, 62 virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&,
65 const SkPaint*) SK_OVERRIDE; 63 const SkPaint*) SK_OVERRIDE;
66 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 64 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
67 const SkRect& dst, const SkPaint*) SK_OVERRIDE; 65 const SkRect& dst, const SkPaint*) SK_OVERRIDE;
68 virtual void drawSprite(const SkBitmap&, int left, int top, 66 virtual void drawSprite(const SkBitmap&, int left, int top,
(...skipping 30 matching lines...) Expand all
99 fRecordFlags = recordFlags; 97 fRecordFlags = recordFlags;
100 } 98 }
101 99
102 const SkWriter32& writeStream() const { 100 const SkWriter32& writeStream() const {
103 return fWriter; 101 return fWriter;
104 } 102 }
105 103
106 void beginRecording(); 104 void beginRecording();
107 void endRecording(); 105 void endRecording();
108 106
107 protected:
108 virtual void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
109 virtual void onDrawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
110
109 private: 111 private:
110 void handleOptimization(int opt); 112 void handleOptimization(int opt);
111 void recordRestoreOffsetPlaceholder(SkRegion::Op); 113 void recordRestoreOffsetPlaceholder(SkRegion::Op);
112 void fillRestoreOffsetPlaceholdersForCurrentStackLevel( 114 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(
113 uint32_t restoreOffset); 115 uint32_t restoreOffset);
114 116
115 SkTDArray<int32_t> fRestoreOffsetStack; 117 SkTDArray<int32_t> fRestoreOffsetStack;
116 int fFirstSavedLayerIndex; 118 int fFirstSavedLayerIndex;
117 enum { 119 enum {
118 kNoSavedLayerIndex = -1 120 kNoSavedLayerIndex = -1
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 uint32_t fRecordFlags; 264 uint32_t fRecordFlags;
263 int fInitialSaveCount; 265 int fInitialSaveCount;
264 266
265 friend class SkPicturePlayback; 267 friend class SkPicturePlayback;
266 friend class SkPictureTester; // for unit testing 268 friend class SkPictureTester; // for unit testing
267 269
268 typedef SkCanvas INHERITED; 270 typedef SkCanvas INHERITED;
269 }; 271 };
270 272
271 #endif 273 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698