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 GrGLProgramDesc_DEFINED | 8 #ifndef GrGLProgramDesc_DEFINED |
9 #define GrGLProgramDesc_DEFINED | 9 #define GrGLProgramDesc_DEFINED |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 return !(*this == other); | 92 return !(*this == other); |
93 } | 93 } |
94 | 94 |
95 static bool Less(const GrGLProgramDesc& a, const GrGLProgramDesc& b) { | 95 static bool Less(const GrGLProgramDesc& a, const GrGLProgramDesc& b) { |
96 return memcmp(a.asKey(), b.asKey(), a.keyLength() & ~0x3) < 0; | 96 return memcmp(a.asKey(), b.asKey(), a.keyLength() & ~0x3) < 0; |
97 } | 97 } |
98 | 98 |
99 private: | 99 private: |
100 // Specifies where the initial color comes from before the stages are applie
d. | 100 // Specifies where the initial color comes from before the stages are applie
d. |
101 enum ColorInput { | 101 enum ColorInput { |
102 kSolidWhite_ColorInput, | 102 kAllOnes_ColorInput, |
103 kAttribute_ColorInput, | 103 kAttribute_ColorInput, |
104 kUniform_ColorInput, | 104 kUniform_ColorInput, |
105 | 105 |
106 kColorInputCnt | 106 kColorInputCnt |
107 }; | 107 }; |
108 | 108 |
109 enum CoverageOutput { | 109 enum CoverageOutput { |
110 // modulate color and coverage, write result as the color output. | 110 // modulate color and coverage, write result as the color output. |
111 kModulate_CoverageOutput, | 111 kModulate_CoverageOutput, |
112 // Writes color*coverage as the primary color output and also writes cov
erage as the | 112 // Writes color*coverage as the primary color output and also writes cov
erage as the |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 friend class GrGLProgram; | 254 friend class GrGLProgram; |
255 friend class GrGLProgramBuilder; | 255 friend class GrGLProgramBuilder; |
256 friend class GrGLFullProgramBuilder; | 256 friend class GrGLFullProgramBuilder; |
257 friend class GrGLFragmentOnlyProgramBuilder; | 257 friend class GrGLFragmentOnlyProgramBuilder; |
258 friend class GrGLVertexShaderBuilder; | 258 friend class GrGLVertexShaderBuilder; |
259 friend class GrGLFragmentShaderBuilder; | 259 friend class GrGLFragmentShaderBuilder; |
260 friend class GrGLGeometryShaderBuilder; | 260 friend class GrGLGeometryShaderBuilder; |
261 }; | 261 }; |
262 | 262 |
263 #endif | 263 #endif |
OLD | NEW |