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

Side by Side Diff: include/utils/SkDumpCanvas.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 SkDumpCanvas_DEFINED 8 #ifndef SkDumpCanvas_DEFINED
9 #define SkDumpCanvas_DEFINED 9 #define SkDumpCanvas_DEFINED
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE; 86 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE;
87 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE; 87 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE;
88 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE; 88 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE;
89 virtual bool clipRegion(const SkRegion& deviceRgn, 89 virtual bool clipRegion(const SkRegion& deviceRgn,
90 SkRegion::Op) SK_OVERRIDE; 90 SkRegion::Op) SK_OVERRIDE;
91 91
92 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 92 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
93 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 93 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
94 const SkPaint& paint) SK_OVERRIDE; 94 const SkPaint& paint) SK_OVERRIDE;
95 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 95 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
96 virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
97 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 96 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
98 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
99 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 97 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
100 const SkPaint* paint) SK_OVERRIDE; 98 const SkPaint* paint) SK_OVERRIDE;
101 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 99 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
102 const SkRect& dst, const SkPaint* paint, 100 const SkRect& dst, const SkPaint* paint,
103 DrawBitmapRectFlags flags) SK_OVERRIDE; 101 DrawBitmapRectFlags flags) SK_OVERRIDE;
104 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, 102 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
105 const SkPaint* paint) SK_OVERRIDE; 103 const SkPaint* paint) SK_OVERRIDE;
106 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 104 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
107 const SkPaint* paint) SK_OVERRIDE; 105 const SkPaint* paint) SK_OVERRIDE;
108 virtual void drawText(const void* text, size_t byteLength, SkScalar x, 106 virtual void drawText(const void* text, size_t byteLength, SkScalar x,
(...skipping 10 matching lines...) Expand all
119 virtual void drawVertices(VertexMode vmode, int vertexCount, 117 virtual void drawVertices(VertexMode vmode, int vertexCount,
120 const SkPoint vertices[], const SkPoint texs[], 118 const SkPoint vertices[], const SkPoint texs[],
121 const SkColor colors[], SkXfermode* xmode, 119 const SkColor colors[], SkXfermode* xmode,
122 const uint16_t indices[], int indexCount, 120 const uint16_t indices[], int indexCount,
123 const SkPaint& paint) SK_OVERRIDE; 121 const SkPaint& paint) SK_OVERRIDE;
124 virtual void drawData(const void*, size_t) SK_OVERRIDE; 122 virtual void drawData(const void*, size_t) SK_OVERRIDE;
125 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 123 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
126 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 124 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
127 virtual void endCommentGroup() SK_OVERRIDE; 125 virtual void endCommentGroup() SK_OVERRIDE;
128 126
127 protected:
128 virtual void onDrawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
129 virtual void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRID E;
130
129 private: 131 private:
130 Dumper* fDumper; 132 Dumper* fDumper;
131 int fNestLevel; // for nesting recursive elements like pictures 133 int fNestLevel; // for nesting recursive elements like pictures
132 134
133 void dump(Verb, const SkPaint*, const char format[], ...); 135 void dump(Verb, const SkPaint*, const char format[], ...);
134 136
135 typedef SkCanvas INHERITED; 137 typedef SkCanvas INHERITED;
136 }; 138 };
137 139
138 /** Formats the draw commands, and send them to a function-pointer provided 140 /** Formats the draw commands, and send them to a function-pointer provided
(...skipping 21 matching lines...) Expand all
160 public: 162 public:
161 SkDebugfDumper(); 163 SkDebugfDumper();
162 164
163 private: 165 private:
164 typedef SkFormatDumper INHERITED; 166 typedef SkFormatDumper INHERITED;
165 }; 167 };
166 168
167 #endif 169 #endif
168 170
169 #endif 171 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698