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

Unified Diff: src/pipe/SkGPipeWrite.cpp

Issue 1533953002: change signature for virtual related to saveLayer, passing SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update comment 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
« no previous file with comments | « src/pipe/SkGPipeRead.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeWrite.cpp
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 2cab09c9e1b7220b3967667a47ae56279a2288c8..5147cd688d05b2440d6c959c5e175ec2b1aa21d4 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;
}
« no previous file with comments | « src/pipe/SkGPipeRead.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698