diff options
author | reed <reed@google.com> | 2015-12-18 07:09:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 07:09:18 -0800 |
commit | 4960eeec4a1f2a772654883d7f3615d47bcd5dc3 (patch) | |
tree | 755f249521a7cef2b14dcce005c7a1b7ffb7525d /src/pipe/SkGPipeWrite.cpp | |
parent | f97aa74fea0133378e64700e30a7c2962212fcb5 (diff) |
change signature for virtual related to saveLayer, passing SaveLayerRec
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533953002
NOTREECHECKS=True
Review URL: https://codereview.chromium.org/1533953002
Diffstat (limited to 'src/pipe/SkGPipeWrite.cpp')
-rw-r--r-- | src/pipe/SkGPipeWrite.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index 2cab09c9e1..5147cd688d 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -248,7 +248,7 @@ public: protected: void willSave() override; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; void willRestore() override; void didConcat(const SkMatrix&) override; @@ -542,29 +542,28 @@ void SkGPipeCanvas::willSave() { this->INHERITED::willSave(); } -SkCanvas::SaveLayerStrategy SkGPipeCanvas::willSaveLayer(const SkRect* bounds, const SkPaint* paint, - SaveFlags saveFlags) { +SkCanvas::SaveLayerStrategy SkGPipeCanvas::getSaveLayerStrategy(const SaveLayerRec& rec) { NOTIFY_SETUP(this); size_t size = 0; unsigned opFlags = 0; - if (bounds) { + if (rec.fBounds) { opFlags |= kSaveLayer_HasBounds_DrawOpFlag; size += sizeof(SkRect); } - if (paint) { + if (rec.fPaint) { opFlags |= kSaveLayer_HasPaint_DrawOpFlag; - this->writePaint(*paint); + this->writePaint(*rec.fPaint); } if (this->needOpBytes(size)) { - this->writeOp(kSaveLayer_DrawOp, opFlags, saveFlags); - if (bounds) { - fWriter.writeRect(*bounds); + this->writeOp(kSaveLayer_DrawOp, opFlags, rec.fSaveLayerFlags); + if (rec.fBounds) { + fWriter.writeRect(*rec.fBounds); } } - this->INHERITED::willSaveLayer(bounds, paint, saveFlags); + (void)this->INHERITED::getSaveLayerStrategy(rec); // we don't create a layer return kNoLayer_SaveLayerStrategy; } |