From 6b9cd051b4fc2ae83f69d8c0482b646e5a2d02f6 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Sun, 18 Jun 2017 21:32:48 -0400 Subject: [PATCH] remove unused variants in imagefilter factories Bug: skia: Change-Id: Ife12bfa1c16f9dd87b24f73d3b260b0d2f46c7df Reviewed-on: https://skia-review.googlesource.com/20207 Reviewed-by: Mike Reed Commit-Queue: Mike Reed --- gm/arithmode.cpp | 3 ++- gm/xfermodeimagefilter.cpp | 3 ++- include/effects/SkArithmeticImageFilter.h | 4 ---- include/effects/SkXfermodeImageFilter.h | 8 +------- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gm/arithmode.cpp b/gm/arithmode.cpp index 54169ceef6..f1c0c0be83 100644 --- a/gm/arithmode.cpp +++ b/gm/arithmode.cpp @@ -138,7 +138,8 @@ protected: canvas->translate(gap, 0); sk_sp bg = - SkArithmeticImageFilter::Make(0, 0, -one / 2, 1, enforcePMColor, dstFilter); + SkArithmeticImageFilter::Make(0, 0, -one / 2, 1, enforcePMColor, dstFilter, + nullptr, nullptr); SkPaint p; p.setImageFilter(SkArithmeticImageFilter::Make(0, one / 2, -one, 1, true, std::move(bg), dstFilter, nullptr)); diff --git a/gm/xfermodeimagefilter.cpp b/gm/xfermodeimagefilter.cpp index 8fd1348f29..ea55fabf61 100644 --- a/gm/xfermodeimagefilter.cpp +++ b/gm/xfermodeimagefilter.cpp @@ -93,7 +93,8 @@ protected: } } // Test arithmetic mode as image filter - paint.setImageFilter(SkArithmeticImageFilter::Make(0, 1, 1, 0, true, background)); + paint.setImageFilter(SkArithmeticImageFilter::Make(0, 1, 1, 0, true, background, + nullptr, nullptr)); DrawClippedBitmap(canvas, fBitmap, paint, x, y); x += fBitmap.width() + MARGIN; if (x + fBitmap.width() > WIDTH) { diff --git a/include/effects/SkArithmeticImageFilter.h b/include/effects/SkArithmeticImageFilter.h index ef596030a7..a8b7100abb 100644 --- a/include/effects/SkArithmeticImageFilter.h +++ b/include/effects/SkArithmeticImageFilter.h @@ -16,10 +16,6 @@ public: sk_sp background, sk_sp foreground, const SkImageFilter::CropRect* cropRect); - static sk_sp Make(float k1, float k2, float k3, float k4, bool enforcePMColor, - sk_sp background) { - return Make(k1, k2, k3, k4, enforcePMColor, std::move(background), nullptr, nullptr); - } SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP(); diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h index 5e8b587241..147995081c 100644 --- a/include/effects/SkXfermodeImageFilter.h +++ b/include/effects/SkXfermodeImageFilter.h @@ -25,8 +25,7 @@ public: return Make(mode, std::move(background), nullptr, nullptr); } - // Arithmetic image filtering used to be implemented using SkXfermode. Some clients still rely - // on these factories existing in this class. + // Need to update chrome to use SkArithmeticImageFilter instead... static sk_sp MakeArithmetic(float k1, float k2, float k3, float k4, bool enforcePMColor, sk_sp background, sk_sp foreground, @@ -34,11 +33,6 @@ public: return SkArithmeticImageFilter::Make(k1, k2, k3, k4, enforcePMColor, std::move(background), std::move(foreground), cropRect); } - static sk_sp MakeArithmetic(float k1, float k2, float k3, float k4, - bool enforcePMColor, - sk_sp background) { - return SkArithmeticImageFilter::Make(k1, k2, k3, k4, enforcePMColor, std::move(background)); - } SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();