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

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

Issue 313613004: Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add staging entry point for Chromium and Android Created 6 years, 6 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
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; 83 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
84 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 84 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
85 const SkPaint* paint) SK_OVERRIDE; 85 const SkPaint* paint) SK_OVERRIDE;
86 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 86 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
87 const SkRect& dst, const SkPaint* paint, 87 const SkRect& dst, const SkPaint* paint,
88 DrawBitmapRectFlags flags) SK_OVERRIDE; 88 DrawBitmapRectFlags flags) SK_OVERRIDE;
89 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, 89 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
90 const SkPaint* paint) SK_OVERRIDE; 90 const SkPaint* paint) SK_OVERRIDE;
91 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 91 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
92 const SkPaint* paint) SK_OVERRIDE; 92 const SkPaint* paint) SK_OVERRIDE;
93 virtual void drawPicture(SkPicture&) SK_OVERRIDE;
94 virtual void drawVertices(VertexMode vmode, int vertexCount, 93 virtual void drawVertices(VertexMode vmode, int vertexCount,
95 const SkPoint vertices[], const SkPoint texs[], 94 const SkPoint vertices[], const SkPoint texs[],
96 const SkColor colors[], SkXfermode* xmode, 95 const SkColor colors[], SkXfermode* xmode,
97 const uint16_t indices[], int indexCount, 96 const uint16_t indices[], int indexCount,
98 const SkPaint& paint) SK_OVERRIDE; 97 const SkPaint& paint) SK_OVERRIDE;
99 virtual void drawData(const void*, size_t) SK_OVERRIDE; 98 virtual void drawData(const void*, size_t) SK_OVERRIDE;
100 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 99 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
101 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 100 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
102 virtual void endCommentGroup() SK_OVERRIDE; 101 virtual void endCommentGroup() SK_OVERRIDE;
103 102
(...skipping 15 matching lines...) Expand all
119 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 118 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
120 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 119 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
121 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; 120 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE;
122 virtual void onPopCull() SK_OVERRIDE; 121 virtual void onPopCull() SK_OVERRIDE;
123 122
124 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 123 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
125 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 124 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
126 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 125 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
127 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 126 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
128 127
128 virtual void onDrawPicture(const SkPicture*) SK_OVERRIDE;
129
129 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle); 130 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle);
130 131
131 private: 132 private:
132 Dumper* fDumper; 133 Dumper* fDumper;
133 int fNestLevel; // for nesting recursive elements like pictures 134 int fNestLevel; // for nesting recursive elements like pictures
134 135
135 void dump(Verb, const SkPaint*, const char format[], ...); 136 void dump(Verb, const SkPaint*, const char format[], ...);
136 137
137 typedef SkCanvas INHERITED; 138 typedef SkCanvas INHERITED;
138 }; 139 };
(...skipping 23 matching lines...) Expand all
162 public: 163 public:
163 SkDebugfDumper(); 164 SkDebugfDumper();
164 165
165 private: 166 private:
166 typedef SkFormatDumper INHERITED; 167 typedef SkFormatDumper INHERITED;
167 }; 168 };
168 169
169 #endif 170 #endif
170 171
171 #endif 172 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698