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

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

Issue 1272713005: flag to use const& instead of const* for src-rect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 Iter iter(fList); 189 Iter iter(fList);
190 while (iter.next()) { 190 while (iter.next()) {
191 iter->drawBitmap(bitmap, x, y, paint); 191 iter->drawBitmap(bitmap, x, y, paint);
192 } 192 }
193 } 193 }
194 194
195 void SkNWayCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, c onst SkRect& dst, 195 void SkNWayCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, c onst SkRect& dst,
196 const SkPaint* paint, SrcRectConstraint cons traint) { 196 const SkPaint* paint, SrcRectConstraint cons traint) {
197 Iter iter(fList); 197 Iter iter(fList);
198 while (iter.next()) { 198 while (iter.next()) {
199 iter->drawBitmapRect(bitmap, src, dst, paint, (SrcRectConstraint)constra int); 199 iter->legacy_drawBitmapRect(bitmap, src, dst, paint, (SrcRectConstraint) constraint);
200 } 200 }
201 } 201 }
202 202
203 void SkNWayCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& cente r, 203 void SkNWayCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& cente r,
204 const SkRect& dst, const SkPaint* paint) { 204 const SkRect& dst, const SkPaint* paint) {
205 Iter iter(fList); 205 Iter iter(fList);
206 while (iter.next()) { 206 while (iter.next()) {
207 iter->drawBitmapNine(bitmap, center, dst, paint); 207 iter->drawBitmapNine(bitmap, center, dst, paint);
208 } 208 }
209 } 209 }
210 210
211 void SkNWayCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top , 211 void SkNWayCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top ,
212 const SkPaint* paint) { 212 const SkPaint* paint) {
213 Iter iter(fList); 213 Iter iter(fList);
214 while (iter.next()) { 214 while (iter.next()) {
215 iter->drawImage(image, left, top, paint); 215 iter->drawImage(image, left, top, paint);
216 } 216 }
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->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) { 227 void SkNWayCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPa int* paint) {
228 Iter iter(fList); 228 Iter iter(fList);
229 while (iter.next()) { 229 while (iter.next()) {
230 iter->drawSprite(bitmap, x, y, paint); 230 iter->drawSprite(bitmap, x, y, paint);
231 } 231 }
232 } 232 }
233 233
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 } 301 }
302 302
303 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) { 303 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) {
304 Iter iter(fList); 304 Iter iter(fList);
305 while (iter.next()) { 305 while (iter.next()) {
306 iter->setDrawFilter(filter); 306 iter->setDrawFilter(filter);
307 } 307 }
308 return this->INHERITED::setDrawFilter(filter); 308 return this->INHERITED::setDrawFilter(filter);
309 } 309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698