Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: src/gpu/gl/GrGLProgram.h

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: description Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLEffectMatrix.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 UniformHandle fColorFilterUni; 125 UniformHandle fColorFilterUni;
126 126
127 // We use the render target height to provide a y-down frag coord when s pecifying 127 // We use the render target height to provide a y-down frag coord when s pecifying
128 // origin_upper_left is not supported. 128 // origin_upper_left is not supported.
129 UniformHandle fRTHeightUni; 129 UniformHandle fRTHeightUni;
130 130
131 // Uniforms for computing texture coords to do the dst-copy lookup 131 // Uniforms for computing texture coords to do the dst-copy lookup
132 UniformHandle fDstCopyTopLeftUni; 132 UniformHandle fDstCopyTopLeftUni;
133 UniformHandle fDstCopyScaleUni; 133 UniformHandle fDstCopyScaleUni;
134 UniformHandle fDstCopySamplerUni; 134 UniformHandle fDstCopySamplerUni;
135
136 UniformHandles() {
137 fViewMatrixUni = GrGLUniformManager::kInvalidUniformHandle;
138 fColorUni = GrGLUniformManager::kInvalidUniformHandle;
139 fCoverageUni = GrGLUniformManager::kInvalidUniformHandle;
140 fColorFilterUni = GrGLUniformManager::kInvalidUniformHandle;
141 fRTHeightUni = GrGLUniformManager::kInvalidUniformHandle;
142 fDstCopyTopLeftUni = GrGLUniformManager::kInvalidUniformHandle;
143 fDstCopyScaleUni = GrGLUniformManager::kInvalidUniformHandle;
144 fDstCopySamplerUni = GrGLUniformManager::kInvalidUniformHandle;
145 }
146 }; 135 };
147 136
148 typedef SkSTArray<4, UniformHandle, true> SamplerUniSArray; 137 typedef SkSTArray<4, UniformHandle, true> SamplerUniSArray;
149 typedef SkSTArray<4, int, true> TextureUnitSArray; 138 typedef SkSTArray<4, int, true> TextureUnitSArray;
150 139
151 struct EffectAndSamplers { 140 struct EffectAndSamplers {
152 EffectAndSamplers() : fGLEffect(NULL) {} 141 EffectAndSamplers() : fGLEffect(NULL) {}
153 ~EffectAndSamplers() { delete fGLEffect; } 142 ~EffectAndSamplers() { delete fGLEffect; }
154 GrGLEffect* fGLEffect; 143 GrGLEffect* fGLEffect;
155 SamplerUniSArray fSamplerUnis; // sampler uni handles for effect's G rTextureAccess 144 SamplerUniSArray fSamplerUnis; // sampler uni handles for effect's G rTextureAccess
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 GrGLProgramDesc fDesc; 210 GrGLProgramDesc fDesc;
222 const GrGLContext& fContext; 211 const GrGLContext& fContext;
223 212
224 GrGLUniformManager fUniformManager; 213 GrGLUniformManager fUniformManager;
225 UniformHandles fUniformHandles; 214 UniformHandles fUniformHandles;
226 215
227 typedef GrRefCnt INHERITED; 216 typedef GrRefCnt INHERITED;
228 }; 217 };
229 218
230 #endif 219 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLEffectMatrix.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698