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

Unified Diff: src/utils/SkLuaCanvas.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/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkLuaCanvas.cpp
diff --git a/src/utils/SkLuaCanvas.cpp b/src/utils/SkLuaCanvas.cpp
index 2679fd25bd327de1719f2c1bf6238d7b464d3332..0f13073049e1797cd82ec173d8c235c2ea86e3ed 100644
--- a/src/utils/SkLuaCanvas.cpp
+++ b/src/utils/SkLuaCanvas.cpp
@@ -81,13 +81,13 @@ SkLuaCanvas::SkLuaCanvas(int width, int height, lua_State* L, const char func[])
SkLuaCanvas::~SkLuaCanvas() {}
-void SkLuaCanvas::onSave(SaveFlags flags) {
+int SkLuaCanvas::save(SaveFlags flags) {
AUTO_LUA("save");
- this->INHERITED::onSave(flags);
+ return this->INHERITED::save(flags);
}
-bool SkLuaCanvas::onSaveLayer(const SkRect* bounds, const SkPaint* paint,
- SaveFlags flags) {
+int SkLuaCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint,
+ SaveFlags flags) {
AUTO_LUA("saveLayer");
if (bounds) {
lua.pushRect(*bounds, "bounds");
@@ -95,15 +95,12 @@ bool SkLuaCanvas::onSaveLayer(const SkRect* bounds, const SkPaint* paint,
if (paint) {
lua.pushPaint(*paint, "paint");
}
-
- this->INHERITED::onSaveLayer(bounds, paint, flags);
- // No need for a layer.
- return false;
+ return this->INHERITED::save(flags);
}
-void SkLuaCanvas::onRestore() {
+void SkLuaCanvas::restore() {
AUTO_LUA("restore");
- this->INHERITED::onRestore();
+ this->INHERITED::restore();
}
bool SkLuaCanvas::translate(SkScalar dx, SkScalar dy) {
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698