| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkColorMatrixFilter_DEFINED | 8 #ifndef SkColorMatrixFilter_DEFINED |
| 9 #define SkColorMatrixFilter_DEFINED | 9 #define SkColorMatrixFilter_DEFINED |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 struct State { | 32 struct State { |
| 33 int32_t fArray[20]; | 33 int32_t fArray[20]; |
| 34 int fShift; | 34 int fShift; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 SK_TO_STRING_OVERRIDE() | 37 SK_TO_STRING_OVERRIDE() |
| 38 | 38 |
| 39 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter) | 39 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter) |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 SkColorMatrixFilter(SkReadBuffer& buffer); | 42 explicit SkColorMatrixFilter(const SkColorMatrix&); |
| 43 explicit SkColorMatrixFilter(const SkScalar array[20]); |
| 44 explicit SkColorMatrixFilter(SkReadBuffer& buffer); |
| 43 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 45 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 44 | 46 |
| 45 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS | |
| 46 public: | |
| 47 #endif | |
| 48 explicit SkColorMatrixFilter(const SkColorMatrix&); | |
| 49 SkColorMatrixFilter(const SkScalar array[20]); | |
| 50 | |
| 51 private: | 47 private: |
| 52 SkColorMatrix fMatrix; | 48 SkColorMatrix fMatrix; |
| 53 | 49 |
| 54 typedef void (*Proc)(const State&, unsigned r, unsigned g, unsigned b, | 50 typedef void (*Proc)(const State&, unsigned r, unsigned g, unsigned b, |
| 55 unsigned a, int32_t result[4]); | 51 unsigned a, int32_t result[4]); |
| 56 | 52 |
| 57 Proc fProc; | 53 Proc fProc; |
| 58 State fState; | 54 State fState; |
| 59 uint32_t fFlags; | 55 uint32_t fFlags; |
| 60 | 56 |
| 61 void initState(const SkScalar array[20]); | 57 void initState(const SkScalar array[20]); |
| 62 | 58 |
| 63 typedef SkColorFilter INHERITED; | 59 typedef SkColorFilter INHERITED; |
| 64 }; | 60 }; |
| 65 | 61 |
| 66 #endif | 62 #endif |
| OLD | NEW |