diff options
author | Robert Phillips <robertphillips@google.com> | 2017-04-24 07:31:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-24 12:13:16 +0000 |
commit | e3302dfb81865051ad19cd1c91e2ec3a27df3417 (patch) | |
tree | 61d6c53ce21f75f6f5f46e24f160760985366e10 /src/gpu/GrDrawingManager.h | |
parent | 96a533051fc71b5ba8ddfaf01498894feed29847 (diff) |
Make InstancedRendering more opList-splitting friendly
This CL splits the InstancedRendering class into an allocator and a per-opList op tracker. This was done because we need to allocate the InstancedRendering ops before we know the final destination opList. The InstancedRendering ops are now still all allocated from the same pool but the tracking and execution is done per opList.
Change-Id: Ieddabb6f85f8f187c5e7373f7f6cb155d69a9685
Reviewed-on: https://skia-review.googlesource.com/13860
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrDrawingManager.h')
-rw-r--r-- | src/gpu/GrDrawingManager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h index d68430ecd2..e96fd3a5f8 100644 --- a/src/gpu/GrDrawingManager.h +++ b/src/gpu/GrDrawingManager.h @@ -15,6 +15,7 @@ #include "GrRenderTargetOpList.h" #include "GrResourceCache.h" #include "SkTArray.h" +#include "instanced/InstancedRendering.h" #include "text/GrAtlasTextContext.h" class GrContext; @@ -37,6 +38,8 @@ public: bool wasAbandoned() const { return fAbandoned; } void freeGpuResources(); + gr_instanced::OpAllocator* instancingAllocator(); + sk_sp<GrRenderTargetContext> makeRenderTargetContext(sk_sp<GrSurfaceProxy>, sk_sp<SkColorSpace>, const SkSurfaceProps*); @@ -124,6 +127,9 @@ private: bool fIsImmediateMode; SkTArray<sk_sp<GrPreFlushCallbackObject>> fPreFlushCBObjects; + + // Lazily allocated + std::unique_ptr<gr_instanced::OpAllocator> fInstancingAllocator; }; #endif |