diff options
author | Chris Craik <ccraik@google.com> | 2013-06-17 13:02:12 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2013-06-17 13:04:45 -0700 |
commit | 8c6e17c2a9b0ad7864a261cc9a30b9623e20bdcb (patch) | |
tree | 4072dc4f15f545c8a8cad311ef6e412e6c2a6829 /libs/hwui | |
parent | 4aaf8b3d4b160aea5ceb5ccf799e44c1d5a3f14b (diff) | |
download | frameworks_base-8c6e17c2a9b0ad7864a261cc9a30b9623e20bdcb.zip frameworks_base-8c6e17c2a9b0ad7864a261cc9a30b9623e20bdcb.tar.gz frameworks_base-8c6e17c2a9b0ad7864a261cc9a30b9623e20bdcb.tar.bz2 |
Check for layer renderer in flush
bug:9310706
In some cases flush will occur after a layer is destroyed. Avoid
trying to draw after putting the layer in the layer cache.
Change-Id: I55d66f420e7354fe552c82eb3145a7d91b4441e3
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/Layer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp index 7c22bbb..4708af1 100644 --- a/libs/hwui/Layer.cpp +++ b/libs/hwui/Layer.cpp @@ -214,7 +214,8 @@ void Layer::defer() { } void Layer::flush() { - if (deferredList) { + // renderer is checked as layer may be destroyed/put in layer cache with flush scheduled + if (deferredList && renderer) { renderer->setViewport(layer.getWidth(), layer.getHeight()); renderer->prepareDirty(dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom, !isBlend()); |