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

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

Issue 647183002: Revert of Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: 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
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | tests/GLProgramsTest.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 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 10
11 #include "GrGLShaderBuilder.h" 11 #include "GrGLShaderBuilder.h"
12 12
13 class GrGLProgramBuilder; 13 class GrGLProgramBuilder;
14 14
15 // TODO we only actually ever need to return a GrGLShaderBuilder for this guy, n one of the below 15 // TODO we only actually ever need to return a GrGLShaderBuilder for this guy, n one of the below
16 // functions need to be part of VertexShaderBuilder's public interface 16 // functions need to be part of VertexShaderBuilder's public interface
17 class GrGLVertexBuilder : public GrGLShaderBuilder { 17 class GrGLVertexBuilder : public GrGLShaderBuilder {
18 public: 18 public:
19 GrGLVertexBuilder(GrGLProgramBuilder* program); 19 GrGLVertexBuilder(GrGLProgramBuilder* program);
20 20
21 /** 21 /**
22 * Are explicit local coordinates provided as input to the vertex shader. 22 * Are explicit local coordinates provided as input to the vertex shader.
23 */ 23 */
24 bool hasLocalCoords() const { return (fLocalCoordsVar != fPositionVar); } 24 bool hasExplicitLocalCoords() const { return (fLocalCoordsVar != fPositionVa r); }
25 25
26 /** Returns a vertex attribute that represents the local coords in the VS. T his may be the same 26 /** Returns a vertex attribute that represents the local coords in the VS. T his may be the same
27 as positionAttribute() or it may not be. It depends upon whether the ren dering code 27 as positionAttribute() or it may not be. It depends upon whether the ren dering code
28 specified explicit local coords or not in the GrDrawState. */ 28 specified explicit local coords or not in the GrDrawState. */
29 const GrGLShaderVar& localCoordsAttribute() const { return *fLocalCoordsVar; } 29 const GrGLShaderVar& localCoordsAttribute() const { return *fLocalCoordsVar; }
30 30
31 /** Returns a vertex attribute that represents the vertex position in the VS . This is the 31 /** Returns a vertex attribute that represents the vertex position in the VS . This is the
32 pre-matrix position and is commonly used by effects to compute texture c oords via a matrix. 32 pre-matrix position and is commonly used by effects to compute texture c oords via a matrix.
33 */ 33 */
34 const GrGLShaderVar& positionAttribute() const { return *fPositionVar; } 34 const GrGLShaderVar& positionAttribute() const { return *fPositionVar; }
(...skipping 26 matching lines...) Expand all
61 }; 61 };
62 62
63 GrGLShaderVar* fPositionVar; 63 GrGLShaderVar* fPositionVar;
64 GrGLShaderVar* fLocalCoordsVar; 64 GrGLShaderVar* fLocalCoordsVar;
65 int fEffectAttribOffset; 65 int fEffectAttribOffset;
66 66
67 typedef GrGLShaderBuilder INHERITED; 67 typedef GrGLShaderBuilder INHERITED;
68 }; 68 };
69 69
70 #endif 70 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698