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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.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 | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.cpp
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index 4ceeca94b667ec11a8fb7ddcb0c9d20f22190c7b..6dbf71e0d89930fff7f1969d82a1a335412f36b4 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -40,6 +40,7 @@ public:
const Attribute* inCoverage() const { return fInCoverage; }
GrColor color() const { return fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
+ const SkMatrix& localMatrix() const { return fLocalMatrix; }
uint8_t coverage() const { return fCoverage; }
void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override {
@@ -121,7 +122,7 @@ public:
const BatchTracker& local = bt.cast<BatchTracker>();
uint32_t key = def.fFlags;
key |= local.fInputColorType << 8 | local.fInputCoverageType << 16;
- key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 << 24 : 0x0;
+ key |= local.fUsesLocalCoords && def.localMatrix().hasPerspective() ? 0x1 << 24 : 0x0;
key |= ComputePosKey(def.viewMatrix()) << 25;
b->add32(key);
}
@@ -145,6 +146,13 @@ public:
}
}
+ void setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrGLProgramDataManager& pdman,
+ int index,
+ const SkTArray<const GrCoordTransform*, true>& transforms) override {
+ this->setTransformDataHelper<DefaultGeoProc>(primProc, pdman, index, transforms);
+ }
+
private:
GrColor fColor;
uint8_t fCoverage;
@@ -171,13 +179,13 @@ private:
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix,
uint8_t coverage)
- : INHERITED(localMatrix)
- , fInPosition(NULL)
+ : fInPosition(NULL)
, fInColor(NULL)
, fInLocalCoords(NULL)
, fInCoverage(NULL)
, fColor(color)
, fViewMatrix(viewMatrix)
+ , fLocalMatrix(localMatrix)
, fCoverage(coverage)
, fFlags(gpTypeFlags) {
this->initClassID<DefaultGeoProc>();
@@ -213,6 +221,7 @@ private:
const Attribute* fInCoverage;
GrColor fColor;
SkMatrix fViewMatrix;
+ SkMatrix fLocalMatrix;
uint8_t fCoverage;
uint32_t fFlags;
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698