aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureOpList.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-11-01 17:32:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-02 12:22:41 +0000
commit8186cbee6cffb45c0c8ecade2f2c75a1fd8db0f8 (patch)
tree8e2e294f6b3aaa59a60fafadfc3f8bd987751f58 /src/gpu/GrTextureOpList.cpp
parentce54bcecc2a64dbda2417c0ee6bcb68f1a21c047 (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.cpp12
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();
+ }
}
}