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

Unified Diff: src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp

Issue 1490283004: Create GLSLUniformHandler class for gpu backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up public api of uniformhandler Created 5 years 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 | « src/gpu/glsl/GrGLSLFragmentProcessor.cpp ('k') | src/gpu/glsl/GrGLSLGeometryProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
index 122db10ec99ba0d4a8aa4cd6cf0cd4199d93c55a..47708f370d5d9c3f2f615ad5a6fdb6c82ae073af 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
@@ -10,6 +10,7 @@
#include "glsl/GrGLSL.h"
#include "glsl/GrGLSLCaps.h"
#include "glsl/GrGLSLProgramBuilder.h"
+#include "glsl/GrGLSLUniformHandler.h"
#include "glsl/GrGLSLVarying.h"
const char* GrGLSLFragmentShaderBuilder::kDstTextureColorName = "_dstColor";
@@ -136,15 +137,9 @@ const char* GrGLSLFragmentShaderBuilder::fragmentPosition() {
static const char* kTempName = "tmpXYFragCoord";
static const char* kCoordName = "fragCoordYDown";
if (!fSetupFragPosition) {
- SkASSERT(!fProgramBuilder->fUniformHandles.fRTHeightUni.isValid());
const char* rtHeightName;
- fProgramBuilder->fUniformHandles.fRTHeightUni =
- fProgramBuilder->addFragPosUniform(GrGLSLProgramBuilder::kFragment_Visibility,
- kFloat_GrSLType,
- kDefault_GrSLPrecision,
- "RTHeight",
- &rtHeightName);
+ fProgramBuilder->addRTHeightUniform("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 | « src/gpu/glsl/GrGLSLFragmentProcessor.cpp ('k') | src/gpu/glsl/GrGLSLGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698