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

Unified Diff: include/core/SkCanvas.h

Issue 1523053003: add backdrop option to SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: updated gm to exercise ctm scaling 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
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index bf52d1c6af753d064c70e27dd4f4623b0ad9b493..2336dcf0e0ca3791ab0966487b654344996b9fb0 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -398,16 +398,27 @@ public:
typedef uint32_t SaveLayerFlags;
struct SaveLayerRec {
- SaveLayerRec() : fBounds(nullptr), fPaint(nullptr), fSaveLayerFlags(0) {}
+ SaveLayerRec()
+ : fBounds(nullptr), fPaint(nullptr), fBackdrop(nullptr), fSaveLayerFlags(0)
+ {}
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)
: fBounds(bounds)
, fPaint(paint)
+ , fBackdrop(nullptr)
+ , fSaveLayerFlags(saveLayerFlags)
+ {}
+ SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
+ SaveLayerFlags saveLayerFlags)
+ : fBounds(bounds)
+ , fPaint(paint)
+ , fBackdrop(backdrop)
, fSaveLayerFlags(saveLayerFlags)
{}
- const SkRect* fBounds; // optional
- const SkPaint* fPaint; // optional
- SaveLayerFlags fSaveLayerFlags;
+ const SkRect* fBounds; // optional
+ const SkPaint* fPaint; // optional
+ const SkImageFilter* fBackdrop; // optional
+ SaveLayerFlags fSaveLayerFlags;
};
int saveLayer(const SaveLayerRec&);
« no previous file with comments | « gm/imagefilters.cpp ('k') | samplecode/SampleLayers.cpp » ('j') | samplecode/SampleLayers.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698