diff options
author | qctecmdr <qctecmdr@localhost> | 2021-03-22 02:08:08 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-03-22 02:08:08 -0700 |
commit | b3ca2d754b89fb723222a2609e54d5841a49dbcc (patch) | |
tree | fd9dd3a450ce90aa5b0f3b7dc5c9020908338fd3 | |
parent | d22305d69c0fad06e6c7f166c9a86cc35d0ed42c (diff) | |
parent | 7b4fa9794c65141f00a3434f5d8b1780afe8852c (diff) |
Merge "hwc2 : Add scaling rgb layer flag to layer stack"
-rw-r--r-- | sdm/include/core/layer_stack.h | 4 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_display.cpp | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sdm/include/core/layer_stack.h b/sdm/include/core/layer_stack.h index b49c425c..81ecfd6d 100644 --- a/sdm/include/core/layer_stack.h +++ b/sdm/include/core/layer_stack.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2014 - 2019, The Linux Foundation. All rights reserved. +* Copyright (c) 2014 - 2019, 2021 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted * provided that the following conditions are met: @@ -277,6 +277,8 @@ struct LayerStackFlags { uint32_t config_changed : 1; //!< This flag indicates Display config must be validated. uint32_t mask_present : 1; //!< Set if layer stack has mask layers. + + uint32_t scaling_rgb_layer_present : 1; //!< Set if scaling rgb layer is present }; uint32_t flags = 0; //!< For initialization purpose only. diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 894d9224..937c0a78 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -709,6 +709,10 @@ void HWCDisplay::BuildLayerStack() { is_secure = true; } + if (IS_RGB_FORMAT(layer->input_buffer.format) && hwc_layer->IsScalingPresent()) { + layer_stack_.flags.scaling_rgb_layer_present = true; + } + if (hwc_layer->IsSingleBuffered() && !(hwc_layer->IsRotationPresent() || hwc_layer->IsScalingPresent())) { layer->flags.single_buffer = true; |