diff options
author | Chris Craik <ccraik@google.com> | 2015-01-30 18:15:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-30 18:15:07 +0000 |
commit | de11d2871063874505a7d3bbcbebff86912bc0f3 (patch) | |
tree | f8286e75f7a1345c1b5ff130b18d122f7baedb05 /libs | |
parent | b59041595b08a7aca8d425fc6e6b16583a275f12 (diff) | |
parent | ff5c8e8097e3eff910632a568195b798798ccccc (diff) | |
download | frameworks_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.cpp | 4 |
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); } |