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

Unified Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp

Issue 1434483002: Add addFragPosUniform to GrGLrogramBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make things private 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index eea8850f8ff334efc8b275247f5ff3aac0b1918e..d06c2f348872b7c8c2406c2d338156e9785d785c 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -143,17 +143,15 @@ const char* GrGLFragmentShaderBuilder::fragmentPosition() {
static const char* kTempName = "tmpXYFragCoord";
static const char* kCoordName = "fragCoordYDown";
if (!fSetupFragPosition) {
- // temporarily change the stage index because we're inserting non-stage code.
- GrGLProgramBuilder::AutoStageRestore asr(fProgramBuilder);
SkASSERT(!fProgramBuilder->fUniformHandles.fRTHeightUni.isValid());
const char* rtHeightName;
fProgramBuilder->fUniformHandles.fRTHeightUni =
- fProgramBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
- kFloat_GrSLType,
- kDefault_GrSLPrecision,
- "RTHeight",
- &rtHeightName);
+ fProgramBuilder->addFragPosUniform(GrGLProgramBuilder::kFragment_Visibility,
+ kFloat_GrSLType,
+ kDefault_GrSLPrecision,
+ "RTHeight",
+ &rtHeightName);
// The Adreno compiler seems to be very touchy about access to "gl_FragCoord".
// Accessing glFragCoord.zw can cause a program to fail to link. Additionally,
« no previous file with comments | « no previous file | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698