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

Side by Side Diff: src/gpu/glsl/GrGLSLVertexShaderBuilder.h

Issue 1438003003: Move all ShaderBuilder files to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@glslProgBuild
Patch Set: nits Created 5 years, 1 month 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/glsl/GrGLSLTextureSampler.h ('k') | src/gpu/glsl/GrGLSLVertexShaderBuilder.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 GrGLSLVertexShader_DEFINED
9 #define GrGLVertexShader_DEFINED 9 #define GrGLSLVertexShader_DEFINED
10 10
11 #include "GrGLShaderBuilder.h" 11 #include "GrGLSLShaderBuilder.h"
12 #include "GrGeometryProcessor.h" 12 #include "GrGeometryProcessor.h"
13 13
14 class GrGLSLVarying; 14 class GrGLSLVarying;
15 15
16 class GrGLVertexBuilder : public GrGLShaderBuilder { 16 class GrGLSLVertexBuilder : public GrGLSLShaderBuilder {
17 public: 17 public:
18 GrGLVertexBuilder(GrGLSLProgramBuilder* program); 18 GrGLSLVertexBuilder(GrGLSLProgramBuilder* program);
19 19
20 void transformToNormalizedDeviceSpace(const GrShaderVar& posVar); 20 void transformToNormalizedDeviceSpace(const GrShaderVar& posVar);
21 void emitAttributes(const GrGeometryProcessor& gp); 21 void emitAttributes(const GrGeometryProcessor& gp);
22 22
23 void addAttribute(const GrGeometryProcessor::Attribute* attr) { 23 void addAttribute(const GrGeometryProcessor::Attribute* attr) {
24 this->addAttribute(GrShaderVar(attr->fName, 24 this->addAttribute(GrShaderVar(attr->fName,
25 GrVertexAttribTypeToSLType(attr->fType), 25 GrVertexAttribTypeToSLType(attr->fType),
26 GrShaderVar::kAttribute_TypeModifier, 26 GrShaderVar::kAttribute_TypeModifier,
27 GrShaderVar::kNonArray, 27 GrShaderVar::kNonArray,
28 attr->fPrecision)); 28 attr->fPrecision));
29 } 29 }
30 30
31 private: 31 private:
32 /* 32 /*
33 * Internal call for GrGLProgramBuilder.addVarying 33 * Internal call for GrGLProgramBuilder.addVarying
34 */ 34 */
35 void addVarying(const char* name, GrSLPrecision, GrGLSLVarying*); 35 void addVarying(const char* name, GrSLPrecision, GrGLSLVarying*);
36 36
37 // an internal call which checks for uniquness of a var before adding it to the list of inputs 37 // an internal call which checks for uniquness of a var before adding it to the list of inputs
38 bool addAttribute(const GrShaderVar& var); 38 bool addAttribute(const GrShaderVar& var);
39 39
40 void onFinalize() override {} 40 void onFinalize() override {}
41 41
42 const char* fRtAdjustName; 42 const char* fRtAdjustName;
43 43
44 friend class GrGLProgramBuilder; 44 friend class GrGLProgramBuilder;
45 45
46 typedef GrGLShaderBuilder INHERITED; 46 typedef GrGLSLShaderBuilder INHERITED;
47 }; 47 };
48 48
49 #endif 49 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLTextureSampler.h ('k') | src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698