diff options
author | Jamie Gennis <jgennis@google.com> | 2013-07-30 15:10:02 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2013-07-30 15:12:16 -0700 |
commit | 5539e219de5ffa93e9f22b30dacf7c28e7f7a0be (patch) | |
tree | 442ba281f7d5cc687357d4d4cd9587354d915b8b /opengl | |
parent | bdce8170479d0efb548514c1a290e1bfea711cfd (diff) | |
download | frameworks_native-5539e219de5ffa93e9f22b30dacf7c28e7f7a0be.zip frameworks_native-5539e219de5ffa93e9f22b30dacf7c28e7f7a0be.tar.gz frameworks_native-5539e219de5ffa93e9f22b30dacf7c28e7f7a0be.tar.bz2 |
EGL: fix eglTerminate blob cache behavior
Bug: 9610573
Change-Id: I258e7e0d82ab76fbacf0b9c25d4f92fca6df04ac
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/libs/EGL/egl_cache.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp index 03397a9..1607267 100644 --- a/opengl/libs/EGL/egl_cache.cpp +++ b/opengl/libs/EGL/egl_cache.cpp @@ -126,11 +126,8 @@ void egl_cache_t::initialize(egl_display_t *display) { void egl_cache_t::terminate() { Mutex::Autolock lock(mMutex); - if (mBlobCache != NULL) { - saveBlobCacheLocked(); - mBlobCache = NULL; - } - mInitialized = false; + saveBlobCacheLocked(); + mBlobCache = NULL; } void egl_cache_t::setBlob(const void* key, EGLsizeiANDROID keySize, @@ -218,7 +215,7 @@ static uint32_t crc32c(const uint8_t* buf, size_t len) { } void egl_cache_t::saveBlobCacheLocked() { - if (mFilename.length() > 0) { + if (mFilename.length() > 0 && mBlobCache != NULL) { size_t cacheSize = mBlobCache->getFlattenedSize(); size_t headerSize = cacheFileHeaderSize; const char* fname = mFilename.string(); |