More SaveFlags removal twiddling.

This is a follow up to https://codereview.chromium.org/338913002/. More
tweaks to allow migrating clients to the new API.

1) switch the shim call direction willSave(SaveFlags) -> willSave()
   (internal users are still using the former, so external overriders of
    the latter will not be notified otherwise - doh)
2) ensure willSave() stays visible in SkProxyCanvas (Chromium's
   TimingCanvas attempts to call it explicitly).

BUG=skia:2297
R=reed@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/334393008
This commit is contained in:
fmalita 2014-06-17 13:52:18 -07:00 committed by Commit bot
parent dbb7b30429
commit 6ca763f362
2 changed files with 5 additions and 2 deletions

View File

@ -1201,9 +1201,9 @@ protected:
};
// Transitional, pending external clients cleanup.
virtual void willSave(SaveFlags) {}
virtual void willSave(SaveFlags) { this->willSave(); }
virtual void willSave() { this->willSave(kMatrixClip_SaveFlag); }
virtual void willSave() {}
virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) {
return kFullLayer_SaveLayerStrategy;
}

View File

@ -55,6 +55,9 @@ public:
virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE;
// Transitional, to facilitate migrating subclasses to the new willSave API.
using SkCanvas::willSave;
protected:
virtual void willSave(SaveFlags) SK_OVERRIDE;
virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;