Discard ops that don't have a finite bounds.

Bug: chromium:905782
Change-Id: I2f83d0371dad5d812163cd15af4690983a6e074f
Reviewed-on: https://skia-review.googlesource.com/c/171533
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2018-11-16 13:27:30 -05:00 committed by Skia Commit-Bot
parent 09181ef042
commit 19ec80fb37

View File

@ -619,6 +619,10 @@ void GrRenderTargetOpList::recordOp(std::unique_ptr<GrOp> op,
// A closed GrOpList should never receive new/more ops
SkASSERT(!this->isClosed());
if (!op->bounds().isFinite()) {
fOpMemoryPool->release(std::move(op));
return;
}
// Check if there is an op we can combine with by linearly searching back until we either
// 1) check every op