Index: src/utils/SkDeferredCanvas.cpp |
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp |
index efe750188e7103b190782c537032d9cd6b4f5a47..8b617b30e8f1fcb4ad941ab016bf0fc69e79ce59 100644 |
--- a/src/utils/SkDeferredCanvas.cpp |
+++ b/src/utils/SkDeferredCanvas.cpp |
@@ -739,28 +739,25 @@ |
SkIntToScalar(canvasSize.fWidth), SkIntToScalar(canvasSize.fHeight))); |
} |
-int SkDeferredCanvas::save(SaveFlags flags) { |
+void SkDeferredCanvas::onSave(SaveFlags flags) { |
this->drawingCanvas()->save(flags); |
- int val = this->INHERITED::save(flags); |
- this->recordedDrawCommand(); |
- |
- return val; |
-} |
- |
-int SkDeferredCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint, |
- SaveFlags flags) { |
+ this->recordedDrawCommand(); |
+ this->INHERITED::onSave(flags); |
+} |
+ |
+bool SkDeferredCanvas::onSaveLayer(const SkRect* bounds, const SkPaint* paint, |
+ SaveFlags flags) { |
this->drawingCanvas()->saveLayer(bounds, paint, flags); |
- int count = this->INHERITED::save(flags); |
- this->clipRectBounds(bounds, flags, NULL); |
- this->recordedDrawCommand(); |
- |
- return count; |
-} |
- |
-void SkDeferredCanvas::restore() { |
+ this->recordedDrawCommand(); |
+ this->INHERITED::onSaveLayer(bounds, paint, flags); |
+ // No need for a full layer. |
+ return false; |
+} |
+ |
+void SkDeferredCanvas::onRestore() { |
this->drawingCanvas()->restore(); |
- this->INHERITED::restore(); |
- this->recordedDrawCommand(); |
+ this->recordedDrawCommand(); |
+ this->INHERITED::onRestore(); |
} |
bool SkDeferredCanvas::isDrawingToLayer() const { |