| Index: src/core/SkColorMatrixFilterRowMajor255.h
|
| diff --git a/include/effects/SkColorMatrixFilter.h b/src/core/SkColorMatrixFilterRowMajor255.h
|
| similarity index 51%
|
| copy from include/effects/SkColorMatrixFilter.h
|
| copy to src/core/SkColorMatrixFilterRowMajor255.h
|
| index 3edf791f06bd263198f14a8d24825dc25b11c4dc..453dd41bff5d168250fb45fb9e2568db53a368e4 100644
|
| --- a/include/effects/SkColorMatrixFilter.h
|
| +++ b/src/core/SkColorMatrixFilterRowMajor255.h
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright 2007 The Android Open Source Project
|
| + * Copyright 2016 Google Inc.
|
| *
|
| * Use of this source code is governed by a BSD-style license that can be
|
| * found in the LICENSE file.
|
| @@ -9,24 +9,10 @@
|
| #define SkColorMatrixFilter_DEFINED
|
|
|
| #include "SkColorFilter.h"
|
| -#include "SkColorMatrix.h"
|
|
|
| -class SK_API SkColorMatrixFilter : public SkColorFilter {
|
| +class SK_API SkColorMatrixFilterRowMajor255 : public SkColorFilter {
|
| public:
|
| - static SkColorFilter* Create(const SkColorMatrix& cm) {
|
| - return new SkColorMatrixFilter(cm);
|
| - }
|
| - static SkColorFilter* Create(const SkScalar array[20]) {
|
| - return new SkColorMatrixFilter(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 SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add);
|
| + explicit SkColorMatrixFilterRowMajor255(const SkScalar array[20]);
|
|
|
| void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
|
| void filterSpan4f(const SkPM4f src[], int count, SkPM4f[]) const override;
|
| @@ -43,13 +29,11 @@ public:
|
| SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter)
|
|
|
| protected:
|
| - explicit SkColorMatrixFilter(const SkColorMatrix&);
|
| - explicit SkColorMatrixFilter(const SkScalar array[20]);
|
| void flatten(SkWriteBuffer&) const override;
|
|
|
| private:
|
| - SkColorMatrix fMatrix;
|
| - float fTranspose[SkColorMatrix::kCount]; // for Sk4s
|
| + SkScalar fMatrix[20];
|
| + float fTranspose[20]; // for Sk4s
|
| uint32_t fFlags;
|
|
|
| void initState(const SkScalar array[20]);
|
|
|