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

Unified Diff: src/utils/debugger/SkDrawCommand.cpp

Issue 249253003: Hide SaveFlags from the public SkCanvas API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Suppress the canvas-state GM. Created 6 years, 8 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 | « src/utils/debugger/SkDrawCommand.h ('k') | src/utils/debugger/SkObjectParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDrawCommand.cpp
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp
index 079961ae701b30eb1b41c4ff72cc8d6437e31c92..0075ce322115213f939f060ecd3d6e1ba6eec881 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -840,14 +840,18 @@ void SkRotateCommand::execute(SkCanvas* canvas) {
canvas->rotate(fDegrees);
}
-SkSaveCommand::SkSaveCommand(SkCanvas::SaveFlags flags)
+SkSaveCommand::SkSaveCommand(unsigned flags)
: INHERITED(SAVE) {
fFlags = flags;
fInfo.push(SkObjectParser::SaveFlagsToString(flags));
}
void SkSaveCommand::execute(SkCanvas* canvas) {
- canvas->save(fFlags);
+ canvas->save(
+#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS
+ (SkCanvas::SaveFlags)fFlags
+#endif
+ );
}
void SkSaveCommand::trackSaveState(int* state) {
@@ -855,7 +859,7 @@ void SkSaveCommand::trackSaveState(int* state) {
}
SkSaveLayerCommand::SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint,
- SkCanvas::SaveFlags flags)
+ unsigned flags)
: INHERITED(SAVE_LAYER) {
if (NULL != bounds) {
fBounds = *bounds;
@@ -882,8 +886,11 @@ SkSaveLayerCommand::SkSaveLayerCommand(const SkRect* bounds, const SkPaint* pain
void SkSaveLayerCommand::execute(SkCanvas* canvas) {
canvas->saveLayer(fBounds.isEmpty() ? NULL : &fBounds,
- fPaintPtr,
- fFlags);
+ fPaintPtr
+#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS
+ , (SkCanvas::SaveFlags)fFlags
+#endif
+ );
}
void SkSaveLayerCommand::vizExecute(SkCanvas* canvas) {
« no previous file with comments | « src/utils/debugger/SkDrawCommand.h ('k') | src/utils/debugger/SkObjectParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698