From 03ef4b16b25248f4545722f649baadf494c232d2 Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 18 Dec 2015 21:26:56 -0800 Subject: [PATCH] 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 --- include/core/SkCanvas.h | 7 ------- src/core/SkCanvas.cpp | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index bf52d1c6af..ae0dc38202 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -1245,17 +1245,10 @@ protected: }; 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. virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) { return kFullLayer_SaveLayerStrategy; } -#endif virtual void willRestore() {} virtual void didRestore() {} virtual void didConcat(const SkMatrix&) {} diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 09fef0bbed..7370117d9d 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1134,20 +1134,6 @@ uint32_t SkCanvas::SaveFlagsToSaveLayerFlags(SaveFlags flags) { 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) { return this->saveLayer(SaveLayerRec(bounds, paint, 0)); }