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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Returns this as a uint32_t array to be used as a key in the program cache | 33 // Returns this as a uint32_t array to be used as a key in the program cache |
34 const uint32_t* asKey() const { | 34 const uint32_t* asKey() const { |
35 return reinterpret_cast<const uint32_t*>(this); | 35 return reinterpret_cast<const uint32_t*>(this); |
36 } | 36 } |
37 | 37 |
38 // For unit testing. | 38 // For unit testing. |
39 void setRandom(SkMWCRandom*, | 39 void setRandom(SkMWCRandom*, |
40 const GrGpuGL* gpu, | 40 const GrGpuGL* gpu, |
41 const GrTexture* dummyDstTexture, | 41 const GrTexture* dummyDstTexture, |
42 const GrEffectStage stages[GrDrawState::kNumStages], | 42 const GrEffectStage* stages[GrDrawState::kNumStages], |
43 int currAttribIndex); | 43 int currAttribIndex); |
44 | 44 |
45 /** | 45 /** |
46 * Builds a program descriptor from a GrDrawState. Whether the primitive typ
e is points, the | 46 * Builds a program descriptor from a GrDrawState. Whether the primitive typ
e is points, the |
47 * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also
inputs. | 47 * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also
inputs. |
48 */ | 48 */ |
49 static void Build(const GrDrawState&, | 49 static void Build(const GrDrawState&, |
50 bool isPoints, | 50 bool isPoints, |
51 GrDrawState::BlendOptFlags, | 51 GrDrawState::BlendOptFlags, |
52 GrBlendCoeff srcCoeff, | 52 GrBlendCoeff srcCoeff, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 int8_t fColorAttributeIndex; | 125 int8_t fColorAttributeIndex; |
126 int8_t fCoverageAttributeIndex; | 126 int8_t fCoverageAttributeIndex; |
127 | 127 |
128 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod
e. TODO: Move all | 128 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod
e. TODO: Move all |
129 // code generation to GrGLShaderBuilder (and maybe add getters rather than f
riending). | 129 // code generation to GrGLShaderBuilder (and maybe add getters rather than f
riending). |
130 friend class GrGLProgram; | 130 friend class GrGLProgram; |
131 friend class GrGLShaderBuilder; | 131 friend class GrGLShaderBuilder; |
132 }; | 132 }; |
133 | 133 |
134 #endif | 134 #endif |
OLD | NEW |