summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-10-01 15:36:52 -0700
committerThe Android Automerger <android-build@google.com>2013-10-02 14:44:42 -0700
commitd5350dea05571218290c583a9c482749bda9f7cc (patch)
treeff5b6c6ab34b79f1d130d47ad58a433846882df0
parent8eb7a481abbbc3cfe713b43158f1913f958357cf (diff)
downloadframeworks_native-d5350dea05571218290c583a9c482749bda9f7cc.zip
frameworks_native-d5350dea05571218290c583a9c482749bda9f7cc.tar.gz
frameworks_native-d5350dea05571218290c583a9c482749bda9f7cc.tar.bz2
only clear FB when asked for the opaque layer
a layer need to be considered NOT opaque if it has a plane-alpha. Bug: 10846930 Change-Id: Ibd8981b63ede4560c7096bacc4cff46a7eb2a8bb
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index b5b0f2c..e374548 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -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