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

Side by Side Diff: src/gpu/gl/builders/GrGLVertexShaderBuilder.h

Issue 628293002: Plumb OptDrawState down to VertexShaderBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up Created 6 years, 2 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 2014 Google Inc. 2 * Copyright 2014 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 GrGLVertexShader_DEFINED 8 #ifndef GrGLVertexShader_DEFINED
9 #define GrGLVertexShader_DEFINED 9 #define GrGLVertexShader_DEFINED
10 #include "GrGLShaderBuilder.h" 10 #include "GrGLShaderBuilder.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 /* 47 /*
48 * Internal call for GrGLFullProgramBuilder.addVarying 48 * Internal call for GrGLFullProgramBuilder.addVarying
49 */ 49 */
50 void addVarying(GrSLType type, 50 void addVarying(GrSLType type,
51 const char* name, 51 const char* name,
52 const char** vsOutName); 52 const char** vsOutName);
53 53
54 /* 54 /*
55 * private helpers for compilation by GrGLProgramBuilder 55 * private helpers for compilation by GrGLProgramBuilder
56 */ 56 */
57 void bindProgramLocations(GrGLuint programId); 57 void bindProgramLocations(const GrOptDrawState&, GrGLuint programId);
58 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader Ids) const; 58 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader Ids) const;
59 void emitCodeBeforeEffects(GrGLSLExpr4* color, GrGLSLExpr4* coverage); 59 void emitCodeBeforeEffects(GrGLSLExpr4* color, GrGLSLExpr4* coverage);
60 void emitCodeAfterEffects(); 60 void emitCodeAfterEffects();
61 61
62 struct AttributePair { 62 struct AttributePair {
63 void set(int index, const SkString& name) { 63 void set(int index, const SkString& name) {
64 fIndex = index; fName = name; 64 fIndex = index; fName = name;
65 } 65 }
66 int fIndex; 66 int fIndex;
67 SkString fName; 67 SkString fName;
68 }; 68 };
69 69
70 GrGLShaderVar* fPositionVar; 70 GrGLShaderVar* fPositionVar;
71 GrGLShaderVar* fLocalCoordsVar; 71 GrGLShaderVar* fLocalCoordsVar;
72 int fEffectAttribOffset; 72 int fEffectAttribOffset;
73 73
74 friend class GrGLFullProgramBuilder; 74 friend class GrGLFullProgramBuilder;
75 75
76 typedef GrGLFullShaderBuilder INHERITED; 76 typedef GrGLFullShaderBuilder INHERITED;
77 }; 77 };
78 78
79 #endif 79 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698