summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2013-10-02 17:36:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-02 17:36:40 +0000
commit0699350336cccc244bb6c52a0d910f9599253812 (patch)
treef6fb7ee81db9609512846bf227aec61dc9ff43e2 /services
parent93573e91c22ba8329222c69cd7f099f5703fb444 (diff)
parentac68302e1cde8b931073929311fd6654a3253fc7 (diff)
downloadframeworks_native-0699350336cccc244bb6c52a0d910f9599253812.zip
frameworks_native-0699350336cccc244bb6c52a0d910f9599253812.tar.gz
frameworks_native-0699350336cccc244bb6c52a0d910f9599253812.tar.bz2
Merge "only clear FB when asked for the opaque layer" into klp-dev
Diffstat (limited to 'services')
-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