Bug 904483 - Fix out of order destruction problem when destroying GrContext r=mattwoodrow

This commit is contained in:
George Wright 2013-11-25 20:37:50 -05:00
parent 8482c08c29
commit 6f59021f75

View File

@ -136,12 +136,12 @@ int GrContext::GetThreadInstanceCount() {
}
GrContext::~GrContext() {
this->flush();
for (int i = 0; i < fCleanUpData.count(); ++i) {
(*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo);
}
this->flush();
// Since the gpu can hold scratch textures, give it a chance to let go
// of them before freeing the texture cache
fGpu->purgeResources();