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

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: 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
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return reinterpret_cast<T*>(reinterpret_cast<intptr_t>(fKey.begin()) + O FFSET); 187 return reinterpret_cast<T*>(reinterpret_cast<intptr_t>(fKey.begin()) + O FFSET);
188 } 188 }
189 189
190 template<typename T, size_t OFFSET> const T* atOffset() const { 190 template<typename T, size_t OFFSET> const T* atOffset() const {
191 return reinterpret_cast<const T*>(reinterpret_cast<intptr_t>(fKey.begin( )) + OFFSET); 191 return reinterpret_cast<const T*>(reinterpret_cast<intptr_t>(fKey.begin( )) + OFFSET);
192 } 192 }
193 193
194 KeyHeader* header() { return this->atOffset<KeyHeader, kHeaderOffset>(); } 194 KeyHeader* header() { return this->atOffset<KeyHeader, kHeaderOffset>(); }
195 195
196 // Shared code between setRandom() and Build(). 196 // Shared code between setRandom() and Build().
197 static bool GetEffectKeyAndUpdateStats(const GrEffectStage& stage, 197 static bool GetEffectKey(const GrEffectStage& stage, const GrGLCaps& caps,
bsalomon 2014/09/05 15:27:55 yay
198 const GrGLCaps& caps, 198 bool useExplicitLocalCoords, GrEffectKeyBuilder* b,
199 bool useExplicitLocalCoords, 199 uint16_t* effectKeySize);
200 GrEffectKeyBuilder* b,
201 uint16_t* effectKeySize,
202 bool* setTrueIfReadsDst,
203 bool* setTrueIfReadsPos,
204 bool* setTrueIfRequiresVertexShader);
205 200
206 void finalize(); 201 void finalize();
207 202
208 const KeyHeader& getHeader() const { return *this->atOffset<KeyHeader, kHead erOffset>(); } 203 const KeyHeader& getHeader() const { return *this->atOffset<KeyHeader, kHead erOffset>(); }
209 204
210 /** Used to provide effects' keys to their emitCode() function. */ 205 /** Used to provide effects' keys to their emitCode() function. */
211 class EffectKeyProvider { 206 class EffectKeyProvider {
212 public: 207 public:
213 enum EffectType { 208 enum EffectType {
214 kColor_EffectType, 209 kColor_EffectType,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 friend class GrGLProgram; 247 friend class GrGLProgram;
253 friend class GrGLProgramBuilder; 248 friend class GrGLProgramBuilder;
254 friend class GrGLFullProgramBuilder; 249 friend class GrGLFullProgramBuilder;
255 friend class GrGLFragmentOnlyProgramBuilder; 250 friend class GrGLFragmentOnlyProgramBuilder;
256 friend class GrGLVertexShaderBuilder; 251 friend class GrGLVertexShaderBuilder;
257 friend class GrGLFragmentShaderBuilder; 252 friend class GrGLFragmentShaderBuilder;
258 friend class GrGLGeometryShaderBuilder; 253 friend class GrGLGeometryShaderBuilder;
259 }; 254 };
260 255
261 #endif 256 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698