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

Unified Diff: src/gpu/GrOvalRenderer.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/GrFragmentProcessor.cpp ('k') | src/gpu/GrPathProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index e13c0d11e4e5aa448c33607d98b6ab1d94e20473..3862900d4c643c25ea4fc88df6148fdca013f068 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -23,10 +23,10 @@
#include "effects/GrRRectEffect.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLGeometryProcessor.h"
-#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
#include "glsl/GrGLSLVarying.h"
#include "glsl/GrGLSLVertexShaderBuilder.h"
+#include "glsl/GrGLSLUniformHandler.h"
#include "glsl/GrGLSLUtil.h"
// TODO(joshualitt) - Break this file up during GrBatch post implementation cleanup
@@ -98,9 +98,9 @@ public:
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{
const CircleEdgeEffect& ce = args.fGP.cast<CircleEdgeEffect>();
- GrGLSLGPBuilder* pb = args.fPB;
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
+ GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
// emit attributes
varyingHandler->emitAttributes(ce);
@@ -112,16 +112,17 @@ public:
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
// setup pass through color
if (!ce.colorIgnored()) {
- this->setupUniformColor(pb, fragBuilder, args.fOutputColor, &fColorUniform);
+ this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor,
+ &fColorUniform);
}
// Setup position
- this->setupPosition(pb, vertBuilder, gpArgs, ce.inPosition()->fName);
+ this->setupPosition(vertBuilder, gpArgs, ce.inPosition()->fName);
// emit transforms
- this->emitTransforms(args.fPB,
- vertBuilder,
+ this->emitTransforms(vertBuilder,
varyingHandler,
+ uniformHandler,
gpArgs->fPositionVar,
ce.inPosition()->fName,
ce.localMatrix(),
@@ -254,9 +255,9 @@ public:
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{
const EllipseEdgeEffect& ee = args.fGP.cast<EllipseEdgeEffect>();
- GrGLSLGPBuilder* pb = args.fPB;
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
+ GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
// emit attributes
varyingHandler->emitAttributes(ee);
@@ -274,16 +275,17 @@ public:
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
// setup pass through color
if (!ee.colorIgnored()) {
- this->setupUniformColor(pb, fragBuilder, args.fOutputColor, &fColorUniform);
+ this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor,
+ &fColorUniform);
}
// Setup position
- this->setupPosition(pb, vertBuilder, gpArgs, ee.inPosition()->fName);
+ this->setupPosition(vertBuilder, gpArgs, ee.inPosition()->fName);
// emit transforms
- this->emitTransforms(args.fPB,
- vertBuilder,
+ this->emitTransforms(vertBuilder,
varyingHandler,
+ uniformHandler,
gpArgs->fPositionVar,
ee.inPosition()->fName,
ee.localMatrix(),
@@ -436,9 +438,9 @@ public:
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
const DIEllipseEdgeEffect& ee = args.fGP.cast<DIEllipseEdgeEffect>();
- GrGLSLGPBuilder* pb = args.fPB;
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
+ GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
// emit attributes
varyingHandler->emitAttributes(ee);
@@ -456,21 +458,22 @@ public:
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
// setup pass through color
if (!ee.colorIgnored()) {
- this->setupUniformColor(pb, fragBuilder, args.fOutputColor, &fColorUniform);
+ this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor,
+ &fColorUniform);
}
// Setup position
- this->setupPosition(pb,
- vertBuilder,
+ this->setupPosition(vertBuilder,
+ uniformHandler,
gpArgs,
ee.inPosition()->fName,
ee.viewMatrix(),
&fViewMatrixUniform);
// emit transforms
- this->emitTransforms(args.fPB,
- vertBuilder,
+ this->emitTransforms(vertBuilder,
varyingHandler,
+ uniformHandler,
gpArgs->fPositionVar,
ee.inPosition()->fName,
args.fTransformsIn,
« no previous file with comments | « src/gpu/GrFragmentProcessor.cpp ('k') | src/gpu/GrPathProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698