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

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

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: propogate Constraint into SkDevice Created 5 years, 5 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 #include "SkNWayCanvas.h" 8 #include "SkNWayCanvas.h"
9 9
10 SkNWayCanvas::SkNWayCanvas(int width, int height) 10 SkNWayCanvas::SkNWayCanvas(int width, int height)
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 void SkNWayCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top , 212 void SkNWayCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top ,
213 const SkPaint* paint) { 213 const SkPaint* paint) {
214 Iter iter(fList); 214 Iter iter(fList);
215 while (iter.next()) { 215 while (iter.next()) {
216 iter->drawImage(image, left, top, paint); 216 iter->drawImage(image, left, top, paint);
217 } 217 }
218 } 218 }
219 219
220 void SkNWayCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, cons t SkRect& dst, 220 void SkNWayCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, cons t SkRect& dst,
221 const SkPaint* paint) { 221 const SkPaint* paint SRC_RECT_CONSTRAINT_PARA M(constraint)) {
222 Iter iter(fList); 222 Iter iter(fList);
223 while (iter.next()) { 223 while (iter.next()) {
224 iter->drawImageRect(image, src, dst, paint); 224 iter->drawImageRect(image, src, dst, paint SRC_RECT_CONSTRAINT_ARG(const raint));
225 } 225 }
226 } 226 }
227 227
228 void SkNWayCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPa int* paint) { 228 void SkNWayCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPa int* paint) {
229 Iter iter(fList); 229 Iter iter(fList);
230 while (iter.next()) { 230 while (iter.next()) {
231 iter->drawSprite(bitmap, x, y, paint); 231 iter->drawSprite(bitmap, x, y, paint);
232 } 232 }
233 } 233 }
234 234
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 } 302 }
303 303
304 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) { 304 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) {
305 Iter iter(fList); 305 Iter iter(fList);
306 while (iter.next()) { 306 while (iter.next()) {
307 iter->setDrawFilter(filter); 307 iter->setDrawFilter(filter);
308 } 308 }
309 return this->INHERITED::setDrawFilter(filter); 309 return this->INHERITED::setDrawFilter(filter);
310 } 310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698