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

Unified Diff: src/utils/SkDumpCanvas.cpp

Issue 194713008: De-virtualize SkCanvas save/restore. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebased 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/SkDeferredCanvas.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDumpCanvas.cpp
diff --git a/src/utils/SkDumpCanvas.cpp b/src/utils/SkDumpCanvas.cpp
index 4805d6287c5203df9dab37ddbda95d5543ee0841..af59cd63807cdfcc4d29995d6afae468bd1759e8 100644
--- a/src/utils/SkDumpCanvas.cpp
+++ b/src/utils/SkDumpCanvas.cpp
@@ -192,13 +192,13 @@ void SkDumpCanvas::dump(Verb verb, const SkPaint* paint,
///////////////////////////////////////////////////////////////////////////////
-int SkDumpCanvas::save(SaveFlags flags) {
+void SkDumpCanvas::willSave(SaveFlags flags) {
this->dump(kSave_Verb, NULL, "save(0x%X)", flags);
- return this->INHERITED::save(flags);
+ this->INHERITED::willSave(flags);
}
-int SkDumpCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint,
- SaveFlags flags) {
+SkCanvas::SaveLayerStrategy SkDumpCanvas::willSaveLayer(const SkRect* bounds, const SkPaint* paint,
+ SaveFlags flags) {
SkString str;
str.printf("saveLayer(0x%X)", flags);
if (bounds) {
@@ -214,12 +214,12 @@ int SkDumpCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint,
}
}
this->dump(kSave_Verb, paint, str.c_str());
- return this->INHERITED::saveLayer(bounds, paint, flags);
+ return this->INHERITED::willSaveLayer(bounds, paint, flags);
}
-void SkDumpCanvas::restore() {
- this->INHERITED::restore();
+void SkDumpCanvas::willRestore() {
this->dump(kRestore_Verb, NULL, "restore");
+ this->INHERITED::willRestore();
}
bool SkDumpCanvas::translate(SkScalar dx, SkScalar dy) {
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698