OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrGLFragmentProcessor_DEFINED | 8 #ifndef GrGLFragmentProcessor_DEFINED |
9 #define GrGLFragmentProcessor_DEFINED | 9 #define GrGLFragmentProcessor_DEFINED |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 /** Called when the program stage should insert its code into the shaders. T
he code in each | 31 /** Called when the program stage should insert its code into the shaders. T
he code in each |
32 shader will be in its own block ({}) and so locally scoped names will no
t collide across | 32 shader will be in its own block ({}) and so locally scoped names will no
t collide across |
33 stages. | 33 stages. |
34 | 34 |
35 @param builder Interface used to emit code in the shaders. | 35 @param builder Interface used to emit code in the shaders. |
36 @param processor The processor that generated this program stage. | 36 @param processor The processor that generated this program stage. |
37 @param key The key that was computed by GenKey() from the gener
ating GrProcessor. | 37 @param key The key that was computed by GenKey() from the gener
ating GrProcessor. |
38 @param outputColor A predefined vec4 in the FS in which the stage shoul
d place its output | 38 @param outputColor A predefined vec4 in the FS in which the stage shoul
d place its output |
39 color (or coverage). | 39 color (or coverage). |
40 @param inputColor A vec4 that holds the input color to the stage in th
e FS. This may be | 40 @param inputColor A vec4 that holds the input color to the stage in th
e FS. This may be |
41 NULL in which case the implied input is solid white
(all ones). | 41 nullptr in which case the implied input is solid whi
te (all ones). |
42 TODO: Better system for communicating optimization i
nfo (e.g. input | 42 TODO: Better system for communicating optimization i
nfo (e.g. input |
43 color is solid white, trans black, known to be opaqu
e, etc.) that allows | 43 color is solid white, trans black, known to be opaqu
e, etc.) that allows |
44 the processor to communicate back similar known info
about its output. | 44 the processor to communicate back similar known info
about its output. |
45 @param samplers Contains one entry for each GrTextureAccess of the G
rProcessor. These | 45 @param samplers Contains one entry for each GrTextureAccess of the G
rProcessor. These |
46 can be passed to the builder to emit texture reads i
n the generated | 46 can be passed to the builder to emit texture reads i
n the generated |
47 code. | 47 code. |
48 */ | 48 */ |
49 | 49 |
50 struct EmitArgs { | 50 struct EmitArgs { |
51 EmitArgs(GrGLFPBuilder* builder, | 51 EmitArgs(GrGLFPBuilder* builder, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {} | 92 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {} |
93 | 93 |
94 private: | 94 private: |
95 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors; | 95 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors; |
96 | 96 |
97 friend class GrFragmentProcessor; | 97 friend class GrFragmentProcessor; |
98 typedef GrGLProcessor INHERITED; | 98 typedef GrGLProcessor INHERITED; |
99 }; | 99 }; |
100 | 100 |
101 #endif | 101 #endif |
OLD | NEW |