OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 | 8 |
9 | 9 |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 addDrawCommand(new SkClipRegionCommand(region, op)); | 269 addDrawCommand(new SkClipRegionCommand(region, op)); |
270 return true; | 270 return true; |
271 } | 271 } |
272 | 272 |
273 bool SkDebugCanvas::concat(const SkMatrix& matrix) { | 273 bool SkDebugCanvas::concat(const SkMatrix& matrix) { |
274 addDrawCommand(new SkConcatCommand(matrix)); | 274 addDrawCommand(new SkConcatCommand(matrix)); |
275 return true; | 275 return true; |
276 } | 276 } |
277 | 277 |
278 void SkDebugCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar left, | 278 void SkDebugCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar left, |
279 SkScalar top, const SkPaint* paint = NULL) { | 279 SkScalar top, const SkPaint* paint = NULL) { |
280 addDrawCommand(new SkDrawBitmapCommand(bitmap, left, top, paint)); | 280 addDrawCommand(new SkDrawBitmapCommand(bitmap, left, top, paint)); |
281 } | 281 } |
282 | 282 |
283 void SkDebugCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, | 283 void SkDebugCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, |
284 const SkRect* src, const SkRect& dst, const SkPaint* paint) { | 284 const SkRect* src, const SkRect& dst, |
285 addDrawCommand(new SkDrawBitmapRectCommand(bitmap, src, dst, paint)); | 285 const SkPaint* paint, |
| 286 SkCanvas::DrawBitmapRectFlags flags) { |
| 287 addDrawCommand(new SkDrawBitmapRectCommand(bitmap, src, dst, paint, flags)); |
286 } | 288 } |
287 | 289 |
288 void SkDebugCanvas::drawBitmapMatrix(const SkBitmap& bitmap, | 290 void SkDebugCanvas::drawBitmapMatrix(const SkBitmap& bitmap, |
289 const SkMatrix& matrix, const SkPaint* paint) { | 291 const SkMatrix& matrix, const SkPaint* pain
t) { |
290 addDrawCommand(new SkDrawBitmapMatrixCommand(bitmap, matrix, paint)); | 292 addDrawCommand(new SkDrawBitmapMatrixCommand(bitmap, matrix, paint)); |
291 } | 293 } |
292 | 294 |
293 void SkDebugCanvas::drawBitmapNine(const SkBitmap& bitmap, | 295 void SkDebugCanvas::drawBitmapNine(const SkBitmap& bitmap, |
294 const SkIRect& center, const SkRect& dst, const SkPaint* paint) { | 296 const SkIRect& center, const SkRect& dst, const SkPaint* paint) { |
295 addDrawCommand(new SkDrawBitmapNineCommand(bitmap, center, dst, paint)); | 297 addDrawCommand(new SkDrawBitmapNineCommand(bitmap, center, dst, paint)); |
296 } | 298 } |
297 | 299 |
298 void SkDebugCanvas::drawData(const void* data, size_t length) { | 300 void SkDebugCanvas::drawData(const void* data, size_t length) { |
299 addDrawCommand(new SkDrawDataCommand(data, length)); | 301 addDrawCommand(new SkDrawDataCommand(data, length)); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 414 |
413 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { | 415 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { |
414 addDrawCommand(new SkTranslateCommand(dx, dy)); | 416 addDrawCommand(new SkTranslateCommand(dx, dy)); |
415 return true; | 417 return true; |
416 } | 418 } |
417 | 419 |
418 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 420 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
419 SkASSERT(index < fCommandVector.count()); | 421 SkASSERT(index < fCommandVector.count()); |
420 fCommandVector[index]->setVisible(toggle); | 422 fCommandVector[index]->setVisible(toggle); |
421 } | 423 } |
OLD | NEW |