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

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 1131513005: remove localmatrix from GrGeometryProcessor base class (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup4
Patch Set: tweaks Created 5 years, 7 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 | « no previous file | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 24735d954579a5b662026ca1784b4c83a65cfe1f..c01652f692a830474c9c097e20ba4d3aa1b5dfae 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -536,6 +536,7 @@ public:
const Attribute* inPosition() const { return fInPosition; }
const Attribute* inQuadEdge() const { return fInQuadEdge; }
GrColor color() const { return fColor; }
+ const SkMatrix& localMatrix() const { return fLocalMatrix; }
class GLProcessor : public GrGLGeometryProcessor {
public:
@@ -598,8 +599,9 @@ public:
const GrGLSLCaps&,
GrProcessorKeyBuilder* b) {
const BatchTracker& local = bt.cast<BatchTracker>();
+ const QuadEdgeEffect& qee = gp.cast<QuadEdgeEffect>();
uint32_t key = local.fInputColorType << 16;
- key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 : 0x0;
+ key |= local.fUsesLocalCoords && qee.localMatrix().hasPerspective() ? 0x1 : 0x0;
b->add32(key);
}
@@ -615,6 +617,13 @@ public:
}
}
+ void setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrGLProgramDataManager& pdman,
+ int index,
+ const SkTArray<const GrCoordTransform*, true>& transforms) override {
+ this->setTransformDataHelper<QuadEdgeEffect>(primProc, pdman, index, transforms);
+ }
+
private:
GrColor fColor;
UniformHandle fColorUniform;
@@ -641,8 +650,8 @@ public:
private:
QuadEdgeEffect(GrColor color, const SkMatrix& localMatrix)
- : INHERITED(localMatrix)
- , fColor(color) {
+ : fColor(color)
+ , fLocalMatrix(localMatrix) {
this->initClassID<QuadEdgeEffect>();
fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType));
fInQuadEdge = &this->addVertexAttrib(Attribute("inQuadEdge", kVec4f_GrVertexAttribType));
@@ -657,6 +666,7 @@ private:
const Attribute* fInPosition;
const Attribute* fInQuadEdge;
GrColor fColor;
+ SkMatrix fLocalMatrix;
GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
« no previous file with comments | « no previous file | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698