Add test configs for instanced rendering
Adds the following configs and enables them on select bots:
glinst, glinst4, glinstdit4, glinst16, glinstdit16,
esinst, esinst4, esinstdit4
Makes general changes to GrContextOptions, GrCaps, etc. to facilitate
this.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182783004
Review-Url: https://codereview.chromium.org/2182783004
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 717cd5d..bb473ca 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -48,8 +48,7 @@
, fResourceProvider(resourceProvider)
, fAuditTrail(auditTrail)
, fFlags(0)
- , fRenderTarget(rt)
- , fInstancedRendering(fGpu->createInstancedRenderingIfSupported()) {
+ , fRenderTarget(rt) {
// TODO: Stop extracting the context (currently needed by GrClipMaskManager)
fContext = fGpu->getContext();
@@ -60,6 +59,10 @@
fMaxBatchLookahead = (options.fMaxBatchLookahead < 0) ? kDefaultMaxBatchLookahead :
options.fMaxBatchLookahead;
+ if (GrCaps::InstancedSupport::kNone != this->caps()->instancedSupport()) {
+ fInstancedRendering.reset(fGpu->createInstancedRendering());
+ }
+
rt->setLastDrawTarget(this);
#ifdef SK_DEBUG