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

Unified Diff: src/gpu/GrOvalRenderer.cpp

Issue 635533005: Revert of Cleanup of shader building system (Closed) Base URL: https://skia.googlesource.com/skia.git@solo_gp
Patch Set: Created 6 years, 2 months 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/GrOptDrawState.cpp ('k') | src/gpu/effects/GrBezierEffect.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 4dda3b5113c7816a8104bd5d40fea15d1d79cf73..7a84f80805d9bf5cc6ab8c1b3d205f4525634343 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -7,7 +7,7 @@
#include "GrOvalRenderer.h"
-#include "gl/builders/GrGLProgramBuilder.h"
+#include "gl/builders/GrGLFullProgramBuilder.h"
#include "gl/GrGLProcessor.h"
#include "gl/GrGLSL.h"
#include "gl/GrGLGeometryProcessor.h"
@@ -92,7 +92,7 @@
GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&)
: INHERITED (factory) {}
- virtual void emitCode(GrGLGPBuilder* builder,
+ virtual void emitCode(GrGLFullProgramBuilder* builder,
const GrGeometryProcessor& geometryProcessor,
const GrProcessorKey& key,
const char* outputColor,
@@ -103,10 +103,10 @@
const char *vsName, *fsName;
builder->addVarying(kVec4f_GrSLType, "CircleEdge", &vsName, &fsName);
- GrGLVertexBuilder* vsBuilder = builder->getVertexShaderBuilder();;
+ GrGLVertexShaderBuilder* vsBuilder = builder->getVertexShaderBuilder();;
vsBuilder->codeAppendf("\t%s = %s;\n", vsName, circleEffect.inCircleEdge().c_str());
- GrGLGPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLProcessorFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
fsBuilder->codeAppendf("\tfloat d = length(%s.xy);\n", fsName);
fsBuilder->codeAppendf("\tfloat edgeAlpha = clamp(%s.z - d, 0.0, 1.0);\n", fsName);
if (circleEffect.isStroked()) {
@@ -210,7 +210,7 @@
GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&)
: INHERITED (factory) {}
- virtual void emitCode(GrGLGPBuilder* builder,
+ virtual void emitCode(GrGLFullProgramBuilder* builder,
const GrGeometryProcessor& geometryProcessor,
const GrProcessorKey& key,
const char* outputColor,
@@ -224,7 +224,7 @@
builder->addVarying(kVec2f_GrSLType, "EllipseOffsets", &vsOffsetName, &fsOffsetName);
- GrGLVertexBuilder* vsBuilder = builder->getVertexShaderBuilder();
+ GrGLVertexShaderBuilder* vsBuilder = builder->getVertexShaderBuilder();
vsBuilder->codeAppendf("%s = %s;", vsOffsetName,
ellipseEffect.inEllipseOffset().c_str());
@@ -232,7 +232,7 @@
vsBuilder->codeAppendf("%s = %s;", vsRadiiName, ellipseEffect.inEllipseRadii().c_str());
// for outer curve
- GrGLGPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLProcessorFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
fsBuilder->codeAppendf("\tvec2 scaledOffset = %s*%s.xy;\n", fsOffsetName, fsRadiiName);
fsBuilder->codeAppend("\tfloat test = dot(scaledOffset, scaledOffset) - 1.0;\n");
fsBuilder->codeAppendf("\tvec2 grad = 2.0*scaledOffset*%s.xy;\n", fsRadiiName);
@@ -359,7 +359,7 @@
GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&)
: INHERITED (factory) {}
- virtual void emitCode(GrGLGPBuilder* builder,
+ virtual void emitCode(GrGLFullProgramBuilder* builder,
const GrGeometryProcessor& geometryProcessor,
const GrProcessorKey& key,
const char* outputColor,
@@ -373,7 +373,7 @@
builder->addVarying(kVec2f_GrSLType, "EllipseOffsets0",
&vsOffsetName0, &fsOffsetName0);
- GrGLVertexBuilder* vsBuilder = builder->getVertexShaderBuilder();
+ GrGLVertexShaderBuilder* vsBuilder = builder->getVertexShaderBuilder();
vsBuilder->codeAppendf("%s = %s;", vsOffsetName0,
ellipseEffect.inEllipseOffsets0().c_str());
const char *vsOffsetName1, *fsOffsetName1;
@@ -382,7 +382,7 @@
vsBuilder->codeAppendf("\t%s = %s;\n", vsOffsetName1,
ellipseEffect.inEllipseOffsets1().c_str());
- GrGLGPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLProcessorFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkAssertResult(fsBuilder->enableFeature(
GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
// for outer curve
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698