diff options
author | Robert Phillips <robertphillips@google.com> | 2017-11-01 17:32:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-02 12:22:41 +0000 |
commit | 8186cbee6cffb45c0c8ecade2f2c75a1fd8db0f8 (patch) | |
tree | 8e2e294f6b3aaa59a60fafadfc3f8bd987751f58 /src/gpu/GrTextureOpList.cpp | |
parent | ce54bcecc2a64dbda2417c0ee6bcb68f1a21c047 (diff) |
Make the intervals in GrResourceAllocator use SkArenaAlloc
Change-Id: I3190396fe34c01c232654fcb225dbf76df3137b4
Reviewed-on: https://skia-review.googlesource.com/66463
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureOpList.cpp')
-rw-r--r-- | src/gpu/GrTextureOpList.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp index cf003098cd..9a3d15be97 100644 --- a/src/gpu/GrTextureOpList.cpp +++ b/src/gpu/GrTextureOpList.cpp @@ -124,6 +124,10 @@ bool GrTextureOpList::copySurface(const GrCaps& caps, } void GrTextureOpList::gatherProxyIntervals(GrResourceAllocator* alloc) const { + if (!fRecordedOps.count()) { + return; + } + unsigned int cur = alloc->numOps(); // Add the interval for all the writes to this opList's target @@ -133,12 +137,12 @@ void GrTextureOpList::gatherProxyIntervals(GrResourceAllocator* alloc) const { alloc->addInterval(p); }; for (int i = 0; i < fRecordedOps.count(); ++i) { - SkASSERT(alloc->curOp() == cur+i); - const GrOp* op = fRecordedOps[i].get(); // only diff from the GrRenderTargetOpList version - op->visitProxies(gather); + if (op) { + op->visitProxies(gather); - alloc->incOps(); + alloc->incOps(); + } } } |