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

Side by Side Diff: src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp

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/GrGLSLFragmentShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLGeometryProcessor.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 #include "GrGLSLFragmentShaderBuilder.h" 8 #include "GrGLSLFragmentShaderBuilder.h"
9 #include "GrRenderTarget.h" 9 #include "GrRenderTarget.h"
10 #include "gl/GrGLGpu.h" 10 #include "gl/GrGLGpu.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const char* GrGLSLFragmentShaderBuilder::dstColor() { 169 const char* GrGLSLFragmentShaderBuilder::dstColor() {
170 fHasReadDstColor = true; 170 fHasReadDstColor = true;
171 171
172 const char* override = fProgramBuilder->primitiveProcessor().getDestColorOve rride(); 172 const char* override = fProgramBuilder->primitiveProcessor().getDestColorOve rride();
173 if (override != nullptr) { 173 if (override != nullptr) {
174 return override; 174 return override;
175 } 175 }
176 176
177 const GrGLSLCaps* glslCaps = fProgramBuilder->glslCaps(); 177 const GrGLSLCaps* glslCaps = fProgramBuilder->glslCaps();
178 if (glslCaps->fbFetchSupport()) { 178 if (glslCaps->fbFetchSupport()) {
179 this->addFeature(1 << (GrGLSLFragmentShaderBuilder::kLastGLSLPrivateFeat ure + 1), 179 this->addFeature(1 << kFramebufferFetch_GLSLPrivateFeature,
180 glslCaps->fbFetchExtensionString()); 180 glslCaps->fbFetchExtensionString());
181 181
182 // Some versions of this extension string require declaring custom color output on ES 3.0+ 182 // Some versions of this extension string require declaring custom color output on ES 3.0+
183 const char* fbFetchColorName = glslCaps->fbFetchColorName(); 183 const char* fbFetchColorName = glslCaps->fbFetchColorName();
184 if (glslCaps->fbFetchNeedsCustomOutput()) { 184 if (glslCaps->fbFetchNeedsCustomOutput()) {
185 this->enableCustomOutput(); 185 this->enableCustomOutput();
186 fOutputs[fCustomColorOutputIndex].setTypeModifier(GrShaderVar::kInOu t_TypeModifier); 186 fOutputs[fCustomColorOutputIndex].setTypeModifier(GrShaderVar::kInOu t_TypeModifier);
187 fbFetchColorName = DeclaredColorOutputName(); 187 fbFetchColorName = DeclaredColorOutputName();
188 } 188 }
189 return fbFetchColorName; 189 return fbFetchColorName;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 273
274 void GrGLSLFragmentBuilder::onAfterChildProcEmitCode() { 274 void GrGLSLFragmentBuilder::onAfterChildProcEmitCode() {
275 SkASSERT(fSubstageIndices.count() >= 2); 275 SkASSERT(fSubstageIndices.count() >= 2);
276 fSubstageIndices.pop_back(); 276 fSubstageIndices.pop_back();
277 fSubstageIndices.back()++; 277 fSubstageIndices.back()++;
278 int removeAt = fMangleString.findLastOf('_'); 278 int removeAt = fMangleString.findLastOf('_');
279 fMangleString.remove(removeAt, fMangleString.size() - removeAt); 279 fMangleString.remove(removeAt, fMangleString.size() - removeAt);
280 } 280 }
281 281
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLGeometryProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698