| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::VaryingInfoArray VaryingInfoArray; | 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 SkTArray<GrGLSampler>&, |
| 109 const VaryingInfoArray&, // used for NVPR only currently | 110 const VaryingInfoArray&, // used for NVPR only currently |
| 110 GrGLSLPrimitiveProcessor* geometryProcessor, | 111 GrGLSLPrimitiveProcessor* geometryProcessor, |
| 111 GrGLSLXferProcessor* xferProcessor, | 112 GrGLSLXferProcessor* xferProcessor, |
| 112 const GrGLSLFragProcs& fragmentProcessors, | 113 const GrGLSLFragProcs& fragmentProcessors); |
| 113 SkTArray<UniformHandle>* passSamplerUniforms); | |
| 114 | 114 |
| 115 // A helper to loop over effects, set the transforms (via subclass) and bind
textures | 115 // A helper to loop over effects, set the transforms (via subclass) and bind
textures |
| 116 void setFragmentData(const GrPrimitiveProcessor&, const GrPipeline&, int* ne
xtSamplerIdx); | 116 void setFragmentData(const GrPrimitiveProcessor&, const GrPipeline&, int* ne
xtSamplerIdx); |
| 117 void setTransformData(const GrPrimitiveProcessor&, const GrFragmentProcessor
&, int index); | 117 void setTransformData(const GrPrimitiveProcessor&, const GrFragmentProcessor
&, int index); |
| 118 | 118 |
| 119 // Helper for setData() that sets the view matrix and loads the render targe
t height uniform | 119 // Helper for setData() that sets the view matrix and loads the render targe
t height uniform |
| 120 void setRenderTargetState(const GrPrimitiveProcessor&, const GrPipeline&); | 120 void setRenderTargetState(const GrPrimitiveProcessor&, const GrPipeline&); |
| 121 | 121 |
| 122 // Helper for setData() that binds textures and texel buffers to the appropr
iate texture units | 122 // Helper for setData() that binds textures and texel buffers to the appropr
iate texture units |
| 123 void bindTextures(const GrProcessor&, bool allowSRGBInputs, int* nextSampler
Idx); | 123 void bindTextures(const GrProcessor&, bool allowSRGBInputs, int* nextSampler
Idx); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 136 GrGLGpu* fGpu; | 136 GrGLGpu* fGpu; |
| 137 GrGLProgramDataManager fProgramDataManager; | 137 GrGLProgramDataManager fProgramDataManager; |
| 138 SkTArray<UniformHandle> fSamplerUniforms; | 138 SkTArray<UniformHandle> fSamplerUniforms; |
| 139 | 139 |
| 140 friend class GrGLProgramBuilder; | 140 friend class GrGLProgramBuilder; |
| 141 | 141 |
| 142 typedef SkRefCnt INHERITED; | 142 typedef SkRefCnt INHERITED; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 #endif | 145 #endif |
| OLD | NEW |