diff options
author | Robert Phillips <robertphillips@google.com> | 2018-06-19 13:09:54 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-19 19:51:20 +0000 |
commit | c994a93b327235182c6d29a782c409b2c58476ae (patch) | |
tree | dba9ab1ff4a414e76da883f47ee90acbf0f27868 /src/gpu/GrOpList.cpp | |
parent | 4d75975b70c454288226afc03e512ad9bc2db5ac (diff) |
Move op memory storage to GrContext (take 2)
TBR=bsalomon@google.com
Change-Id: I4a448694d4114d83cd3a720cfc8bd37de51733d1
Reviewed-on: https://skia-review.googlesource.com/135707
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOpList.cpp')
-rw-r--r-- | src/gpu/GrOpList.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp index 6fed34a38c..b9f425576e 100644 --- a/src/gpu/GrOpList.cpp +++ b/src/gpu/GrOpList.cpp @@ -9,6 +9,7 @@ #include "GrContext.h" #include "GrDeferredProxyUploader.h" +#include "GrMemoryPool.h" #include "GrSurfaceProxy.h" #include "GrTextureProxyPriv.h" @@ -24,11 +25,13 @@ uint32_t GrOpList::CreateUniqueID() { return id; } -GrOpList::GrOpList(GrResourceProvider* resourceProvider, +GrOpList::GrOpList(GrResourceProvider* resourceProvider, sk_sp<GrOpMemoryPool> opMemoryPool, GrSurfaceProxy* surfaceProxy, GrAuditTrail* auditTrail) - : fAuditTrail(auditTrail) - , fUniqueID(CreateUniqueID()) - , fFlags(0) { + : fOpMemoryPool(std::move(opMemoryPool)) + , fAuditTrail(auditTrail) + , fUniqueID(CreateUniqueID()) + , fFlags(0) { + SkASSERT(fOpMemoryPool); fTarget.setProxy(sk_ref_sp(surfaceProxy), kWrite_GrIOType); fTarget.get()->setLastOpList(this); |