diff options
author | Jamie Gennis <jgennis@google.com> | 2013-07-30 22:37:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-30 22:37:58 +0000 |
commit | 7925b6bdb81bd15f4eacc28b1a6dd3af2c494abb (patch) | |
tree | 63ae4ef1913d44dac62440b7184cbe8de6f64768 /opengl | |
parent | f97b6e218a6143f20137e6ce76bbdc7621fac6cf (diff) | |
parent | 5539e219de5ffa93e9f22b30dacf7c28e7f7a0be (diff) | |
download | frameworks_native-7925b6bdb81bd15f4eacc28b1a6dd3af2c494abb.zip frameworks_native-7925b6bdb81bd15f4eacc28b1a6dd3af2c494abb.tar.gz frameworks_native-7925b6bdb81bd15f4eacc28b1a6dd3af2c494abb.tar.bz2 |
Merge "EGL: fix eglTerminate blob cache behavior"
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(); |