aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pipe/SkGPipeWrite.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-12-18 07:09:18 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-18 07:09:18 -0800
commit4960eeec4a1f2a772654883d7f3615d47bcd5dc3 (patch)
tree755f249521a7cef2b14dcce005c7a1b7ffb7525d /src/pipe/SkGPipeWrite.cpp
parentf97aa74fea0133378e64700e30a7c2962212fcb5 (diff)
change signature for virtual related to saveLayer, passing SaveLayerRec
Diffstat (limited to 'src/pipe/SkGPipeWrite.cpp')
-rw-r--r--src/pipe/SkGPipeWrite.cpp19
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;
}