| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkClipStack.h" | 8 #include "SkClipStack.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkDebugCanvas.h" | 10 #include "SkDebugCanvas.h" |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 void SkDebugCanvas::willRestore() { | 517 void SkDebugCanvas::willRestore() { |
| 518 this->addDrawCommand(new SkRestoreCommand()); | 518 this->addDrawCommand(new SkRestoreCommand()); |
| 519 this->INHERITED::willRestore(); | 519 this->INHERITED::willRestore(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void SkDebugCanvas::willSave() { | 522 void SkDebugCanvas::willSave() { |
| 523 this->addDrawCommand(new SkSaveCommand()); | 523 this->addDrawCommand(new SkSaveCommand()); |
| 524 this->INHERITED::willSave(); | 524 this->INHERITED::willSave(); |
| 525 } | 525 } |
| 526 | 526 |
| 527 SkCanvas::SaveLayerStrategy SkDebugCanvas::willSaveLayer(const SkRect* bounds, c
onst SkPaint* paint, | 527 SkCanvas::SaveLayerStrategy SkDebugCanvas::getSaveLayerStrategy(const SaveLayerR
ec& rec) { |
| 528 SaveFlags flags) { | 528 this->addDrawCommand(new SkSaveLayerCommand(rec)); |
| 529 this->addDrawCommand(new SkSaveLayerCommand(bounds, paint, flags)); | 529 (void)this->INHERITED::getSaveLayerStrategy(rec); |
| 530 this->INHERITED::willSaveLayer(bounds, paint, flags); | |
| 531 // No need for a full layer. | 530 // No need for a full layer. |
| 532 return kNoLayer_SaveLayerStrategy; | 531 return kNoLayer_SaveLayerStrategy; |
| 533 } | 532 } |
| 534 | 533 |
| 535 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { | 534 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { |
| 536 this->addDrawCommand(new SkSetMatrixCommand(matrix)); | 535 this->addDrawCommand(new SkSetMatrixCommand(matrix)); |
| 537 this->INHERITED::didSetMatrix(matrix); | 536 this->INHERITED::didSetMatrix(matrix); |
| 538 } | 537 } |
| 539 | 538 |
| 540 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 539 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 } | 658 } |
| 660 | 659 |
| 661 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 660 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
| 662 if (fCalledAddStackData) { | 661 if (fCalledAddStackData) { |
| 663 fClipStackData.appendf("<br>"); | 662 fClipStackData.appendf("<br>"); |
| 664 addPathData(devPath, "pathOut"); | 663 addPathData(devPath, "pathOut"); |
| 665 return true; | 664 return true; |
| 666 } | 665 } |
| 667 return false; | 666 return false; |
| 668 } | 667 } |
| OLD | NEW |