Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index a76f5a3b9f1709f6b5ed4b9d4509f148143cb603..e5ca9ce6c13f4edd40a2c2da396bdba99f6e35fa 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1134,6 +1134,18 @@ uint32_t SkCanvas::SaveFlagsToSaveLayerFlags(SaveFlags flags) { |
} |
return layerFlags; |
} |
+ |
+uint32_t SkCanvas::SaveLayerFlagsToSaveFlags(SaveLayerFlags layerFlags) { |
+ uint32_t saveFlags = 0; |
+ |
+ if (0 == (layerFlags & kDontClipToLayer_PrivateSaveLayerFlag)) { |
+ saveFlags |= kClipToLayer_SaveFlag; |
+ } |
+ if (0 == (layerFlags & kIsOpaque_SaveLayerFlag)) { |
+ saveFlags |= kHasAlphaLayer_SaveFlag; |
+ } |
+ return saveFlags; |
+} |
#endif |
int SkCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint) { |