Free resources only from the GL context thread.

Bug #3179882

Resources were freed following garbage collections on a worker thread.
This worker thread had no EGL context, which would cause the renderer
to incorrectly assume that the memory was liberated.

Change-Id: Ifdb51f94ddf42641e8654522787bfac532976c7c
This commit is contained in:
Romain Guy
2010-11-11 15:36:56 -08:00
parent 50c5e4c36e
commit fe48f65922
13 changed files with 122 additions and 66 deletions

View File

@ -94,6 +94,16 @@ void Caches::dumpMemoryUsage() {
LOGD("\n");
}
///////////////////////////////////////////////////////////////////////////////
// Memory management
///////////////////////////////////////////////////////////////////////////////
void Caches::clearGarbage() {
textureCache.clearGarbage();
gradientCache.clearGarbage();
pathCache.clearGarbage();
}
///////////////////////////////////////////////////////////////////////////////
// VBO
///////////////////////////////////////////////////////////////////////////////