diff options
author | 2016-03-22 07:35:17 -0700 | |
---|---|---|
committer | 2016-03-22 07:35:17 -0700 | |
commit | 1eb81db650d31f50be67b12d60c4f9e7dd08432f (patch) | |
tree | 58a5fd565f06a398192be170009fefa2a12a1ee2 /include/effects/SkColorMatrixFilter.h | |
parent | ee451cf09de31267c93b64e1fdac7c823cee7e85 (diff) |
Revert of switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )
Reason for revert:
need to fix unguarded makeWithFilter
Original issue's description:
> switch colorfilters to sk_sp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822623002
>
> Committed: https://skia.googlesource.com/skia/+/f809d7687a4fb7b88b651b046da2bc0035d6aa09
TBR=fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1820303002
Diffstat (limited to 'include/effects/SkColorMatrixFilter.h')
-rw-r--r-- | include/effects/SkColorMatrixFilter.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index 6e74bee315..d71d2ed533 100644 --- a/include/effects/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h @@ -13,25 +13,20 @@ class SK_API SkColorMatrixFilter : public SkColorFilter { public: + static SkColorFilter* Create(const SkColorMatrix& cm) { + return SkColorFilter::CreateMatrixFilterRowMajor255(cm.fMat); + } + static SkColorFilter* Create(const SkScalar array[20]) { + return SkColorFilter::CreateMatrixFilterRowMajor255(array); + } + /** * Create a colorfilter that multiplies the RGB channels by one color, and * then adds a second color, pinning the result for each component to * [0..255]. The alpha components of the mul and add arguments * are ignored. */ - static sk_sp<SkColorFilter> MakeLightingFilter(SkColor mul, SkColor add); - -#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR - static SkColorFilter* Create(const SkColorMatrix& cm) { - return SkColorFilter::MakeMatrixFilterRowMajor255(cm.fMat).release(); - } - static SkColorFilter* Create(const SkScalar array[20]) { - return SkColorFilter::MakeMatrixFilterRowMajor255(array).release(); - } - static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add) { - return MakeLightingFilter(mul, add).release(); - } -#endif + static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add); }; #endif |