summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderstate
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-01-30 09:46:18 -0800
committerChris Craik <ccraik@google.com>2015-01-30 09:46:18 -0800
commitff5c8e8097e3eff910632a568195b798798ccccc (patch)
tree6587950580aa75ab72a931770a7fd7693d733c12 /libs/hwui/renderstate
parent1b68ce327aa37ee0c4e9580d75cb6781337c4312 (diff)
downloadframeworks_base-ff5c8e8097e3eff910632a568195b798798ccccc.zip
frameworks_base-ff5c8e8097e3eff910632a568195b798798ccccc.tar.gz
frameworks_base-ff5c8e8097e3eff910632a568195b798798ccccc.tar.bz2
Fix double create of Caches
bug:19208182 Change-Id: I91ac591cecc207da1b102013ca4985dd075cca80
Diffstat (limited to 'libs/hwui/renderstate')
-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);
}