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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 2182783004: Add test configs for instanced rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test configs for instanced rendering Created 4 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/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 717cd5d1bb9f109425730cc4e4df6e109347f10c..bb473cafe45e9cdc53952627741e942f43b7e4af 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -48,8 +48,7 @@ GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* r
, 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 @@ GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* r
fMaxBatchLookahead = (options.fMaxBatchLookahead < 0) ? kDefaultMaxBatchLookahead :
options.fMaxBatchLookahead;
+ if (GrCaps::InstancedSupport::kNone != this->caps()->instancedSupport()) {
+ fInstancedRendering.reset(fGpu->createInstancedRendering());
+ }
+
rt->setLastDrawTarget(this);
#ifdef SK_DEBUG
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698