Add assert that memory pool is empty when GrTextBlobCache frees

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1555993005

Review URL: https://codereview.chromium.org/1555993005
This commit is contained in:
joshualitt 2016-01-05 08:56:56 -08:00 committed by Commit bot
parent 45eefcfec2
commit 20ccd40de9
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,9 @@ void GrDrawingManager::cleanup() {
fDrawTargets[i]->makeClosed(); // no drawTarget should receive a new command after this
fDrawTargets[i]->clearRT();
// We shouldn't need to do this, but it turns out some clients still hold onto drawtargets
// after a cleanup
fDrawTargets[i]->reset();
fDrawTargets[i]->unref();
}

View File

@ -55,4 +55,7 @@ void GrTextBlobCache::freeAll() {
++iter;
}
fCache.rewind();
// There should be no allocations in the memory pool at this point
SkASSERT(fPool.isEmpty());
}