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

Side by Side Diff: src/utils/SkNWayCanvas.cpp

Issue 835913002: Revert of move remaining virtual draw methods to onDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/SkProxyCanvas.cpp » ('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 #include "SkNWayCanvas.h" 8 #include "SkNWayCanvas.h"
9 9
10 SkNWayCanvas::SkNWayCanvas(int width, int height) 10 SkNWayCanvas::SkNWayCanvas(int width, int height)
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 void SkNWayCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 129 void SkNWayCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
130 Iter iter(fList); 130 Iter iter(fList);
131 while (iter.next()) { 131 while (iter.next()) {
132 iter->clipRegion(deviceRgn, op); 132 iter->clipRegion(deviceRgn, op);
133 } 133 }
134 this->INHERITED::onClipRegion(deviceRgn, op); 134 this->INHERITED::onClipRegion(deviceRgn, op);
135 } 135 }
136 136
137 void SkNWayCanvas::onDrawPaint(const SkPaint& paint) { 137 void SkNWayCanvas::drawPaint(const SkPaint& paint) {
138 Iter iter(fList); 138 Iter iter(fList);
139 while (iter.next()) { 139 while (iter.next()) {
140 iter->drawPaint(paint); 140 iter->drawPaint(paint);
141 } 141 }
142 } 142 }
143 143
144 void SkNWayCanvas::onDrawPoints(PointMode mode, size_t count, const SkPoint pts[ ], 144 void SkNWayCanvas::drawPoints(PointMode mode, size_t count, const SkPoint pts[],
145 const SkPaint& paint) { 145 const SkPaint& paint) {
146 Iter iter(fList); 146 Iter iter(fList);
147 while (iter.next()) { 147 while (iter.next()) {
148 iter->drawPoints(mode, count, pts, paint); 148 iter->drawPoints(mode, count, pts, paint);
149 } 149 }
150 } 150 }
151 151
152 void SkNWayCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { 152 void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
153 Iter iter(fList); 153 Iter iter(fList);
154 while (iter.next()) { 154 while (iter.next()) {
155 iter->drawRect(rect, paint); 155 iter->drawRect(rect, paint);
156 } 156 }
157 } 157 }
158 158
159 void SkNWayCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { 159 void SkNWayCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
160 Iter iter(fList); 160 Iter iter(fList);
161 while (iter.next()) { 161 while (iter.next()) {
162 iter->drawOval(rect, paint); 162 iter->drawOval(rect, paint);
163 } 163 }
164 } 164 }
165 165
166 void SkNWayCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { 166 void SkNWayCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
167 Iter iter(fList); 167 Iter iter(fList);
168 while (iter.next()) { 168 while (iter.next()) {
169 iter->drawRRect(rrect, paint); 169 iter->drawRRect(rrect, paint);
170 } 170 }
171 } 171 }
172 172
173 void SkNWayCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, 173 void SkNWayCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner,
174 const SkPaint& paint) { 174 const SkPaint& paint) {
175 Iter iter(fList); 175 Iter iter(fList);
176 while (iter.next()) { 176 while (iter.next()) {
177 iter->drawDRRect(outer, inner, paint); 177 iter->drawDRRect(outer, inner, paint);
178 } 178 }
179 } 179 }
180 180
181 void SkNWayCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { 181 void SkNWayCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
182 Iter iter(fList); 182 Iter iter(fList);
183 while (iter.next()) { 183 while (iter.next()) {
184 iter->drawPath(path, paint); 184 iter->drawPath(path, paint);
185 } 185 }
186 } 186 }
187 187
188 void SkNWayCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, 188 void SkNWayCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
189 const SkPaint* paint) { 189 const SkPaint* paint) {
190 Iter iter(fList); 190 Iter iter(fList);
191 while (iter.next()) { 191 while (iter.next()) {
192 iter->drawBitmap(bitmap, x, y, paint); 192 iter->drawBitmap(bitmap, x, y, paint);
193 } 193 }
194 } 194 }
195 195
196 void SkNWayCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, c onst SkRect& dst, 196 void SkNWayCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* sr c,
197 const SkPaint* paint, DrawBitmapRectFlags fl ags) { 197 const SkRect& dst, const SkPaint* paint,
198 DrawBitmapRectFlags flags) {
198 Iter iter(fList); 199 Iter iter(fList);
199 while (iter.next()) { 200 while (iter.next()) {
200 iter->drawBitmapRectToRect(bitmap, src, dst, paint, flags); 201 iter->drawBitmapRectToRect(bitmap, src, dst, paint, flags);
201 } 202 }
202 } 203 }
203 204
204 void SkNWayCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& cente r, 205 void SkNWayCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
205 const SkRect& dst, const SkPaint* paint) { 206 const SkRect& dst, const SkPaint* paint) {
206 Iter iter(fList); 207 Iter iter(fList);
207 while (iter.next()) { 208 while (iter.next()) {
208 iter->drawBitmapNine(bitmap, center, dst, paint); 209 iter->drawBitmapNine(bitmap, center, dst, paint);
209 } 210 }
210 } 211 }
211 212
212 void SkNWayCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top , 213 void SkNWayCanvas::drawImage(const SkImage* image, SkScalar left, SkScalar top,
213 const SkPaint* paint) { 214 const SkPaint* paint) {
214 Iter iter(fList); 215 Iter iter(fList);
215 while (iter.next()) { 216 while (iter.next()) {
216 iter->drawImage(image, left, top, paint); 217 iter->drawImage(image, left, top, paint);
217 } 218 }
218 } 219 }
219 220
220 void SkNWayCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, cons t SkRect& dst, 221 void SkNWayCanvas::drawImageRect(const SkImage* image, const SkRect* src,
221 const SkPaint* paint) { 222 const SkRect& dst,
223 const SkPaint* paint) {
222 Iter iter(fList); 224 Iter iter(fList);
223 while (iter.next()) { 225 while (iter.next()) {
224 iter->drawImageRect(image, src, dst, paint); 226 iter->drawImageRect(image, src, dst, paint);
225 } 227 }
226 } 228 }
227 229
228 void SkNWayCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPa int* paint) { 230 void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
231 const SkPaint* paint) {
229 Iter iter(fList); 232 Iter iter(fList);
230 while (iter.next()) { 233 while (iter.next()) {
231 iter->drawSprite(bitmap, x, y, paint); 234 iter->drawSprite(bitmap, x, y, paint);
232 } 235 }
233 } 236 }
234 237
235 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y, 238 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y,
236 const SkPaint& paint) { 239 const SkPaint& paint) {
237 Iter iter(fList); 240 Iter iter(fList);
238 while (iter.next()) { 241 while (iter.next()) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 276 }
274 277
275 void SkNWayCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matri x, 278 void SkNWayCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matri x,
276 const SkPaint* paint) { 279 const SkPaint* paint) {
277 Iter iter(fList); 280 Iter iter(fList);
278 while (iter.next()) { 281 while (iter.next()) {
279 iter->drawPicture(picture, matrix, paint); 282 iter->drawPicture(picture, matrix, paint);
280 } 283 }
281 } 284 }
282 285
283 void SkNWayCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 286 void SkNWayCanvas::drawVertices(VertexMode vmode, int vertexCount,
284 const SkPoint vertices[], const SkPoint texs[] , 287 const SkPoint vertices[], const SkPoint texs[],
285 const SkColor colors[], SkXfermode* xmode, 288 const SkColor colors[], SkXfermode* xmode,
286 const uint16_t indices[], int indexCount, 289 const uint16_t indices[], int indexCount,
287 const SkPaint& paint) { 290 const SkPaint& paint) {
288 Iter iter(fList); 291 Iter iter(fList);
289 while (iter.next()) { 292 while (iter.next()) {
290 iter->drawVertices(vmode, vertexCount, vertices, texs, colors, xmode, 293 iter->drawVertices(vmode, vertexCount, vertices, texs, colors, xmode,
291 indices, indexCount, paint); 294 indices, indexCount, paint);
292 } 295 }
293 } 296 }
294 297
295 void SkNWayCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4] , 298 void SkNWayCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4] ,
296 const SkPoint texCoords[4], SkXfermode* xmode, 299 const SkPoint texCoords[4], SkXfermode* xmode,
297 const SkPaint& paint) { 300 const SkPaint& paint) {
(...skipping 24 matching lines...) Expand all
322 iter->addComment(kywd, value); 325 iter->addComment(kywd, value);
323 } 326 }
324 } 327 }
325 328
326 void SkNWayCanvas::endCommentGroup() { 329 void SkNWayCanvas::endCommentGroup() {
327 Iter iter(fList); 330 Iter iter(fList);
328 while (iter.next()) { 331 while (iter.next()) {
329 iter->endCommentGroup(); 332 iter->endCommentGroup();
330 } 333 }
331 } 334 }
OLDNEW
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/SkProxyCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698