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 GrFragmentProcessor_DEFINED | 8 #ifndef GrFragmentProcessor_DEFINED |
9 #define GrFragmentProcessor_DEFINED | 9 #define GrFragmentProcessor_DEFINED |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 * rgb and then multiplies all the components by the input alpha. This effe
ctively modulates | 38 * rgb and then multiplies all the components by the input alpha. This effe
ctively modulates |
39 * the child processor's premul color by a unpremul'ed input and produces a
premul output | 39 * the child processor's premul color by a unpremul'ed input and produces a
premul output |
40 */ | 40 */ |
41 static sk_sp<GrFragmentProcessor> MulOutputByInputUnpremulColor(sk_sp<GrFrag
mentProcessor>); | 41 static sk_sp<GrFragmentProcessor> MulOutputByInputUnpremulColor(sk_sp<GrFrag
mentProcessor>); |
42 | 42 |
43 /** | 43 /** |
44 * Returns a parent fragment processor that adopts the passed fragment proc
essor as a child. | 44 * Returns a parent fragment processor that adopts the passed fragment proc
essor as a child. |
45 * The parent will ignore its input color and instead feed the passed in co
lor as input to the | 45 * The parent will ignore its input color and instead feed the passed in co
lor as input to the |
46 * child. | 46 * child. |
47 */ | 47 */ |
48 static sk_sp<GrFragmentProcessor> OverrideInput(sk_sp<GrFragmentProcessor>,
GrColor); | 48 static sk_sp<GrFragmentProcessor> OverrideInput(sk_sp<GrFragmentProcessor>,
GrColor4f); |
49 | 49 |
50 /** | 50 /** |
51 * Returns a fragment processor that premuls the input before calling the p
assed in fragment | 51 * Returns a fragment processor that premuls the input before calling the p
assed in fragment |
52 * processor. | 52 * processor. |
53 */ | 53 */ |
54 static sk_sp<GrFragmentProcessor> PremulInput(sk_sp<GrFragmentProcessor>); | 54 static sk_sp<GrFragmentProcessor> PremulInput(sk_sp<GrFragmentProcessor>); |
55 | 55 |
56 /** | 56 /** |
57 * Returns a fragment processor that runs the passed in array of fragment pr
ocessors in a | 57 * Returns a fragment processor that runs the passed in array of fragment pr
ocessors in a |
58 * series. The original input is passed to the first, the first's output is
passed to the | 58 * series. The original input is passed to the first, the first's output is
passed to the |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 /** | 237 /** |
238 * This is not SkSTArray<1, sk_sp<GrFragmentProcessor>> because this class h
olds strong | 238 * This is not SkSTArray<1, sk_sp<GrFragmentProcessor>> because this class h
olds strong |
239 * references until notifyRefCntIsZero and then it holds pending executions. | 239 * references until notifyRefCntIsZero and then it holds pending executions. |
240 */ | 240 */ |
241 SkSTArray<1, GrFragmentProcessor*, true> fChildProcessors; | 241 SkSTArray<1, GrFragmentProcessor*, true> fChildProcessors; |
242 | 242 |
243 typedef GrProcessor INHERITED; | 243 typedef GrProcessor INHERITED; |
244 }; | 244 }; |
245 | 245 |
246 #endif | 246 #endif |
OLD | NEW |