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

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

Issue 35543002: Revert "If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get be… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
« 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 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;
96 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 97 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
98 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
97 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 99 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
98 const SkPaint* paint) SK_OVERRIDE; 100 const SkPaint* paint) SK_OVERRIDE;
99 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 101 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
100 const SkRect& dst, const SkPaint* paint, 102 const SkRect& dst, const SkPaint* paint,
101 DrawBitmapRectFlags flags) SK_OVERRIDE; 103 DrawBitmapRectFlags flags) SK_OVERRIDE;
102 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, 104 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
103 const SkPaint* paint) SK_OVERRIDE; 105 const SkPaint* paint) SK_OVERRIDE;
104 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 106 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
105 const SkPaint* paint) SK_OVERRIDE; 107 const SkPaint* paint) SK_OVERRIDE;
106 virtual void drawText(const void* text, size_t byteLength, SkScalar x, 108 virtual void drawText(const void* text, size_t byteLength, SkScalar x,
(...skipping 10 matching lines...) Expand all
117 virtual void drawVertices(VertexMode vmode, int vertexCount, 119 virtual void drawVertices(VertexMode vmode, int vertexCount,
118 const SkPoint vertices[], const SkPoint texs[], 120 const SkPoint vertices[], const SkPoint texs[],
119 const SkColor colors[], SkXfermode* xmode, 121 const SkColor colors[], SkXfermode* xmode,
120 const uint16_t indices[], int indexCount, 122 const uint16_t indices[], int indexCount,
121 const SkPaint& paint) SK_OVERRIDE; 123 const SkPaint& paint) SK_OVERRIDE;
122 virtual void drawData(const void*, size_t) SK_OVERRIDE; 124 virtual void drawData(const void*, size_t) SK_OVERRIDE;
123 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 125 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
124 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 126 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
125 virtual void endCommentGroup() SK_OVERRIDE; 127 virtual void endCommentGroup() SK_OVERRIDE;
126 128
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
131 private: 129 private:
132 Dumper* fDumper; 130 Dumper* fDumper;
133 int fNestLevel; // for nesting recursive elements like pictures 131 int fNestLevel; // for nesting recursive elements like pictures
134 132
135 void dump(Verb, const SkPaint*, const char format[], ...); 133 void dump(Verb, const SkPaint*, const char format[], ...);
136 134
137 typedef SkCanvas INHERITED; 135 typedef SkCanvas INHERITED;
138 }; 136 };
139 137
140 /** Formats the draw commands, and send them to a function-pointer provided 138 /** Formats the draw commands, and send them to a function-pointer provided
(...skipping 21 matching lines...) Expand all
162 public: 160 public:
163 SkDebugfDumper(); 161 SkDebugfDumper();
164 162
165 private: 163 private:
166 typedef SkFormatDumper INHERITED; 164 typedef SkFormatDumper INHERITED;
167 }; 165 };
168 166
169 #endif 167 #endif
170 168
171 #endif 169 #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