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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 } | 418 } |
419 | 419 |
420 void SkDebugCanvas::drawVertices(VertexMode vmode, int vertexCount, | 420 void SkDebugCanvas::drawVertices(VertexMode vmode, int vertexCount, |
421 const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], | 421 const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], |
422 SkXfermode*, const uint16_t indices[], int indexCount, | 422 SkXfermode*, const uint16_t indices[], int indexCount, |
423 const SkPaint& paint) { | 423 const SkPaint& paint) { |
424 addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices, | 424 addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices, |
425 texs, colors, NULL, indices, indexCount, paint)); | 425 texs, colors, NULL, indices, indexCount, paint)); |
426 } | 426 } |
427 | 427 |
| 428 void SkDebugCanvas::onPushCull(const SkRect& cullRect) { |
| 429 addDrawCommand(new SkPushCullCommand(cullRect)); |
| 430 } |
| 431 |
| 432 void SkDebugCanvas::onPopCull() { |
| 433 addDrawCommand(new SkPopCullCommand()); |
| 434 } |
| 435 |
428 void SkDebugCanvas::restore() { | 436 void SkDebugCanvas::restore() { |
429 addDrawCommand(new SkRestoreCommand()); | 437 addDrawCommand(new SkRestoreCommand()); |
430 } | 438 } |
431 | 439 |
432 bool SkDebugCanvas::rotate(SkScalar degrees) { | 440 bool SkDebugCanvas::rotate(SkScalar degrees) { |
433 addDrawCommand(new SkRotateCommand(degrees)); | 441 addDrawCommand(new SkRotateCommand(degrees)); |
434 return true; | 442 return true; |
435 } | 443 } |
436 | 444 |
437 int SkDebugCanvas::save(SaveFlags flags) { | 445 int SkDebugCanvas::save(SaveFlags flags) { |
(...skipping 23 matching lines...) Expand all Loading... |
461 | 469 |
462 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { | 470 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { |
463 addDrawCommand(new SkTranslateCommand(dx, dy)); | 471 addDrawCommand(new SkTranslateCommand(dx, dy)); |
464 return true; | 472 return true; |
465 } | 473 } |
466 | 474 |
467 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 475 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
468 SkASSERT(index < fCommandVector.count()); | 476 SkASSERT(index < fCommandVector.count()); |
469 fCommandVector[index]->setVisible(toggle); | 477 fCommandVector[index]->setVisible(toggle); |
470 } | 478 } |
OLD | NEW |