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

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

Issue 1682703003: Add some backend flexibility for shader declarations in ProgramBuilding. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix dtor Created 4 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 | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLVarying.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 GrGLSLProgramBuilder_DEFINED 8 #ifndef GrGLSLProgramBuilder_DEFINED
9 #define GrGLSLProgramBuilder_DEFINED 9 #define GrGLSLProgramBuilder_DEFINED
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Generates a name for a variable. The generated string will be name prefix ed by the prefix 63 // Generates a name for a variable. The generated string will be name prefix ed by the prefix
64 // char (unless the prefix is '\0'). It also will mangle the name to be stag e-specific unless 64 // char (unless the prefix is '\0'). It also will mangle the name to be stag e-specific unless
65 // explicitly asked not to. 65 // explicitly asked not to.
66 void nameVariable(SkString* out, char prefix, const char* name, bool mangle = true); 66 void nameVariable(SkString* out, char prefix, const char* name, bool mangle = true);
67 67
68 virtual GrGLSLUniformHandler* uniformHandler() = 0; 68 virtual GrGLSLUniformHandler* uniformHandler() = 0;
69 virtual const GrGLSLUniformHandler* uniformHandler() const = 0; 69 virtual const GrGLSLUniformHandler* uniformHandler() const = 0;
70 virtual GrGLSLVaryingHandler* varyingHandler() = 0; 70 virtual GrGLSLVaryingHandler* varyingHandler() = 0;
71 71
72 // Used for backend customization of the output color and secondary color va riables from the
73 // fragment processor. Only used if the outputs are explicitly declared in t he shaders
74 virtual void finalizeFragmentOutputColor(GrGLSLShaderVar& outputColor) {}
75 virtual void finalizeFragmentSecondaryColor(GrGLSLShaderVar& outputColor) {}
76
72 // number of each input/output type in a single allocation block, used by ma ny builders 77 // number of each input/output type in a single allocation block, used by ma ny builders
73 static const int kVarsPerBlock; 78 static const int kVarsPerBlock;
74 79
75 GrGLSLVertexBuilder fVS; 80 GrGLSLVertexBuilder fVS;
76 GrGLSLGeometryBuilder fGS; 81 GrGLSLGeometryBuilder fGS;
77 GrGLSLFragmentShaderBuilder fFS; 82 GrGLSLFragmentShaderBuilder fFS;
78 83
79 int fStageIndex; 84 int fStageIndex;
80 85
81 const DrawArgs& fArgs; 86 const DrawArgs& fArgs;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void verify(const GrFragmentProcessor&); 145 void verify(const GrFragmentProcessor&);
141 146
142 virtual void emitSamplers(const GrProcessor& processor, 147 virtual void emitSamplers(const GrProcessor& processor,
143 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0; 148 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0;
144 149
145 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; 150 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms;
146 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; 151 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords;
147 }; 152 };
148 153
149 #endif 154 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLVarying.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698