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 20 matching lines...) Expand all Loading... |
31 } | 31 } |
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 GrEffectStage stages[GrDrawState::kNumStages]); | 42 const GrEffectStage stages[GrDrawState::kNumStages]); |
42 | 43 |
43 /** | 44 /** |
44 * Builds a program descriptor from a GrDrawState. Whether the primitive typ
e is points, the | 45 * Builds a program descriptor from a GrDrawState. Whether the primitive typ
e is points, the |
45 * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also
inputs. | 46 * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also
inputs. |
46 */ | 47 */ |
47 static void Build(const GrDrawState&, | 48 static void Build(const GrDrawState&, |
48 bool isPoints, | 49 bool isPoints, |
49 GrDrawState::BlendOptFlags, | 50 GrDrawState::BlendOptFlags, |
50 GrBlendCoeff srcCoeff, | 51 GrBlendCoeff srcCoeff, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 int8_t fCoverageAttributeIndex; | 106 int8_t fCoverageAttributeIndex; |
106 int8_t fLocalCoordsAttributeIndex; | 107 int8_t fLocalCoordsAttributeIndex; |
107 | 108 |
108 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod
e. TODO: Move all | 109 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod
e. TODO: Move all |
109 // code generation to GrGLShaderBuilder (and maybe add getters rather than f
riending). | 110 // code generation to GrGLShaderBuilder (and maybe add getters rather than f
riending). |
110 friend class GrGLProgram; | 111 friend class GrGLProgram; |
111 friend class GrGLShaderBuilder; | 112 friend class GrGLShaderBuilder; |
112 }; | 113 }; |
113 | 114 |
114 #endif | 115 #endif |
OLD | NEW |