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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 749413003: get rid of static gps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup remove static procs Created 6 years 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/GrOvalRenderer.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 0df519dd8f7450e662ec63af903a94fb28e1bfc8..6b9d2c2aebfd30f4d707e6386f41d4687ab57e8f 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -22,43 +22,7 @@ typedef GrDefaultGeoProcFactory Flag;
class DefaultGeoProc : public GrGeometryProcessor {
public:
static GrGeometryProcessor* Create(uint32_t gpTypeFlags) {
- switch (gpTypeFlags) {
- case Flag::kColor_GPType | Flag::kCoverage_GPType | Flag::kLocalCoord_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProcColLocCov, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProcColLocCov);
- }
- case Flag::kColor_GPType | Flag::kLocalCoord_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProcColLoc, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProcColLoc);
- }
- case Flag::kColor_GPType | Flag::kCoverage_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProcColCov, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProcColCov);
- }
- case Flag::kColor_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProcCol, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProcCol);
- }
- case Flag::kLocalCoord_GPType | Flag::kCoverage_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProcLocCov, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProcLocCov);
- }
- case Flag::kLocalCoord_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProcLoc, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProcLoc);
- }
- case Flag::kCoverage_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProcCov, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProcCov);
- }
- case Flag::kPosition_GPType: {
- GR_CREATE_STATIC_PROCESSOR(gDefaultGeoProc, DefaultGeoProc, (gpTypeFlags));
- return SkRef(gDefaultGeoProc);
- }
- default:
- SkFAIL("Incomplete Switch");
- return NULL;
- }
+ return SkNEW_ARGS(DefaultGeoProc, (gpTypeFlags));
}
virtual const char* name() const SK_OVERRIDE { return "DefaultGeometryProcessor"; }
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698