summaryrefslogtreecommitdiffstats
path: root/libs/hwui/RenderState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/RenderState.cpp')
-rw-r--r--libs/hwui/RenderState.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/RenderState.cpp b/libs/hwui/RenderState.cpp
index d1f5f4e..ca640e5 100644
--- a/libs/hwui/RenderState.cpp
+++ b/libs/hwui/RenderState.cpp
@@ -41,6 +41,10 @@ void RenderState::onGLContextCreated() {
mCaches->textureCache.setAssetAtlas(&mAssetAtlas);
}
+static void layerLostGlContext(Layer* layer) {
+ layer->onGlContextLost();
+}
+
void RenderState::onGLContextDestroyed() {
/*
size_t size = mActiveLayers.size();
@@ -73,6 +77,7 @@ void RenderState::onGLContextDestroyed() {
LOG_ALWAYS_FATAL("%d layers have survived gl context destruction", size);
}
*/
+ std::for_each(mActiveLayers.begin(), mActiveLayers.end(), layerLostGlContext);
mAssetAtlas.terminate();
}