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

Commit ec983065 authored by Valerie Hau's avatar Valerie Hau
Browse files

Adding Dataspace BT2020_SRGB and ColorMode BT2020_SRGB

BT2020_SRGB is BT2020 with SRGB transfer function.  Adding to types V1.2
and upgrading methods that utilize Dataspace and ColorMode

Bug: 115335239
Test: ./libsurfaceflinger_unittest --gtest_filter=GetBestColorMode.*
Change-Id: Ic807183ae2bd0212cd8c5d7a24c93db0a1bc28fb
parent 6e457995
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ hidl_interface {
    interfaces: [
        "android.hardware.configstore@1.1",
        "android.hardware.configstore@1.0",
        "android.hardware.graphics.common@1.1",
        "android.hardware.graphics.common@1.2",
        "android.hidl.base@1.0",
    ],
    gen_java: true,
+1 −1
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
 */
package android.hardware.configstore@1.2;

import android.hardware.graphics.common@1.1::Dataspace;
import android.hardware.graphics.common@1.1::PixelFormat;
import android.hardware.graphics.common@1.2::Dataspace;
import @1.1::ISurfaceFlingerConfigs;
import @1.0::OptionalBool;

+1 −1
Original line number Diff line number Diff line
@@ -26,8 +26,8 @@ namespace configstore {
namespace V1_2 {
namespace implementation {

using ::android::hardware::graphics::common::V1_1::Dataspace;
using ::android::hardware::graphics::common::V1_1::PixelFormat;
using ::android::hardware::graphics::common::V1_2::Dataspace;

// ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
Return<void> SurfaceFlingerConfigs::vsyncEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
+23 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

hidl_interface {
    name: "android.hardware.graphics.common@1.2",
    root: "android.hardware",
    vndk: {
        enabled: true,
        support_system_process: true,
    },
    srcs: [
        "types.hal",
    ],
    interfaces: [
        "android.hardware.graphics.common@1.0",
        "android.hardware.graphics.common@1.1",
    ],
    types: [
        "Dataspace",
    ],
    gen_java: true,
    gen_java_constants: true,
}
+53 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (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.0
 *
 * 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.graphics.common@1.2;

import @1.1::BufferUsage;
import @1.1::ColorMode;
import @1.1::Dataspace;
import @1.1::PixelFormat;

@export(name="android_dataspace_v1_2_t", value_prefix="HAL_DATASPACE_",
        export_parent="false")
enum Dataspace : @1.1::Dataspace {
    /**
     * ITU-R Recommendation 2020 (BT.2020)
     *
     * Ultra High-definition television
     *
     * Use full range, sRGB transfer and BT2020 standard
     */
    DISPLAY_BT2020 = STANDARD_BT2020 | TRANSFER_SRGB | RANGE_FULL,
};

enum ColorMode : @1.1::ColorMode {
    /**
     * DISPLAY_BT2020 corresponds with display settings that implement the ITU-R
     * Recommendation BT.2020 / Rec. 2020 for UHDTV, but specifies an SRGB
     * transfer function.
     *
     * Primaries:
     *                  x       y
     *  green           0.170   0.797
     *  blue            0.131   0.046
     *  red             0.708   0.292
     *  white (D65)     0.3127  0.3290
     *
     * Transfer Function is sRGB
     */
    DISPLAY_BT2020 = 13,
};
Loading