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

Unified Diff: src/gpu/GrOvalRenderer.cpp

Issue 1428543003: Create GLSL base class for ProgramDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add space Created 5 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/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 258e3f4638094a4d5a1ad0a102be0691a28832d1..a647e62af05d7dd92b197a32cae36547d05218a3 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -25,6 +25,7 @@
#include "gl/GrGLProcessor.h"
#include "gl/GrGLGeometryProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
// TODO(joshualitt) - Break this file up during GrBatch post implementation cleanup
@@ -139,10 +140,11 @@ public:
b->add32(key);
}
- void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp) override {
+ void setData(const GrGLSLProgramDataManager& pdman,
+ const GrPrimitiveProcessor& gp) override {
const CircleEdgeEffect& ce = gp.cast<CircleEdgeEffect>();
if (ce.color() != fColor) {
- GrGLfloat c[4];
+ float c[4];
GrColorToRGBAFloat(ce.color(), c);
pdman.set4fv(fColorUniform, 1, c);
fColor = ce.color();
@@ -150,7 +152,7 @@ public:
}
void setTransformData(const GrPrimitiveProcessor& primProc,
- const GrGLProgramDataManager& pdman,
+ const GrGLSLProgramDataManager& pdman,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms) override {
this->setTransformDataHelper<CircleEdgeEffect>(primProc, pdman, index, transforms);
@@ -307,10 +309,10 @@ public:
b->add32(key);
}
- void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp) override {
+ void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& gp) override {
const EllipseEdgeEffect& ee = gp.cast<EllipseEdgeEffect>();
if (ee.color() != fColor) {
- GrGLfloat c[4];
+ float c[4];
GrColorToRGBAFloat(ee.color(), c);
pdman.set4fv(fColorUniform, 1, c);
fColor = ee.color();
@@ -318,7 +320,7 @@ public:
}
void setTransformData(const GrPrimitiveProcessor& primProc,
- const GrGLProgramDataManager& pdman,
+ const GrGLSLProgramDataManager& pdman,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms) override {
this->setTransformDataHelper<EllipseEdgeEffect>(primProc, pdman, index, transforms);
@@ -497,18 +499,19 @@ public:
b->add32(key);
}
- void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp) override {
+ void setData(const GrGLSLProgramDataManager& pdman,
+ const GrPrimitiveProcessor& gp) override {
const DIEllipseEdgeEffect& dee = gp.cast<DIEllipseEdgeEffect>();
if (!dee.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(dee.viewMatrix())) {
fViewMatrix = dee.viewMatrix();
- GrGLfloat viewMatrix[3 * 3];
+ float viewMatrix[3 * 3];
GrGLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
if (dee.color() != fColor) {
- GrGLfloat c[4];
+ float c[4];
GrColorToRGBAFloat(dee.color(), c);
pdman.set4fv(fColorUniform, 1, c);
fColor = dee.color();
« 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