summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-01-30 18:15:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-01-30 18:15:07 +0000
commitde11d2871063874505a7d3bbcbebff86912bc0f3 (patch)
treef8286e75f7a1345c1b5ff130b18d122f7baedb05 /libs
parentb59041595b08a7aca8d425fc6e6b16583a275f12 (diff)
parentff5c8e8097e3eff910632a568195b798798ccccc (diff)
downloadframeworks_base-de11d2871063874505a7d3bbcbebff86912bc0f3.zip
frameworks_base-de11d2871063874505a7d3bbcbebff86912bc0f3.tar.gz
frameworks_base-de11d2871063874505a7d3bbcbebff86912bc0f3.tar.bz2
Merge "Fix double create of Caches"
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/renderstate/RenderState.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index e4c8745..c839718 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -46,7 +46,9 @@ void RenderState::onGLContextCreated() {
mStencil = new Stencil();
// This is delayed because the first access of Caches makes GL calls
- mCaches = &Caches::createInstance(*this);
+ if (!mCaches) {
+ mCaches = &Caches::createInstance(*this);
+ }
mCaches->init();
mCaches->textureCache.setAssetAtlas(&mAssetAtlas);
}