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

Unified Diff: src/utils/debugger/SkDebugCanvas.cpp

Issue 194923008: Revert "De-virtualize SkCanvas save/restore." (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDebugCanvas.cpp
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 67ecc65b08689742c35bf77a6be5821f1358ce2d..08e6d94f9e58eb717f363b9a50e70ffd624bc6f9 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -530,9 +530,8 @@ void SkDebugCanvas::onPopCull() {
this->addDrawCommand(new SkPopCullCommand());
}
-void SkDebugCanvas::onRestore() {
- this->addDrawCommand(new SkRestoreCommand());
- this->INHERITED::onRestore();
+void SkDebugCanvas::restore() {
+ addDrawCommand(new SkRestoreCommand());
}
bool SkDebugCanvas::rotate(SkScalar degrees) {
@@ -540,17 +539,15 @@ bool SkDebugCanvas::rotate(SkScalar degrees) {
return true;
}
-void SkDebugCanvas::onSave(SaveFlags flags) {
- this->addDrawCommand(new SkSaveCommand(flags));
- this->INHERITED::onSave(flags);
+int SkDebugCanvas::save(SaveFlags flags) {
+ addDrawCommand(new SkSaveCommand(flags));
+ return true;
}
-bool SkDebugCanvas::onSaveLayer(const SkRect* bounds, const SkPaint* paint,
- SaveFlags flags) {
- this->addDrawCommand(new SkSaveLayerCommand(bounds, paint, flags));
- this->INHERITED::onSaveLayer(bounds, paint, flags);
- // No need for a full layer.
- return false;
+int SkDebugCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint,
+ SaveFlags flags) {
+ addDrawCommand(new SkSaveLayerCommand(bounds, paint, flags));
+ return true;
}
bool SkDebugCanvas::scale(SkScalar sx, SkScalar sy) {
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698