Skip to content
Snippets Groups Projects
Commit a3ab021b authored by George Wright's avatar George Wright
Browse files

Bug 904483 - Fix out of order destruction problem when destroying GrContext. r=mattwoodrow, a=bajaj

parent 521e816b
No related branches found
No related tags found
No related merge requests found
...@@ -136,12 +136,12 @@ int GrContext::GetThreadInstanceCount() { ...@@ -136,12 +136,12 @@ int GrContext::GetThreadInstanceCount() {
} }
GrContext::~GrContext() { GrContext::~GrContext() {
this->flush();
for (int i = 0; i < fCleanUpData.count(); ++i) { for (int i = 0; i < fCleanUpData.count(); ++i) {
(*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo); (*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo);
} }
this->flush();
// Since the gpu can hold scratch textures, give it a chance to let go // Since the gpu can hold scratch textures, give it a chance to let go
// of them before freeing the texture cache // of them before freeing the texture cache
fGpu->purgeResources(); fGpu->purgeResources();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment