summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderState.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2014-08-26 17:30:15 -0700
committer Chris Craik <ccraik@google.com> 2014-08-26 17:30:15 -0700
commit1d4774233304c484673e2af2c1de2ab41021c979 (patch)
tree68f78af2c5f7562d7bfd726f7b793831cca4d8b7 /libs/hwui/RenderState.cpp
parent780617faa2c9b3dbcb902da06a486149c5bddbb3 (diff)
Crash instead of leaking layers/textures between GL contexts
bug:17208461 Change-Id: I4d58f301cf0f5e8145e808a5d6ade4de7801970b
Diffstat (limited to 'libs/hwui/RenderState.cpp')
-rw-r--r--libs/hwui/RenderState.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/RenderState.cpp b/libs/hwui/RenderState.cpp
index 97f379d04033..50b8f395011c 100644
--- a/libs/hwui/RenderState.cpp
+++ b/libs/hwui/RenderState.cpp
@@ -34,6 +34,10 @@ void RenderState::onGLContextCreated() {
mCaches->init();
}
+void RenderState::onGLContextDestroyed() {
+ LOG_ALWAYS_FATAL_IF(!mActiveLayers.empty(), "layers have survived gl context destruction");
+}
+
void RenderState::setViewport(GLsizei width, GLsizei height) {
mViewportWidth = width;
mViewportHeight = height;