Index: src/utils/SkLuaCanvas.cpp |
diff --git a/src/utils/SkLuaCanvas.cpp b/src/utils/SkLuaCanvas.cpp |
index 0f13073049e1797cd82ec173d8c235c2ea86e3ed..2679fd25bd327de1719f2c1bf6238d7b464d3332 100644 |
--- a/src/utils/SkLuaCanvas.cpp |
+++ b/src/utils/SkLuaCanvas.cpp |
@@ -81,13 +81,13 @@ |
SkLuaCanvas::~SkLuaCanvas() {} |
-int SkLuaCanvas::save(SaveFlags flags) { |
+void SkLuaCanvas::onSave(SaveFlags flags) { |
AUTO_LUA("save"); |
- return this->INHERITED::save(flags); |
-} |
- |
-int SkLuaCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint, |
- SaveFlags flags) { |
+ this->INHERITED::onSave(flags); |
+} |
+ |
+bool SkLuaCanvas::onSaveLayer(const SkRect* bounds, const SkPaint* paint, |
+ SaveFlags flags) { |
AUTO_LUA("saveLayer"); |
if (bounds) { |
lua.pushRect(*bounds, "bounds"); |
@@ -95,12 +95,15 @@ |
if (paint) { |
lua.pushPaint(*paint, "paint"); |
} |
- return this->INHERITED::save(flags); |
-} |
- |
-void SkLuaCanvas::restore() { |
+ |
+ this->INHERITED::onSaveLayer(bounds, paint, flags); |
+ // No need for a layer. |
+ return false; |
+} |
+ |
+void SkLuaCanvas::onRestore() { |
AUTO_LUA("restore"); |
- this->INHERITED::restore(); |
+ this->INHERITED::onRestore(); |
} |
bool SkLuaCanvas::translate(SkScalar dx, SkScalar dy) { |