Index: src/core/SkRemote.cpp |
diff --git a/src/core/SkRemote.cpp b/src/core/SkRemote.cpp |
index 1209be014c6f92ab90399c8b36285ee25b02cfe3..9d2e2e50797acbaec625cc8692614c01ba049f19 100644 |
--- a/src/core/SkRemote.cpp |
+++ b/src/core/SkRemote.cpp |
@@ -163,18 +163,19 @@ namespace SkRemote { |
void willSave() override { fEncoder-> save(); } |
void didRestore() override { fEncoder->restore(); } |
- SaveLayerStrategy willSaveLayer(const SkRect* bounds, |
- const SkPaint* paint, |
- SaveFlags flags) override { |
+ SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec& rec) override { |
SkPath path; |
- if (bounds) { |
- path.addRect(*bounds); |
+ if (rec.fBounds) { |
+ path.addRect(*rec.fBounds); |
} |
const SkPaint defaultPaint; |
+ const SkPaint* paint = rec.fPaint; |
if (!paint) { |
paint = &defaultPaint; |
} |
- fEncoder->saveLayer(this->id(path), this->commonIDs(*paint), flags); |
+ // TODO: what to do with rec.fBackdrop? |
+ fEncoder->saveLayer(this->id(path), this->commonIDs(*paint), rec.fSaveLayerFlags); |
robertphillips
2015/12/17 19:53:57
?
|
+ SkASSERT(false); |
return kNoLayer_SaveLayerStrategy; |
} |
@@ -500,11 +501,12 @@ namespace SkRemote { |
void save() override { fCanvas->save(); } |
void restore() override { fCanvas->restore(); } |
- void saveLayer(ID bounds, CommonIDs common, SkCanvas::SaveFlags flags) override { |
+ void saveLayer(ID bounds, CommonIDs common, uint32_t saveLayerFlags) override { |
SkPaint paint; |
this->applyCommon(common, &paint); |
SkRect rect; |
robertphillips
2015/12/17 19:53:57
\n somewhere ?
reed1
2015/12/17 20:22:31
Done.
|
- fCanvas->saveLayer(fPath.find(bounds).isRect(&rect) ? &rect : nullptr, &paint, flags); |
+ |
+ fCanvas->saveLayer({ fPath.find(bounds).isRect(&rect) ? &rect : nullptr, &paint, saveLayerFlags }); |
} |
void setMatrix(ID matrix) override { fCanvas->setMatrix(fMatrix.find(matrix)); } |
@@ -684,8 +686,8 @@ namespace SkRemote { |
void save() override { fWrapped-> save(); } |
void restore() override { fWrapped->restore(); } |
- void saveLayer(ID bounds, CommonIDs common, SkCanvas::SaveFlags flags) override { |
- fWrapped->saveLayer(bounds, common, flags); |
+ void saveLayer(ID bounds, CommonIDs common, uint32_t saveLayerFlags) override { |
+ fWrapped->saveLayer(bounds, common, saveLayerFlags); |
} |
void setMatrix(ID matrix) override { fWrapped->setMatrix(matrix); } |