| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 static bool Less(const GrGLProgramDesc& a, const GrGLProgramDesc& b) { | 97 static bool Less(const GrGLProgramDesc& a, const GrGLProgramDesc& b) { |
| 98 return memcmp(a.asKey(), b.asKey(), a.keyLength() & ~0x3) < 0; | 98 return memcmp(a.asKey(), b.asKey(), a.keyLength() & ~0x3) < 0; |
| 99 } | 99 } |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 // Specifies where the initial color comes from before the stages are applie
d. | 102 // Specifies where the initial color comes from before the stages are applie
d. |
| 103 enum ColorInput { | 103 enum ColorInput { |
| 104 kSolidWhite_ColorInput, | 104 kSolidWhite_ColorInput, |
| 105 kTransBlack_ColorInput, | |
| 106 kAttribute_ColorInput, | 105 kAttribute_ColorInput, |
| 107 kUniform_ColorInput, | 106 kUniform_ColorInput, |
| 108 | 107 |
| 109 kColorInputCnt | 108 kColorInputCnt |
| 110 }; | 109 }; |
| 111 | 110 |
| 112 enum CoverageOutput { | 111 enum CoverageOutput { |
| 113 // modulate color and coverage, write result as the color output. | 112 // modulate color and coverage, write result as the color output. |
| 114 kModulate_CoverageOutput, | 113 kModulate_CoverageOutput, |
| 115 // Writes color*coverage as the primary color output and also writes cov
erage as the | 114 // Writes color*coverage as the primary color output and also writes cov
erage as the |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod
e. TODO: Split out | 251 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod
e. TODO: Split out |
| 253 // part of GrGLShaderBuilder that is used by effects so that this header doe
sn't need to be | 252 // part of GrGLShaderBuilder that is used by effects so that this header doe
sn't need to be |
| 254 // visible to GrGLEffects. Then make public accessors as necessary and remov
e friends. | 253 // visible to GrGLEffects. Then make public accessors as necessary and remov
e friends. |
| 255 friend class GrGLProgram; | 254 friend class GrGLProgram; |
| 256 friend class GrGLShaderBuilder; | 255 friend class GrGLShaderBuilder; |
| 257 friend class GrGLFullShaderBuilder; | 256 friend class GrGLFullShaderBuilder; |
| 258 friend class GrGLFragmentOnlyShaderBuilder; | 257 friend class GrGLFragmentOnlyShaderBuilder; |
| 259 }; | 258 }; |
| 260 | 259 |
| 261 #endif | 260 #endif |
| OLD | NEW |