Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b3f8267 authored by Peiyong Lin's avatar Peiyong Lin
Browse files

[ConfigStore] Add useColorManagement method.

Previously we couple wide color gamut display and color management together,
which is because we only do color management when we have wide color gamut
display. However, we would also want display that doesn't support wide color
gamut but is calibrated and is capable of managing sRGB gamut to have color
management. This means we will decouple wide color gamut display from color
management, a device can indicate that it's color managed without having wide
color gamut display and only manage color within sRGB gamut.

BUG: 111505327
Test: BUild, flash and check Natural/Boosted mode.
Change-Id: If1241ce040a6f691609d8f8d72a2d6f3141557cf
parent b8485526
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -66,3 +66,5 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp/android.hardware
$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f)
$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/seccomp_policy/configstore@1.0.policy)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/seccomp_policy/configstore@1.1.policy)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.configstore@1.1-service)
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@
    </hal>
    <hal format="hidl" optional="false">
        <name>android.hardware.configstore</name>
        <version>1.1</version>
        <version>1.2</version>
        <interface>
            <name>ISurfaceFlingerConfigs</name>
            <instance>default</instance>
+18 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

hidl_interface {
    name: "android.hardware.configstore@1.2",
    root: "android.hardware",
    vndk: {
        enabled: true,
    },
    srcs: [
        "ISurfaceFlingerConfigs.hal",
    ],
    interfaces: [
        "android.hardware.configstore@1.1",
        "android.hardware.configstore@1.0",
        "android.hidl.base@1.0",
    ],
    gen_java: true,
}
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.1 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.1
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package android.hardware.configstore@1.2;

import @1.1::ISurfaceFlingerConfigs;
import @1.0::OptionalBool;

/**
 * New revision of ISurfaceFlingerConfigs
 */
interface ISurfaceFlingerConfigs extends @1.1::ISurfaceFlingerConfigs {
    /**
     * useColorManagement indicates whether SurfaceFlinger should manage color
     * by switching to appropriate color mode automatically depending on the
     * Dataspace of the surfaces on screen.
     * This function must return true when hasWideColorDisplay or hasHDRDisplay
     * return true.
     */
    useColorManagement() generates (OptionalBool value);
};
+8 −7
Original line number Diff line number Diff line
@@ -2,15 +2,15 @@ LOCAL_PATH := $(call my-dir)

################################################################################
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.configstore@1.1-service
LOCAL_MODULE := android.hardware.configstore@1.2-service
# seccomp is not required for coverage build.
ifneq ($(NATIVE_COVERAGE),true)
LOCAL_REQUIRED_MODULES_arm64 := configstore@1.1.policy
LOCAL_REQUIRED_MODULES_arm64 := configstore.policy
endif
LOCAL_PROPRIETARY_MODULE := true
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_INIT_RC := android.hardware.configstore@1.1-service.rc
LOCAL_INIT_RC := android.hardware.configstore@1.2-service.rc
LOCAL_SRC_FILES:= service.cpp

include $(LOCAL_PATH)/surfaceflinger.mk
@@ -23,16 +23,17 @@ LOCAL_SHARED_LIBRARIES := \
    liblog \
    libutils \
    android.hardware.configstore@1.0 \
    android.hardware.configstore@1.1
    android.hardware.configstore@1.1 \
    android.hardware.configstore@1.2

include $(BUILD_EXECUTABLE)

# seccomp filter for configstore
ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), arm64))
include $(CLEAR_VARS)
LOCAL_MODULE := configstore@1.1.policy
LOCAL_MODULE := configstore.policy
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/seccomp_policy
LOCAL_SRC_FILES := seccomp_policy/configstore@1.1-$(TARGET_ARCH).policy
LOCAL_SRC_FILES := seccomp_policy/configstore-$(TARGET_ARCH).policy
include $(BUILD_PREBUILT)
endif
Loading