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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 1253393002: Cleanup Default Geo Proc API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 5 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/GrDefaultGeoProcFactory.h ('k') | src/gpu/GrRectBatch.cpp » ('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 48aa813182b99ea5afc0aca15092c18b23b6bc87..1273a298494020dd32db35b18401a9140bdcdd9c 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -275,3 +275,27 @@ const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags,
coverageWillBeIgnored,
coverage);
}
+
+const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(const Color& color,
+ const Coverage& coverage,
+ LocalCoords::Type localCoords,
+ const SkMatrix& viewMatrix,
+ const SkMatrix& localMatrix) {
+ uint32_t flags = 0;
+ flags |= color.fType == Color::kAttribute_Type ? kColor_GPType : 0;
+ flags |= coverage.fType == Coverage::kAttribute_Type ? kCoverage_GPType : 0;
+ flags |= localCoords == LocalCoords::kHasExplicit_Type ? kLocalCoord_GPType : 0;
+
+ uint8_t inCoverage = coverage.fCoverage;
+ bool coverageWillBeIgnored = coverage.fType == Coverage::kNone_Type;
+ bool localCoordsWillBeRead = localCoords != LocalCoords::kNone_Type;
+
+ GrColor inColor = color.fColor;
+ return DefaultGeoProc::Create(flags,
+ inColor,
+ viewMatrix,
+ localMatrix,
+ localCoordsWillBeRead,
+ coverageWillBeIgnored,
+ inCoverage);
+}
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.h ('k') | src/gpu/GrRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698