OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrGLEffect_DEFINED | 8 #ifndef GrGLEffect_DEFINED |
9 #define GrGLEffect_DEFINED | 9 #define GrGLEffect_DEFINED |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 color (or coverage). | 61 color (or coverage). |
62 @param inputColor A vec4 that holds the input color to the stage in th
e FS. This may be | 62 @param inputColor A vec4 that holds the input color to the stage in th
e FS. This may be |
63 NULL in which case the implied input is solid white
(all ones). | 63 NULL in which case the implied input is solid white
(all ones). |
64 TODO: Better system for communicating optimization i
nfo (e.g. input | 64 TODO: Better system for communicating optimization i
nfo (e.g. input |
65 color is solid white, trans black, known to be opaqu
e, etc.) that allows | 65 color is solid white, trans black, known to be opaqu
e, etc.) that allows |
66 the effect to communicate back similar known info ab
out its output. | 66 the effect to communicate back similar known info ab
out its output. |
67 @param samplers One entry for each GrTextureAccess of the GrEffect t
hat generated the | 67 @param samplers One entry for each GrTextureAccess of the GrEffect t
hat generated the |
68 GrGLEffect. These can be passed to the builder to em
it texture | 68 GrGLEffect. These can be passed to the builder to em
it texture |
69 reads in the generated code. | 69 reads in the generated code. |
70 */ | 70 */ |
71 virtual void emitCode(GrGLShaderBuilder* builder, | 71 virtual void emitCode(GrGLProgramBuilder* builder, |
72 const GrDrawEffect& drawEffect, | 72 const GrDrawEffect& drawEffect, |
73 const GrEffectKey& key, | 73 const GrEffectKey& key, |
74 const char* outputColor, | 74 const char* outputColor, |
75 const char* inputColor, | 75 const char* inputColor, |
76 const TransformedCoordsArray& coords, | 76 const TransformedCoordsArray& coords, |
77 const TextureSamplerArray& samplers) = 0; | 77 const TextureSamplerArray& samplers) = 0; |
78 | 78 |
79 /** A GrGLEffect instance can be reused with any GrEffect that produces the
same stage | 79 /** A GrGLEffect instance can be reused with any GrEffect that produces the
same stage |
80 key; this function reads data from a GrEffect and uploads any uniform va
riables required | 80 key; this function reads data from a GrEffect and uploads any uniform va
riables required |
81 by the shaders created in emitCode(). The GrEffect installed in the GrDr
awEffect is | 81 by the shaders created in emitCode(). The GrEffect installed in the GrDr
awEffect is |
(...skipping 14 matching lines...) Expand all Loading... |
96 protected: | 96 protected: |
97 const GrBackendEffectFactory& fFactory; | 97 const GrBackendEffectFactory& fFactory; |
98 | 98 |
99 private: | 99 private: |
100 friend class GrGLVertexEffect; // to set fIsVertexEffect | 100 friend class GrGLVertexEffect; // to set fIsVertexEffect |
101 | 101 |
102 bool fIsVertexEffect; | 102 bool fIsVertexEffect; |
103 }; | 103 }; |
104 | 104 |
105 #endif | 105 #endif |
OLD | NEW |