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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.h

Issue 715903002: Push creation of default GP to the caller (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: added comment Created 6 years, 1 month 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/GrContext.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.h
diff --git a/src/gpu/GrDefaultGeoProcFactory.h b/src/gpu/GrDefaultGeoProcFactory.h
index 26ce66249a7d8dce1ef3b3d81c8d434d985a572f..99d85b64d634b08ba2aa9be67ebf48ac589251fd 100644
--- a/src/gpu/GrDefaultGeoProcFactory.h
+++ b/src/gpu/GrDefaultGeoProcFactory.h
@@ -75,9 +75,16 @@ public:
kLastGPType = kCoverage_GPType
};
- // YOU MUST UNREF
- static const GrGeometryProcessor* CreateAndSetAttribs(GrDrawState*, uint32_t GPTypeFlags);
- static const GrGeometryProcessor* Create();
+ /*
+ * The following functions are used to create default GPs. If you just need to create
+ * attributes seperately from creating the default GP, use the SetAttribs function followed
+ * by the Create function. Otherwise use CreateAndSetAttribs to do both at once.
+ *
+ * You must unref the return from Create.
+ */
+ static void SetAttribs(GrDrawState*, uint32_t GPTypeFlags = 0);
+ static const GrGeometryProcessor* CreateAndSetAttribs(GrDrawState*, uint32_t GPTypeFlags = 0);
+ static const GrGeometryProcessor* Create(bool hasAttributeCoverage);
};
#endif
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698