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

Unified Diff: src/effects/gradients/SkSweepGradient.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/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkSweepGradient.cpp
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 3df7144337502914329ff805b0428ac23cb8f63a..24e86d023d78f0b01a7061129632a840a2e36ed7 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -168,7 +168,8 @@ void SkSweepGradient::SweepGradientContext::shadeSpan16(int x, int y, uint16_t*
#include "SkGr.h"
#include "gl/GrGLContext.h"
-#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLCaps.h"
+#include "glsl/GrGLSLFragmentShaderBuilder.h"
class GrGLSweepGradient : public GrGLGradientEffect {
public:
@@ -247,7 +248,7 @@ const GrFragmentProcessor* GrSweepGradient::TestCreate(GrProcessorTestData* d) {
void GrGLSweepGradient::emitCode(EmitArgs& args) {
const GrSweepGradient& ge = args.fFp.cast<GrSweepGradient>();
- this->emitUniforms(args.fBuilder, ge);
+ this->emitUniforms(args.fUniformHandler, ge);
SkString coords2D = args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0);
SkString t;
// 0.1591549430918 is 1/(2*pi), used since atan returns values [-pi, pi]
@@ -260,8 +261,8 @@ void GrGLSweepGradient::emitCode(EmitArgs& args) {
t.printf("atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5",
coords2D.c_str(), coords2D.c_str());
}
- this->emitColor(args.fBuilder,
- args.fFragBuilder,
+ this->emitColor(args.fFragBuilder,
+ args.fUniformHandler,
args.fGLSLCaps,
ge, t.c_str(),
args.fOutputColor,
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698