summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_layers.cpp
diff options
context:
space:
mode:
authorPullakavi Srinivas <spullaka@codeaurora.org>2019-02-01 18:58:25 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2019-03-13 05:13:00 -0700
commitad3ab0267cebb28afd810d7071e96e5443d6cc57 (patch)
tree06dc90ff98e92dec12330a18d236600137ae5f8e /sdm/libs/hwc2/hwc_layers.cpp
parentcda00c4f4c531f1c94127f181206c193ea0195f2 (diff)
hwc2: Mark Solid fill as updating iff. its color changes.
Unlike buffer layers, client doesn't set surface damage to solid fill layers. All attributes except color are tied to geoemtry changes. Just check for color, incase it doesnt update, mark layer as non-updating. CRs-Fixed: 2396411 Change-Id: Id77c467aae2ffd207bb95e2943610295dedc2a60
Diffstat (limited to 'sdm/libs/hwc2/hwc_layers.cpp')
-rw-r--r--sdm/libs/hwc2/hwc_layers.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp
index 4caad2a7..36516bb4 100644
--- a/sdm/libs/hwc2/hwc_layers.cpp
+++ b/sdm/libs/hwc2/hwc_layers.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright 2015 The Android Open Source Project
@@ -368,7 +368,13 @@ HWC2::Error HWCLayer::SetLayerColor(hwc_color_t color) {
if (client_requested_ != HWC2::Composition::SolidColor) {
return HWC2::Error::None;
}
- layer_->solid_fill_color = GetUint32Color(color);
+ if (layer_->solid_fill_color != GetUint32Color(color)) {
+ layer_->solid_fill_color = GetUint32Color(color);
+ surface_updated_ = true;
+ } else {
+ surface_updated_ = false;
+ }
+
layer_->input_buffer.format = kFormatARGB8888;
DLOGV_IF(kTagClient, "[%" PRIu64 "][%" PRIu64 "] Layer color set to %x", display_id_, id_,
layer_->solid_fill_color);