diff options
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 |
commit | 1d4774233304c484673e2af2c1de2ab41021c979 (patch) | |
tree | 68f78af2c5f7562d7bfd726f7b793831cca4d8b7 /libs/hwui/Layer.cpp | |
parent | 780617faa2c9b3dbcb902da06a486149c5bddbb3 (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.cpp | 2 |
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(); |