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

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

Issue 197553002: Revert of Revert of 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 @@
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 @@
return true;
}
-void SkDebugCanvas::onSave(SaveFlags flags) {
- this->addDrawCommand(new SkSaveCommand(flags));
- this->INHERITED::onSave(flags);
-}
-
-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::save(SaveFlags flags) {
+ addDrawCommand(new SkSaveCommand(flags));
+ return true;
+}
+
+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