summaryrefslogtreecommitdiff
path: root/libs/hwui/Layer.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-08-26 17:30:15 -0700
committerChris Craik <ccraik@google.com>2014-08-26 17:30:15 -0700
commit1d4774233304c484673e2af2c1de2ab41021c979 (patch)
tree68f78af2c5f7562d7bfd726f7b793831cca4d8b7 /libs/hwui/Layer.cpp
parent780617faa2c9b3dbcb902da06a486149c5bddbb3 (diff)
Crash instead of leaking layers/textures between GL contexts
bug:17208461 Change-Id: I4d58f301cf0f5e8145e808a5d6ade4de7801970b
Diffstat (limited to 'libs/hwui/Layer.cpp')
-rw-r--r--libs/hwui/Layer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 8639ae1629e6..e6bc4db5a323 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -54,9 +54,11 @@ Layer::Layer(RenderState& renderState, const uint32_t layerWidth, const uint32_t
convexMask = NULL;
caches.resourceCache.incrementRefcount(this);
rendererLightPosDirty = true;
+ renderState.registerLayer(this);
}
Layer::~Layer() {
+ renderState.unregisterLayer(this);
SkSafeUnref(colorFilter);
removeFbo();
deleteTexture();