OSDN Git Service

surfaceflinger: clear HWC layers in Layer::onRemoved v2
authorChia-I Wu <olv@google.com>
Wed, 17 May 2017 21:36:16 +0000 (14:36 -0700)
committerChia-I Wu <olv@google.com>
Thu, 18 May 2017 15:35:46 +0000 (08:35 -0700)
commit3851225fddb6f1755a8034aa7a9f9ae7397b56a9
tree3babdae8f15993979ab041ce21bc0bdba70409f7
parentfb8cedea2730603d6bf95dd10466b2f2660ade9d
surfaceflinger: clear HWC layers in Layer::onRemoved v2

Explicitly destroy HWC layers in Layer::onRemoved rather than doing
that implicitly in the destructor.  The layer may be destructed by
any thread that holds a sp<Layer>, but only the main thread should
talk to the composer.

v2 fixes build breakage for non-HWC2 targets.

Bug: 38151478
Bug: 37978067
Test: manual
Change-Id: I8858fc46de1fc6facded219740b931c6486e317e
services/surfaceflinger/Layer.cpp