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

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

Issue 545693004: Calculate stage stats in GrOptDrawState (Closed) Base URL: https://skia.googlesource.com/skia.git@connectOpt2
Patch Set: Nit Created 6 years, 3 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
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | src/gpu/gl/GrGLProgramDesc.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 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return reinterpret_cast<T*>(reinterpret_cast<intptr_t>(fKey.begin()) + O FFSET); 194 return reinterpret_cast<T*>(reinterpret_cast<intptr_t>(fKey.begin()) + O FFSET);
195 } 195 }
196 196
197 template<typename T, size_t OFFSET> const T* atOffset() const { 197 template<typename T, size_t OFFSET> const T* atOffset() const {
198 return reinterpret_cast<const T*>(reinterpret_cast<intptr_t>(fKey.begin( )) + OFFSET); 198 return reinterpret_cast<const T*>(reinterpret_cast<intptr_t>(fKey.begin( )) + OFFSET);
199 } 199 }
200 200
201 KeyHeader* header() { return this->atOffset<KeyHeader, kHeaderOffset>(); } 201 KeyHeader* header() { return this->atOffset<KeyHeader, kHeaderOffset>(); }
202 202
203 // Shared code between setRandom() and Build(). 203 // Shared code between setRandom() and Build().
204 static bool GetEffectKeyAndUpdateStats(const GrEffectStage& stage, 204 static bool GetEffectKey(const GrEffectStage& stage, const GrGLCaps& caps,
205 const GrGLCaps& caps, 205 bool useExplicitLocalCoords, GrEffectKeyBuilder* b,
206 bool useExplicitLocalCoords, 206 uint16_t* effectKeySize);
207 GrEffectKeyBuilder* b,
208 uint16_t* effectKeySize,
209 bool* setTrueIfReadsDst,
210 bool* setTrueIfReadsPos,
211 bool* setTrueIfRequiresVertexShader);
212 207
213 void finalize(); 208 void finalize();
214 209
215 const KeyHeader& getHeader() const { return *this->atOffset<KeyHeader, kHead erOffset>(); } 210 const KeyHeader& getHeader() const { return *this->atOffset<KeyHeader, kHead erOffset>(); }
216 211
217 /** Used to provide effects' keys to their emitCode() function. */ 212 /** Used to provide effects' keys to their emitCode() function. */
218 class EffectKeyProvider { 213 class EffectKeyProvider {
219 public: 214 public:
220 enum EffectType { 215 enum EffectType {
221 kGeometryProcessor_EffectType, 216 kGeometryProcessor_EffectType,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 friend class GrGLProgram; 265 friend class GrGLProgram;
271 friend class GrGLProgramBuilder; 266 friend class GrGLProgramBuilder;
272 friend class GrGLFullProgramBuilder; 267 friend class GrGLFullProgramBuilder;
273 friend class GrGLFragmentOnlyProgramBuilder; 268 friend class GrGLFragmentOnlyProgramBuilder;
274 friend class GrGLVertexShaderBuilder; 269 friend class GrGLVertexShaderBuilder;
275 friend class GrGLFragmentShaderBuilder; 270 friend class GrGLFragmentShaderBuilder;
276 friend class GrGLGeometryShaderBuilder; 271 friend class GrGLGeometryShaderBuilder;
277 }; 272 };
278 273
279 #endif 274 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698