diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2021-01-24 20:21:35 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2021-01-24 20:21:35 -0800 |
commit | 5ed4047791d280a9bc2d80c3f70103399d949ab4 (patch) | |
tree | 1b464dc74b5e03f16ec4ea74d262efa6af9f4c99 /sdm/libs/hwc2/hwc_display.cpp | |
parent | b524bab223f923a4415fc103beac67d412f3ed97 (diff) | |
parent | 0a38f67f7c7e38f7c25b873796a303fd96ce7745 (diff) |
Merge 0a38f67f7c7e38f7c25b873796a303fd96ce7745 on remote branch
Change-Id: Id4ea994382b7535b4dc7c1089dd5819047aecb88
Diffstat (limited to 'sdm/libs/hwc2/hwc_display.cpp')
-rw-r--r-- | sdm/libs/hwc2/hwc_display.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index a4b83441..894d9224 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright 2015 The Android Open Source Project @@ -654,6 +654,7 @@ void HWCDisplay::BuildLayerStack() { layer_stack_ = LayerStack(); display_rect_ = LayerRect(); metadata_refresh_rate_ = 0; + bool has_valid_client_layer = false; layer_stack_.flags.animating = animating_; layer_stack_.flags.fast_path = fast_path_enabled_ && fast_path_composition_; @@ -739,6 +740,7 @@ void HWCDisplay::BuildLayerStack() { if (layer->flags.skip) { layer_stack_.flags.skip_present = true; + has_valid_client_layer |= IsValid(layer->dst_rect); } // TODO(user): Move to a getter if this is needed at other places @@ -787,6 +789,14 @@ void HWCDisplay::BuildLayerStack() { layer_stack_.layers.push_back(layer); } + // If all client layers are invalid, skip all layers + if (layer_stack_.flags.skip_present && !has_valid_client_layer) { + DLOGE("Not a single valid client layer present, skipping all"); + for (auto layer : layer_stack_.layers) { + layer->flags.skip = true; + } + } + // If layer stack needs Client composition, HWC display gets into InternalValidate state. If // validation gets reset by any other thread in this state, enforce Geometry change to ensure // that Client target gets composed by SF. |