OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
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 SkColorCubeFilter_DEFINED | 8 #ifndef SkColorCubeFilter_DEFINED |
9 #define SkColorCubeFilter_DEFINED | 9 #define SkColorCubeFilter_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 static sk_sp<SkColorFilter> Make(sk_sp<SkData> cubeData, int cubeDimension); | 23 static sk_sp<SkColorFilter> Make(sk_sp<SkData> cubeData, int cubeDimension); |
24 | 24 |
25 #ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR | 25 #ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR |
26 static SkColorFilter* Create(SkData* cubeData, int cubeDimension); | 26 static SkColorFilter* Create(SkData* cubeData, int cubeDimension); |
27 #endif | 27 #endif |
28 | 28 |
29 void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const overrid
e; | 29 void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const overrid
e; |
30 uint32_t getFlags() const override; | 30 uint32_t getFlags() const override; |
31 | 31 |
32 #if SK_SUPPORT_GPU | 32 #if SK_SUPPORT_GPU |
33 const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override; | 33 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*) const override; |
34 #endif | 34 #endif |
35 | 35 |
36 SK_TO_STRING_OVERRIDE() | 36 SK_TO_STRING_OVERRIDE() |
37 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorCubeFilter) | 37 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorCubeFilter) |
38 | 38 |
39 protected: | 39 protected: |
40 SkColorCubeFilter(sk_sp<SkData> cubeData, int cubeDimension); | 40 SkColorCubeFilter(sk_sp<SkData> cubeData, int cubeDimension); |
41 void flatten(SkWriteBuffer&) const override; | 41 void flatten(SkWriteBuffer&) const override; |
42 | 42 |
43 private: | 43 private: |
(...skipping 28 matching lines...) Expand all Loading... |
72 | 72 |
73 sk_sp<SkData> fCubeData; | 73 sk_sp<SkData> fCubeData; |
74 int32_t fUniqueID; | 74 int32_t fUniqueID; |
75 | 75 |
76 mutable ColorCubeProcesingCache fCache; | 76 mutable ColorCubeProcesingCache fCache; |
77 | 77 |
78 typedef SkColorFilter INHERITED; | 78 typedef SkColorFilter INHERITED; |
79 }; | 79 }; |
80 | 80 |
81 #endif | 81 #endif |
OLD | NEW |