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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 2327613002: Remove GrPrimitiveProcessor::hasTransformedLocalCoords (Closed)
Patch Set: Created 4 years, 3 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/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 6268906bea681cabf74c293e7424926f186144a7..1b496b3657f99af3904eca94c6202b0639bedf7c 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -26,7 +26,6 @@ enum GPFlag {
kColor_GPFlag = 0x1,
kLocalCoord_GPFlag = 0x2,
kCoverage_GPFlag= 0x4,
- kTransformedLocalCoord_GPFlag = 0x8,
};
class DefaultGeoProc : public GrGeometryProcessor {
@@ -102,13 +101,6 @@ public:
gp.localMatrix(),
args.fTransformsIn,
args.fTransformsOut);
- } else if(gp.hasTransformedLocalCoords()) {
- // transforms have already been applied to vertex attributes on the cpu
- this->emitTransforms(vertBuilder,
- varyingHandler,
- gp.inLocalCoords()->fName,
- args.fTransformsIn,
- args.fTransformsOut);
} else {
// emit transforms with position
this->emitTransforms(vertBuilder,
@@ -231,22 +223,15 @@ private:
this->initClassID<DefaultGeoProc>();
bool hasColor = SkToBool(gpTypeFlags & kColor_GPFlag);
bool hasExplicitLocalCoords = SkToBool(gpTypeFlags & kLocalCoord_GPFlag);
- bool hasTransformedLocalCoords = SkToBool(gpTypeFlags & kTransformedLocalCoord_GPFlag);
- bool hasLocalCoord = hasExplicitLocalCoords || hasTransformedLocalCoords;
bool hasCoverage = SkToBool(gpTypeFlags & kCoverage_GPFlag);
fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType,
kHigh_GrSLPrecision);
if (hasColor) {
fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
}
- if (hasLocalCoord) {
+ if (hasExplicitLocalCoords) {
fInLocalCoords = &this->addVertexAttrib("inLocalCoord", kVec2f_GrVertexAttribType);
- if (hasExplicitLocalCoords) {
- this->setHasExplicitLocalCoords();
- } else {
- SkASSERT(hasTransformedLocalCoords);
- this->setHasTransformedLocalCoords();
- }
+ this->setHasExplicitLocalCoords();
}
if (hasCoverage) {
fInCoverage = &this->addVertexAttrib("inCoverage", kFloat_GrVertexAttribType);
@@ -283,9 +268,6 @@ sk_sp<GrGeometryProcessor> DefaultGeoProc::TestCreate(GrProcessorTestData* d) {
if (d->fRandom->nextBool()) {
flags |= kLocalCoord_GPFlag;
}
- if (d->fRandom->nextBool()) {
- flags |= kTransformedLocalCoord_GPFlag;
- }
return DefaultGeoProc::Make(flags,
GrRandomColor(d->fRandom),
@@ -304,8 +286,6 @@ sk_sp<GrGeometryProcessor> GrDefaultGeoProcFactory::Make(const Color& color,
flags |= color.fType == Color::kAttribute_Type ? kColor_GPFlag : 0;
flags |= coverage.fType == Coverage::kAttribute_Type ? kCoverage_GPFlag : 0;
flags |= localCoords.fType == LocalCoords::kHasExplicit_Type ? kLocalCoord_GPFlag : 0;
- flags |= localCoords.fType == LocalCoords::kHasTransformed_Type ?
- kTransformedLocalCoord_GPFlag : 0;
uint8_t inCoverage = coverage.fCoverage;
bool coverageWillBeIgnored = coverage.fType == Coverage::kNone_Type;
« no previous file with comments | « no previous file | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698