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