diff options
author | 2014-11-14 16:00:38 -0800 | |
---|---|---|
committer | 2014-11-14 16:00:38 -0800 | |
commit | 5478d427c6e67c986a3390162c8fec77c466058a (patch) | |
tree | 2dabf11f5510aedbb8d59dc607088af0e4b7ab36 /src/gpu/GrDefaultGeoProcFactory.h | |
parent | 28562a01999d49abcbd60abbfba06f2ac8046f6d (diff) |
Push creation of default GP to the caller
TBR=
BUG=skia:
Review URL: https://codereview.chromium.org/715903002
Diffstat (limited to 'src/gpu/GrDefaultGeoProcFactory.h')
-rw-r--r-- | src/gpu/GrDefaultGeoProcFactory.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gpu/GrDefaultGeoProcFactory.h b/src/gpu/GrDefaultGeoProcFactory.h index 26ce66249a..99d85b64d6 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 |