display: Remove dead metadata code
The IGC field in the metadata struct is not set, so getting will
just return the default value. The helper for HSIC is only called
in a legacy test.
CRs-Fixed: 2606686
Change-Id: Ie7786e42d917c076439ac62f5a351272ce5882a3
diff --git a/composer/hwc_layers.cpp b/composer/hwc_layers.cpp
index 4804ae3..718d80d 100644
--- a/composer/hwc_layers.cpp
+++ b/composer/hwc_layers.cpp
@@ -864,13 +864,6 @@
DisplayError HWCLayer::SetMetaData(const private_handle_t *pvt_handle, Layer *layer) {
LayerBuffer *layer_buffer = &layer->input_buffer;
private_handle_t *handle = const_cast<private_handle_t *>(pvt_handle);
- IGC_t igc = {};
- LayerIGC layer_igc = layer_buffer->igc;
- if (getMetaData(handle, GET_IGC, &igc) == 0) {
- if (SetIGC(igc, &layer_igc) != kErrorNone) {
- return kErrorNotSupported;
- }
- }
float fps = 0;
uint32_t frame_rate = layer->frame_rate;
@@ -893,10 +886,8 @@
layer_buffer->format = GetSDMFormat(INT32(linear_format), 0);
}
- if ((layer_igc != layer_buffer->igc) || (interlace != layer_buffer->flags.interlace) ||
- (frame_rate != layer->frame_rate)) {
+ if ((interlace != layer_buffer->flags.interlace) || (frame_rate != layer->frame_rate)) {
// Layer buffer metadata has changed.
- layer_buffer->igc = layer_igc;
layer->frame_rate = frame_rate;
layer_buffer->flags.interlace = interlace;
layer_->update_mask.set(kMetadataUpdate);
@@ -924,22 +915,6 @@
return kErrorNone;
}
-DisplayError HWCLayer::SetIGC(IGC_t source, LayerIGC *target) {
- switch (source) {
- case IGC_NotSpecified:
- *target = kIGCNotSpecified;
- break;
- case IGC_sRGB:
- *target = kIGCsRGB;
- break;
- default:
- DLOGE("Unsupported IGC: %d", source);
- return kErrorNotSupported;
- }
-
- return kErrorNone;
-}
-
bool HWCLayer::IsDataSpaceSupported() {
if (client_requested_ != HWC2::Composition::Device &&
client_requested_ != HWC2::Composition::Cursor) {
diff --git a/composer/hwc_layers.h b/composer/hwc_layers.h
index ba0ffd6..90cd55a 100644
--- a/composer/hwc_layers.h
+++ b/composer/hwc_layers.h
@@ -167,7 +167,6 @@
uint32_t GetUint32Color(const hwc_color_t &source);
void GetUBWCStatsFromMetaData(UBWCStats *cr_stats, UbwcCrStatsVector *cr_vec);
DisplayError SetMetaData(const private_handle_t *pvt_handle, Layer *layer);
- DisplayError SetIGC(IGC_t source, LayerIGC *target);
uint32_t RoundToStandardFPS(float fps);
void ValidateAndSetCSC(const private_handle_t *handle);
void SetDirtyRegions(hwc_region_t surface_damage);
diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp
index bd49edc..22e6972 100644
--- a/libcopybit/copybit.cpp
+++ b/libcopybit/copybit.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 The Android Open Source Project
- * Copyright (c) 2010 - 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010 - 2014, 2020 The Linux Foundation. All rights reserved.
*
* Not a Contribution, Apache license notifications and license are retained
* for attribution purposes only.
@@ -529,14 +529,6 @@
// Set Color Space for MDP to configure CSC matrix
req->color_space = ITU_R_601;
- MetaData_t *metadata = NULL;
-
- if (src_hnd != NULL)
- metadata = (MetaData_t *)src_hnd->base_metadata;
-
- if (metadata && (metadata->operation & UPDATE_COLOR_SPACE)) {
- req->color_space = metadata->colorSpace;
- }
set_infos(ctx, req, flags);
set_image(&req->dst, dst);
diff --git a/libqdutils/display_config.cpp b/libqdutils/display_config.cpp
index b2ddb8f..8f27200 100644
--- a/libqdutils/display_config.cpp
+++ b/libqdutils/display_config.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2013-2014, 2016, 2018-2019, The Linux Foundation. All rights reserved.
+* Copyright (c) 2013-2014, 2016, 2018-2020, 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
@@ -53,10 +53,6 @@
return FAILED_TRANSACTION;
}
-int setHSIC(int /* dpy */, const HSICData_t& /* hsic_data */) {
- return FAILED_TRANSACTION;
-}
-
int getDisplayVisibleRegion(int dpy, hwc_rect_t &rect) {
status_t err = (status_t) FAILED_TRANSACTION;
sp<IQService> binder = getBinder();
diff --git a/libqdutils/display_config.h b/libqdutils/display_config.h
index ad41ed7..21aea60 100644
--- a/libqdutils/display_config.h
+++ b/libqdutils/display_config.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 - 2016, 2018, 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013 - 2016, 2018 - 2020, 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
@@ -116,10 +116,6 @@
// Returns 0 on success, negative values on errors
int getDisplayAttributes(int dpy, DisplayAttributes_t& dpyattr);
-// Set HSIC data on a given display ID
-// Returns 0 on success, negative values on errors
-int setHSIC(int dpy, const HSICData_t& hsic_data);
-
// get the active visible region for the display
// Returns 0 on success, negative values on errors
int getDisplayVisibleRegion(int dpy, hwc_rect_t &rect);