aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects
diff options
context:
space:
mode:
Diffstat (limited to 'include/effects')
-rw-r--r--include/effects/SkBlurDrawLooper.h2
-rw-r--r--include/effects/SkColorCubeFilter.h6
-rw-r--r--include/effects/SkColorFilterImageFilter.h3
-rw-r--r--include/effects/SkColorMatrixFilter.h21
-rw-r--r--include/effects/SkLumaColorFilter.h6
-rw-r--r--include/effects/SkTableColorFilter.h18
6 files changed, 16 insertions, 40 deletions
diff --git a/include/effects/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h
index 49b0c51f25..0371700ba4 100644
--- a/include/effects/SkBlurDrawLooper.h
+++ b/include/effects/SkBlurDrawLooper.h
@@ -65,7 +65,7 @@ protected:
private:
SkMaskFilter* fBlur;
- sk_sp<SkColorFilter> fColorFilter;
+ SkColorFilter* fColorFilter;
SkScalar fDx, fDy, fSigma;
SkColor fBlurColor;
uint32_t fBlurFlags;
diff --git a/include/effects/SkColorCubeFilter.h b/include/effects/SkColorCubeFilter.h
index 8b621292b0..8d63667c32 100644
--- a/include/effects/SkColorCubeFilter.h
+++ b/include/effects/SkColorCubeFilter.h
@@ -20,11 +20,7 @@ public:
* This cube contains a transform where (x,y,z) maps to the (r,g,b).
* The alpha components of the colors must be 0xFF.
*/
- static sk_sp<SkColorFilter> Make(sk_sp<SkData> cubeData, int cubeDimension);
-
-#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
static SkColorFilter* Create(SkData* cubeData, int cubeDimension);
-#endif
void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
uint32_t getFlags() const override;
@@ -37,7 +33,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorCubeFilter)
protected:
- SkColorCubeFilter(sk_sp<SkData> cubeData, int cubeDimension);
+ SkColorCubeFilter(SkData* cubeData, int cubeDimension);
void flatten(SkWriteBuffer&) const override;
private:
diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h
index c34e9ced59..6dd9df2495 100644
--- a/include/effects/SkColorFilterImageFilter.h
+++ b/include/effects/SkColorFilterImageFilter.h
@@ -31,8 +31,9 @@ private:
SkColorFilterImageFilter(SkColorFilter* cf,
SkImageFilter* input,
const CropRect* cropRect);
+ virtual ~SkColorFilterImageFilter();
- sk_sp<SkColorFilter> fColorFilter;
+ SkColorFilter* fColorFilter;
typedef SkImageFilter INHERITED;
};
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
diff --git a/include/effects/SkLumaColorFilter.h b/include/effects/SkLumaColorFilter.h
index 3a68607b19..8dd519af4a 100644
--- a/include/effects/SkLumaColorFilter.h
+++ b/include/effects/SkLumaColorFilter.h
@@ -23,11 +23,7 @@
*/
class SK_API SkLumaColorFilter : public SkColorFilter {
public:
- static sk_sp<SkColorFilter> Make();
-
-#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
- static SkColorFilter* Create() { return Make().release(); }
-#endif
+ static SkColorFilter* Create();
void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
diff --git a/include/effects/SkTableColorFilter.h b/include/effects/SkTableColorFilter.h
index fe31149464..e4d42dc00c 100644
--- a/include/effects/SkTableColorFilter.h
+++ b/include/effects/SkTableColorFilter.h
@@ -23,7 +23,7 @@ public:
* colors are premultiplied, they are temporarily unpremultiplied, then
* the table is applied, and then the result is remultiplied.
*/
- static sk_sp<SkColorFilter> Make(const uint8_t table[256]);
+ static SkColorFilter* Create(const uint8_t table[256]);
/**
* Create a table colorfilter, with a different table for each
@@ -31,23 +31,11 @@ public:
* treated as identity, with the component left unchanged. If a table
* is not null, then its contents are copied into the filter.
*/
- static sk_sp<SkColorFilter> MakeARGB(const uint8_t tableA[256],
- const uint8_t tableR[256],
- const uint8_t tableG[256],
- const uint8_t tableB[256]);
-
-#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
- static SkColorFilter* Create(const uint8_t table[256]) {
- return Make(table).release();
- }
static SkColorFilter* CreateARGB(const uint8_t tableA[256],
const uint8_t tableR[256],
const uint8_t tableG[256],
- const uint8_t tableB[256]) {
- return MakeARGB(tableA, tableR, tableG, tableB).release();
- }
-#endif
-
+ const uint8_t tableB[256]);
+
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
};