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

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: rebase Created 4 years, 11 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 | « gm/imagefilters.cpp ('k') | include/private/SkRecords.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index d046b8ef4c99dc007860defc68670dec319152f3..d1de626315ee52503517eb84c83e4de231130b64 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -422,16 +422,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') | include/private/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698