remove SK_SUPPORT_LEGACY_SAVELAYERPARAMS code
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1537193002 TBR= Review URL: https://codereview.chromium.org/1537193002
This commit is contained in:
parent
d0e1f80d04
commit
03ef4b16b2
@ -1245,17 +1245,10 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
virtual void willSave() {}
|
virtual void willSave() {}
|
||||||
#ifdef SK_SUPPORT_LEGACY_SAVELAYERPARAMS
|
|
||||||
virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) {
|
|
||||||
return kFullLayer_SaveLayerStrategy;
|
|
||||||
}
|
|
||||||
virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&);
|
|
||||||
#else
|
|
||||||
// Overriders should call the corresponding INHERITED method up the inheritance chain.
|
// Overriders should call the corresponding INHERITED method up the inheritance chain.
|
||||||
virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) {
|
virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) {
|
||||||
return kFullLayer_SaveLayerStrategy;
|
return kFullLayer_SaveLayerStrategy;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
virtual void willRestore() {}
|
virtual void willRestore() {}
|
||||||
virtual void didRestore() {}
|
virtual void didRestore() {}
|
||||||
virtual void didConcat(const SkMatrix&) {}
|
virtual void didConcat(const SkMatrix&) {}
|
||||||
|
@ -1134,20 +1134,6 @@ uint32_t SkCanvas::SaveFlagsToSaveLayerFlags(SaveFlags flags) {
|
|||||||
return layerFlags;
|
return layerFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SK_SUPPORT_LEGACY_SAVELAYERPARAMS
|
|
||||||
SkCanvas::SaveLayerStrategy SkCanvas::getSaveLayerStrategy(const SaveLayerRec& rec) {
|
|
||||||
uint32_t flags = 0;
|
|
||||||
|
|
||||||
if (0 == (rec.fSaveLayerFlags & kDontClipToLayer_PrivateSaveLayerFlag)) {
|
|
||||||
flags |= kClipToLayer_SaveFlag;
|
|
||||||
}
|
|
||||||
if (0 == (rec.fSaveLayerFlags & kIsOpaque_SaveLayerFlag)) {
|
|
||||||
flags |= kHasAlphaLayer_SaveFlag;
|
|
||||||
}
|
|
||||||
return this->willSaveLayer(rec.fBounds, rec.fPaint, (SaveFlags)flags);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int SkCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint) {
|
int SkCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint) {
|
||||||
return this->saveLayer(SaveLayerRec(bounds, paint, 0));
|
return this->saveLayer(SaveLayerRec(bounds, paint, 0));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user