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

Unified Diff: src/gpu/effects/GrDashingEffect.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/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDisableColorXP.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDashingEffect.cpp
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index e62ede0a33c1e9cc9b01f6ea459c211542aff47d..1516efd2b212741427048adb4c9fe5505784dd0e 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -23,8 +23,8 @@
#include "batches/GrVertexBatch.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLGeometryProcessor.h"
-#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
+#include "glsl/GrGLSLUniformHandler.h"
#include "glsl/GrGLSLVarying.h"
#include "glsl/GrGLSLVertexShaderBuilder.h"
@@ -863,9 +863,9 @@ GLDashingCircleEffect::GLDashingCircleEffect() {
void GLDashingCircleEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
const DashingCircleEffect& dce = args.fGP.cast<DashingCircleEffect>();
- GrGLSLGPBuilder* pb = args.fPB;
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
+ GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
// emit attributes
varyingHandler->emitAttributes(dce);
@@ -883,16 +883,16 @@ void GLDashingCircleEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
// Setup pass through color
if (!dce.colorIgnored()) {
- this->setupUniformColor(pb, fragBuilder, args.fOutputColor, &fColorUniform);
+ this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor, &fColorUniform);
}
// Setup position
- this->setupPosition(pb, vertBuilder, gpArgs, dce.inPosition()->fName);
+ this->setupPosition(vertBuilder, gpArgs, dce.inPosition()->fName);
// emit transforms
- this->emitTransforms(args.fPB,
- vertBuilder,
+ this->emitTransforms(vertBuilder,
varyingHandler,
+ uniformHandler,
gpArgs->fPositionVar,
dce.inPosition()->fName,
dce.localMatrix(),
@@ -1075,10 +1075,10 @@ GLDashingLineEffect::GLDashingLineEffect() {
void GLDashingLineEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
const DashingLineEffect& de = args.fGP.cast<DashingLineEffect>();
- GrGLSLGPBuilder* pb = args.fPB;
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
+ GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
// emit attributes
varyingHandler->emitAttributes(de);
@@ -1097,16 +1097,16 @@ void GLDashingLineEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
// Setup pass through color
if (!de.colorIgnored()) {
- this->setupUniformColor(pb, fragBuilder, args.fOutputColor, &fColorUniform);
+ this->setupUniformColor(fragBuilder, uniformHandler, args.fOutputColor, &fColorUniform);
}
// Setup position
- this->setupPosition(pb, vertBuilder, gpArgs, de.inPosition()->fName);
+ this->setupPosition(vertBuilder, gpArgs, de.inPosition()->fName);
// emit transforms
- this->emitTransforms(args.fPB,
- vertBuilder,
+ this->emitTransforms(vertBuilder,
varyingHandler,
+ uniformHandler,
gpArgs->fPositionVar,
de.inPosition()->fName,
de.localMatrix(),
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDisableColorXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698