aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetOpList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.cpp')
-rw-r--r--src/gpu/GrRenderTargetOpList.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index af870caffd..09486c7c99 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -257,6 +257,10 @@ bool GrRenderTargetOpList::copySurface(const GrCaps& caps,
}
void GrRenderTargetOpList::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
@@ -266,12 +270,12 @@ void GrRenderTargetOpList::gatherProxyIntervals(GrResourceAllocator* alloc) cons
alloc->addInterval(p);
};
for (int i = 0; i < fRecordedOps.count(); ++i) {
- SkASSERT(alloc->curOp() == cur+i);
-
const GrOp* op = fRecordedOps[i].fOp.get(); // only diff from the GrTextureOpList version
- op->visitProxies(gather);
+ if (op) {
+ op->visitProxies(gather);
- alloc->incOps();
+ alloc->incOps();
+ }
}
}