OSDN Git Service

Stop using transparent region for computing visible regions
authorJesse Hall <jessehall@google.com>
Tue, 25 Sep 2012 20:25:04 +0000 (13:25 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 26 Sep 2012 21:41:51 +0000 (14:41 -0700)
commita8026d21f3f2f09e3416cbd33c277fbd15d8cf4e
treeab34dbb4e229553d34681daa0646e3481ee14852
parentc4a8daaa998ea524c9aaa9817021ff7c4467c3dd
Stop using transparent region for computing visible regions

The transparent region hint is computed only from view layout
locations, ignoring post-layout translation. If a SurfaceView is layed
out with no other views above it, but a view is moved above it
post-layout, that view's layout bounds would be subtracted from the
window's transparent region instead of its drawing bounds. Prior to
this change, the view would not be visible (except where its layout
bounds and drawing bounds overlap).

With this change, composition uses visible regions computed without
regard to the transparent regions. However, if all of a layer's
visible region is transparent, it will be removed from the list of
layers to composite. This doesn't fix the root problem of incorrect
transparent regions, and doesn't prevent bad composition in all cases.
But it does avoid it for some existing apps, whiel still allowing the
transparent region hint to save power in the important
fullscreen-video-in-a-SurfaceView case.

Bug: 7179570
Change-Id: I47cf939e12129b167afa344b8b036e8827103ac8
services/surfaceflinger/LayerBase.cpp
services/surfaceflinger/LayerBase.h
services/surfaceflinger/SurfaceFlinger.cpp