OSDN Git Service

surfaceflinger: distinguish mCurrentParent/mDrawingParent
authorChia-I Wu <olv@google.com>
Tue, 13 Jun 2017 21:10:56 +0000 (14:10 -0700)
committerChia-I Wu <olv@google.com>
Fri, 16 Jun 2017 17:54:51 +0000 (10:54 -0700)
commite41dbe6ab1d412efd67fdc8344be8da8b19426d2
tree380362fda9c3bcd9d891818065d96dac4f1387fb
parentf456f32e0f9292d71b57b3255cde416b677faac2
surfaceflinger: distinguish mCurrentParent/mDrawingParent

Updates to wp<> is not atomic.  We cannot use/update it at the same
time from the main thread and a binder thread.  With this change,
binder threads use mCurrentParent with the external state lock held.
The main thread uses mDrawingParent.

This is also an alternative fix to bug 62099658 and allows us to
revert "SurfaceFlinger: Update parent pointer while performing
transaction."

Bug: 38505866
Bug: 62099658
Test: boots and no repro (but I can never repro)
Change-Id: Id286a437537daaeec5eee5de62b1d9df245ece53
services/surfaceflinger/Layer.cpp
services/surfaceflinger/Layer.h