hwc: skip layers flagged with HWC_SKIP_LAYER
Change-Id: Ibaab3b002ee2e891a8fa8c43b88b06059d1e2a38
Signed-off-by: Greg Hackmann <ghackmann@google.com>
diff --git a/libhwc/hwc.cpp b/libhwc/hwc.cpp
index 5fb5bbc..d876096 100644
--- a/libhwc/hwc.cpp
+++ b/libhwc/hwc.cpp
@@ -267,6 +267,11 @@
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 @@
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));
}