OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #ifndef GrGLProgram_DEFINED | 9 #ifndef GrGLProgram_DEFINED |
10 #define GrGLProgram_DEFINED | 10 #define GrGLProgram_DEFINED |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 * textures that need to be bound on each unit. It is the caller's responsib
ility to ensure | 92 * textures that need to be bound on each unit. It is the caller's responsib
ility to ensure |
93 * the program is bound before calling, and to bind the outgoing textures to
their respective | 93 * the program is bound before calling, and to bind the outgoing textures to
their respective |
94 * units upon return. (Each index in the array corresponds to its matching G
L texture unit.) | 94 * units upon return. (Each index in the array corresponds to its matching G
L texture unit.) |
95 */ | 95 */ |
96 void setData(const GrPrimitiveProcessor&, const GrPipeline&, | 96 void setData(const GrPrimitiveProcessor&, const GrPipeline&, |
97 SkTArray<const GrTextureAccess*>* textureBindings); | 97 SkTArray<const GrTextureAccess*>* textureBindings); |
98 | 98 |
99 protected: | 99 protected: |
100 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; | 100 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; |
101 typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray; | 101 typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray; |
102 typedef GrGLProgramDataManager::SeparableVaryingInfoArray SeparableVaryingIn
foArray; | 102 typedef GrGLProgramDataManager::VaryingInfoArray VaryingInfoArray; |
103 | 103 |
104 GrGLProgram(GrGLGpu*, | 104 GrGLProgram(GrGLGpu*, |
105 const GrProgramDesc&, | 105 const GrProgramDesc&, |
106 const BuiltinUniformHandles&, | 106 const BuiltinUniformHandles&, |
107 GrGLuint programID, | 107 GrGLuint programID, |
108 const UniformInfoArray&, | 108 const UniformInfoArray&, |
109 const SeparableVaryingInfoArray&, | 109 const VaryingInfoArray&, // used for NVPR only currently |
110 GrGLInstalledGeoProc* geometryProcessor, | 110 GrGLInstalledGeoProc* geometryProcessor, |
111 GrGLInstalledXferProc* xferProcessor, | 111 GrGLInstalledXferProc* xferProcessor, |
112 GrGLInstalledFragProcs* fragmentProcessors, | 112 GrGLInstalledFragProcs* fragmentProcessors, |
113 SkTArray<UniformHandle>* passSamplerUniforms); | 113 SkTArray<UniformHandle>* passSamplerUniforms); |
114 | 114 |
115 // A templated helper to loop over effects, set the transforms(via subclass)
and bind textures | 115 // A templated helper to loop over effects, set the transforms(via subclass)
and bind textures |
116 void setFragmentData(const GrPrimitiveProcessor&, const GrPipeline&, | 116 void setFragmentData(const GrPrimitiveProcessor&, const GrPipeline&, |
117 SkTArray<const GrTextureAccess*>* textureBindings); | 117 SkTArray<const GrTextureAccess*>* textureBindings); |
118 void setTransformData(const GrPrimitiveProcessor&, | 118 void setTransformData(const GrPrimitiveProcessor&, |
119 const GrFragmentProcessor&, | 119 const GrFragmentProcessor&, |
(...skipping 17 matching lines...) Expand all Loading... |
137 GrGLGpu* fGpu; | 137 GrGLGpu* fGpu; |
138 GrGLProgramDataManager fProgramDataManager; | 138 GrGLProgramDataManager fProgramDataManager; |
139 SkTArray<UniformHandle> fSamplerUniforms; | 139 SkTArray<UniformHandle> fSamplerUniforms; |
140 | 140 |
141 friend class GrGLProgramBuilder; | 141 friend class GrGLProgramBuilder; |
142 | 142 |
143 typedef SkRefCnt INHERITED; | 143 typedef SkRefCnt INHERITED; |
144 }; | 144 }; |
145 | 145 |
146 #endif | 146 #endif |
OLD | NEW |