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

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

Issue 164973002: Defer deletion of our shaders until after linking the gl program to work around an Android emulator… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 | « AUTHORS ('k') | src/gpu/gl/GrGLShaderBuilder.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 2012 Google Inc. 2 * Copyright 2012 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 GrGLShaderBuilder_DEFINED 8 #ifndef GrGLShaderBuilder_DEFINED
9 #define GrGLShaderBuilder_DEFINED 9 #define GrGLShaderBuilder_DEFINED
10 10
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // generating stage code. 241 // generating stage code.
242 void nameVariable(SkString* out, char prefix, const char* name); 242 void nameVariable(SkString* out, char prefix, const char* name);
243 243
244 // Helper for emitEffects(). 244 // Helper for emitEffects().
245 void createAndEmitEffects(GrGLProgramEffectsBuilder*, 245 void createAndEmitEffects(GrGLProgramEffectsBuilder*,
246 const GrEffectStage* effectStages[], 246 const GrEffectStage* effectStages[],
247 const EffectKey effectKeys[], 247 const EffectKey effectKeys[],
248 int effectCnt, 248 int effectCnt,
249 GrGLSLExpr4* inOutFSColor); 249 GrGLSLExpr4* inOutFSColor);
250 250
251 virtual bool compileAndAttachShaders(GrGLuint programId) const; 251 virtual bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint> * shaderIds) const;
252 virtual void bindProgramLocations(GrGLuint programId) const; 252 virtual void bindProgramLocations(GrGLuint programId) const;
253 253
254 void appendDecls(const VarArray&, SkString*) const; 254 void appendDecls(const VarArray&, SkString*) const;
255 void appendUniformDecls(ShaderVisibility, SkString*) const; 255 void appendUniformDecls(ShaderVisibility, SkString*) const;
256 256
257 private: 257 private:
258 class CodeStage : public SkNoncopyable { 258 class CodeStage : public SkNoncopyable {
259 public: 259 public:
260 CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffectStage(NULL) {} 260 CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffectStage(NULL) {}
261 261
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 const GrEffectStage* effectStages[], 415 const GrEffectStage* effectStages[],
416 const EffectKey effectKeys[], 416 const EffectKey effectKeys[],
417 int effectCnt, 417 int effectCnt,
418 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; 418 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE;
419 419
420 GrGLUniformManager::UniformHandle getViewMatrixUniform() const { 420 GrGLUniformManager::UniformHandle getViewMatrixUniform() const {
421 return fViewMatrixUniform; 421 return fViewMatrixUniform;
422 } 422 }
423 423
424 protected: 424 protected:
425 virtual bool compileAndAttachShaders(GrGLuint programId) const SK_OVERRIDE; 425 virtual bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint> * shaderIds) const SK_OVERRIDE;
426 virtual void bindProgramLocations(GrGLuint programId) const SK_OVERRIDE; 426 virtual void bindProgramLocations(GrGLuint programId) const SK_OVERRIDE;
427 427
428 private: 428 private:
429 const GrGLProgramDesc& fDesc; 429 const GrGLProgramDesc& fDesc;
430 VarArray fVSAttrs; 430 VarArray fVSAttrs;
431 VarArray fVSOutputs; 431 VarArray fVSOutputs;
432 VarArray fGSInputs; 432 VarArray fGSInputs;
433 VarArray fGSOutputs; 433 VarArray fGSOutputs;
434 434
435 SkString fVSCode; 435 SkString fVSCode;
(...skipping 30 matching lines...) Expand all
466 int effectCnt, 466 int effectCnt,
467 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; 467 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE;
468 468
469 private: 469 private:
470 int fNumTexCoordSets; 470 int fNumTexCoordSets;
471 471
472 typedef GrGLShaderBuilder INHERITED; 472 typedef GrGLShaderBuilder INHERITED;
473 }; 473 };
474 474
475 #endif 475 #endif
OLDNEW
« no previous file with comments | « AUTHORS ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698