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

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

Issue 1673093002: Use noperspective interpolation for 2D draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fName -> fVsOut 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/GrGLSLGeometryProcessor.cpp ('k') | src/gpu/glsl/GrGLSLShaderVar.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 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 GrGLSLShaderBuilder_DEFINED 8 #ifndef GrGLSLShaderBuilder_DEFINED
9 #define GrGLSLShaderBuilder_DEFINED 9 #define GrGLSLShaderBuilder_DEFINED
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 fBuilder->codeAppend("}"); 115 fBuilder->codeAppend("}");
116 } 116 }
117 private: 117 private:
118 GrGLSLShaderBuilder* fBuilder; 118 GrGLSLShaderBuilder* fBuilder;
119 }; 119 };
120 120
121 protected: 121 protected:
122 typedef GrTAllocator<GrGLSLShaderVar> VarArray; 122 typedef GrTAllocator<GrGLSLShaderVar> VarArray;
123 void appendDecls(const VarArray& vars, SkString* out) const; 123 void appendDecls(const VarArray& vars, SkString* out) const;
124 124
125 /**
126 * Features that should only be enabled internally by the builders.
127 */
128 enum GLSLPrivateFeature {
129 kFragCoordConventions_GLSLPrivateFeature,
130 kBlendEquationAdvanced_GLSLPrivateFeature,
131 kBlendFuncExtended_GLSLPrivateFeature,
132 kExternalTexture_GLSLPrivateFeature,
133 kFramebufferFetch_GLSLPrivateFeature,
134 kNoPerspectiveInterpolation_GLSLPrivateFeature,
135 kLastGLSLPrivateFeature = kNoPerspectiveInterpolation_GLSLPrivateFeature
136 };
137
125 /* 138 /*
126 * A general function which enables an extension in a shader if the feature bit is not present 139 * A general function which enables an extension in a shader if the feature bit is not present
127 */ 140 */
128 void addFeature(uint32_t featureBit, const char* extensionName); 141 void addFeature(uint32_t featureBit, const char* extensionName);
129 142
130 enum InterfaceQualifier { 143 enum InterfaceQualifier {
131 kOut_InterfaceQualifier, 144 kOut_InterfaceQualifier,
132 kLastInterfaceQualifier = kOut_InterfaceQualifier 145 kLastInterfaceQualifier = kOut_InterfaceQualifier
133 }; 146 };
134 147
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 199
187 VarArray fInputs; 200 VarArray fInputs;
188 VarArray fOutputs; 201 VarArray fOutputs;
189 uint32_t fFeaturesAddedMask; 202 uint32_t fFeaturesAddedMask;
190 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; 203 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1];
191 int fCodeIndex; 204 int fCodeIndex;
192 bool fFinalized; 205 bool fFinalized;
193 206
194 friend class GrGLSLProgramBuilder; 207 friend class GrGLSLProgramBuilder;
195 friend class GrGLProgramBuilder; 208 friend class GrGLProgramBuilder;
209 friend class GrGLSLVaryingHandler; // to access noperspective interpolation feature.
196 friend class GrGLPathProgramBuilder; // to access fInputs. 210 friend class GrGLPathProgramBuilder; // to access fInputs.
197 friend class GrVkProgramBuilder; 211 friend class GrVkProgramBuilder;
198 }; 212 };
199 #endif 213 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLGeometryProcessor.cpp ('k') | src/gpu/glsl/GrGLSLShaderVar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698