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 28 matching lines...) Expand all Loading... |
39 SK_TO_STRING_OVERRIDE() | 39 SK_TO_STRING_OVERRIDE() |
40 | 40 |
41 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter) | 41 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter) |
42 | 42 |
43 protected: | 43 protected: |
44 explicit SkColorMatrixFilter(const SkColorMatrix&); | 44 explicit SkColorMatrixFilter(const SkColorMatrix&); |
45 explicit SkColorMatrixFilter(const SkScalar array[20]); | 45 explicit SkColorMatrixFilter(const SkScalar array[20]); |
46 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 46 void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
47 | 47 |
48 private: | 48 private: |
49 SkColorMatrix fMatrix; | 49 SkColorMatrix fMatrix; |
50 float fTranspose[SkColorMatrix::kCount]; // for Sk4f | |
51 | 50 |
52 typedef void (*Proc)(const State&, unsigned r, unsigned g, unsigned b, | 51 typedef void (*Proc)(const State&, unsigned r, unsigned g, unsigned b, |
53 unsigned a, int32_t result[4]); | 52 unsigned a, int32_t result[4]); |
54 | 53 |
55 Proc fProc; | 54 Proc fProc; |
56 State fState; | 55 State fState; |
57 uint32_t fFlags; | 56 uint32_t fFlags; |
58 | 57 |
59 void initState(const SkScalar array[20]); | 58 void initState(const SkScalar array[20]); |
60 | 59 |
61 typedef SkColorFilter INHERITED; | 60 typedef SkColorFilter INHERITED; |
62 }; | 61 }; |
63 | 62 |
64 #endif | 63 #endif |
OLD | NEW |