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

Unified Diff: src/core/SkCanvas.cpp

Issue 1559873003: Add conversion from SaveLayerFlags to SaveFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 12 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 | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698