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

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

Issue 1530203002: Reland of move drawSprite from canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/SkPaintFilterCanvas.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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 void SkNWayCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, cons t SkRect& dst, 219 void SkNWayCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, cons t SkRect& dst,
220 const SkPaint* paint, SrcRectConstraint const raint) { 220 const SkPaint* paint, SrcRectConstraint const raint) {
221 Iter iter(fList); 221 Iter iter(fList);
222 while (iter.next()) { 222 while (iter.next()) {
223 iter->legacy_drawImageRect(image, src, dst, paint, constraint); 223 iter->legacy_drawImageRect(image, src, dst, paint, constraint);
224 } 224 }
225 } 225 }
226 226
227 void SkNWayCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPa int* paint) {
228 Iter iter(fList);
229 while (iter.next()) {
230 iter->drawSprite(bitmap, x, y, paint);
231 }
232 }
233
234 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y, 227 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y,
235 const SkPaint& paint) { 228 const SkPaint& paint) {
236 Iter iter(fList); 229 Iter iter(fList);
237 while (iter.next()) { 230 while (iter.next()) {
238 iter->drawText(text, byteLength, x, y, paint); 231 iter->drawText(text, byteLength, x, y, paint);
239 } 232 }
240 } 233 }
241 234
242 void SkNWayCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPo int pos[], 235 void SkNWayCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPo int pos[],
243 const SkPaint& paint) { 236 const SkPaint& paint) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 293 }
301 } 294 }
302 295
303 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) { 296 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) {
304 Iter iter(fList); 297 Iter iter(fList);
305 while (iter.next()) { 298 while (iter.next()) {
306 iter->setDrawFilter(filter); 299 iter->setDrawFilter(filter);
307 } 300 }
308 return this->INHERITED::setDrawFilter(filter); 301 return this->INHERITED::setDrawFilter(filter);
309 } 302 }
OLDNEW
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/SkPaintFilterCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698