am 06993503: Merge "only clear FB when asked for the opaque layer" into klp-dev

* commit '0699350336cccc244bb6c52a0d910f9599253812':
  only clear FB when asked for the opaque layer
This commit is contained in:
Dave Burke 2013-10-02 10:41:57 -07:00 committed by Android Git Automerger
commit 9b4b118094

View File

@ -1597,9 +1597,10 @@ void SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const
if (!clip.isEmpty()) {
switch (cur->getCompositionType()) {
case HWC_OVERLAY: {
const Layer::State& state(layer->getDrawingState());
if ((cur->getHints() & HWC_HINT_CLEAR_FB)
&& i
&& layer->isOpaque()
&& layer->isOpaque() && (state.alpha == 0xFF)
&& hasGlesComposition) {
// never clear the very first layer since we're
// guaranteed the FB is already cleared