surfaceflinger: recompute visibility after sideband stream change

We normally recompute layer visibility when a layer gets its first
buffer; before then it's treated as invisible. Sideband layers never
get a buffer (as far as SurfaceFlinger knows), so never became
visible. Now we also recompute visibility when a layer gets a new
sideband stream.

Bug: 17752511
Change-Id: I84e150f196eb2eb7bcd2616248e5e3fa73624809
This commit is contained in:
Jesse Hall 2014-09-30 10:35:11 -07:00
parent 5ee2c9d20c
commit 5bf786d8f0

View File

@ -1042,6 +1042,10 @@ Region Layer::latchBuffer(bool& recomputeVisibleRegions)
if (android_atomic_acquire_cas(true, false, &mSidebandStreamChanged) == 0) {
// mSidebandStreamChanged was true
mSidebandStream = mSurfaceFlingerConsumer->getSidebandStream();
recomputeVisibleRegions = true;
const State& s(getDrawingState());
return s.transform.transform(Region(Rect(s.active.w, s.active.h)));
}
Region outDirtyRegion;