Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: include/effects/SkColorMatrixFilter.h

Issue 1820303002: Revert of switch colorfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | include/effects/SkLumaColorFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkColorMatrixFilter.h
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h
index 6e74bee315c3d10bd1ca13638554d3d0f0cb8fb6..d71d2ed5332d1f08c822b18acee34c3e3f619106 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
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | include/effects/SkLumaColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698