Index: src/gpu/GrContext.cpp |
=================================================================== |
--- src/gpu/GrContext.cpp (revision 11887) |
+++ src/gpu/GrContext.cpp (working copy) |
@@ -157,16 +157,16 @@ |
} |
GrContext::~GrContext() { |
- for (int i = 0; i < fCleanUpData.count(); ++i) { |
- (*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo); |
- } |
- |
if (NULL == fGpu) { |
return; |
} |
this->flush(); |
+ for (int i = 0; i < fCleanUpData.count(); ++i) { |
+ (*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo); |
+ } |
+ |
// Since the gpu can hold scratch textures, give it a chance to let go |
// of them before freeing the texture cache |
fGpu->purgeResources(); |