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

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

Issue 1533953002: change signature for virtual related to saveLayer, passing SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update comment Created 5 years 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 9ebb81e74ae63d94c97a809b613173398c8c101c..bb9f2f831d8bc48647a84e12e0a031a18343fbc5 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -925,36 +925,35 @@ void SkSaveCommand::execute(SkCanvas* canvas) const {
canvas->save();
}
-SkSaveLayerCommand::SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint,
- SkCanvas::SaveFlags flags)
+SkSaveLayerCommand::SkSaveLayerCommand(const SkCanvas::SaveLayerRec& rec)
: INHERITED(kSaveLayer_OpType) {
- if (bounds) {
- fBounds = *bounds;
+ if (rec.fBounds) {
+ fBounds = *rec.fBounds;
} else {
fBounds.setEmpty();
}
- if (paint) {
- fPaint = *paint;
+ if (rec.fPaint) {
+ fPaint = *rec.fPaint;
fPaintPtr = &fPaint;
} else {
fPaintPtr = nullptr;
}
- fFlags = flags;
+ fSaveLayerFlags = rec.fSaveLayerFlags;
- if (bounds) {
- fInfo.push(SkObjectParser::RectToString(*bounds, "Bounds: "));
+ if (rec.fBounds) {
+ fInfo.push(SkObjectParser::RectToString(*rec.fBounds, "Bounds: "));
}
- if (paint) {
- fInfo.push(SkObjectParser::PaintToString(*paint));
+ if (rec.fPaint) {
+ fInfo.push(SkObjectParser::PaintToString(*rec.fPaint));
}
- fInfo.push(SkObjectParser::SaveFlagsToString(flags));
+ fInfo.push(SkObjectParser::SaveLayerFlagsToString(fSaveLayerFlags));
}
void SkSaveLayerCommand::execute(SkCanvas* canvas) const {
- canvas->saveLayer(fBounds.isEmpty() ? nullptr : &fBounds,
- fPaintPtr,
- fFlags);
+ canvas->saveLayer(SkCanvas::SaveLayerRec(fBounds.isEmpty() ? nullptr : &fBounds,
+ fPaintPtr,
+ fSaveLayerFlags));
}
void SkSaveLayerCommand::vizExecute(SkCanvas* canvas) const {
« 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