hwc: skip layers flagged with HWC_SKIP_LAYER
authorGreg Hackmann <ghackmann@google.com>
Tue, 24 Jul 2012 20:49:47 +0000 (13:49 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Fri, 27 Jul 2012 22:52:04 +0000 (15:52 -0700)
Change-Id: Ibaab3b002ee2e891a8fa8c43b88b06059d1e2a38
Signed-off-by: Greg Hackmann <ghackmann@google.com>
libhwc/hwc.cpp

index 5fb5bbcb3d3649dff25985b6826855355ab07727..d87609630a34f1aaffea1db6d6329cd8557e1784 100644 (file)
@@ -267,6 +267,11 @@ static int hdmi_output(struct exynos5_hwc_composer_device_1_t *dev, private_hand
 
 bool exynos5_supports_overlay(hwc_layer_1_t &layer, size_t i)
 {
+    if (layer.flags & HWC_SKIP_LAYER) {
+        ALOGV("\tlayer %u: skipping", i);
+        return false;
+    }
+
     private_handle_t *handle = private_handle_t::dynamicCast(layer.handle);
 
     if (!handle) {
@@ -477,7 +482,8 @@ static int exynos5_prepare(hwc_composer_device_1_t *dev, hwc_layer_list_1_t* lis
 
     for (size_t i = 0; i < list->numHwLayers; i++) {
         dump_layer(&list->hwLayers[i]);
-        if(list->hwLayers[i].handle)
+        if(list->hwLayers[i].handle &&
+                !(list->hwLayers[i].flags & HWC_SKIP_LAYER))
             dump_handle(private_handle_t::dynamicCast(
                     list->hwLayers[i].handle));
     }