Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 0598528ba2c5805f8f2c9f339f3ae002d303f991..6c0fc884e1a53472f3a3681df8537c69dc283c6a 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -834,6 +834,11 @@ void SkCanvas::willSave(SaveFlags) { |
// Do nothing. Subclasses may do something. |
} |
+int SkCanvas::save() { |
+ this->willSave(kMatrixClip_SaveFlag); |
+ return this->internalSave(kMatrixClip_SaveFlag); |
+} |
+ |
int SkCanvas::save(SaveFlags flags) { |
this->willSave(flags); |
// call shared impl |
@@ -898,9 +903,13 @@ SkCanvas::SaveLayerStrategy SkCanvas::willSaveLayer(const SkRect*, const SkPaint |
return kFullLayer_SaveLayerStrategy; |
} |
+int SkCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint) { |
+ SaveLayerStrategy strategy = this->willSaveLayer(bounds, paint, kARGB_ClipLayer_SaveFlag); |
+ return this->internalSaveLayer(bounds, paint, kARGB_ClipLayer_SaveFlag, false, strategy); |
+} |
+ |
int SkCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint, |
SaveFlags flags) { |
- // Overriding classes may return false to signal that we don't need to create a layer. |
SaveLayerStrategy strategy = this->willSaveLayer(bounds, paint, flags); |
return this->internalSaveLayer(bounds, paint, flags, false, strategy); |
} |
@@ -975,6 +984,10 @@ int SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Save |
return count; |
} |
+int SkCanvas::saveLayerAlpha(const SkRect* bounds, U8CPU alpha) { |
+ return this->saveLayerAlpha(bounds, alpha, kARGB_ClipLayer_SaveFlag); |
+} |
+ |
int SkCanvas::saveLayerAlpha(const SkRect* bounds, U8CPU alpha, |
SaveFlags flags) { |
if (0xFF == alpha) { |