summaryrefslogtreecommitdiffstats
path: root/graphics/common
diff options
context:
space:
mode:
authorValerie Hau <vhau@google.com>2018-10-09 16:09:12 -0700
committerValerie Hau <vhau@google.com>2018-10-22 11:19:52 -0700
commitec9830654992ffb8cbfbd4734e4a8c2d0145d41c (patch)
treebe5065e6a0996107056e8a48d846f298640f9045 /graphics/common
parent6e457995b6976e0350bccb22064ca2e90cd9540b (diff)
downloadandroid_hardware_interfaces-ec9830654992ffb8cbfbd4734e4a8c2d0145d41c.tar.gz
android_hardware_interfaces-ec9830654992ffb8cbfbd4734e4a8c2d0145d41c.tar.bz2
android_hardware_interfaces-ec9830654992ffb8cbfbd4734e4a8c2d0145d41c.zip
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
Diffstat (limited to 'graphics/common')
-rw-r--r--graphics/common/1.2/Android.bp23
-rw-r--r--graphics/common/1.2/types.hal53
2 files changed, 76 insertions, 0 deletions
diff --git a/graphics/common/1.2/Android.bp b/graphics/common/1.2/Android.bp
new file mode 100644
index 000000000..a86f3b503
--- /dev/null
+++ b/graphics/common/1.2/Android.bp
@@ -0,0 +1,23 @@
+// 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,
+}
+
diff --git a/graphics/common/1.2/types.hal b/graphics/common/1.2/types.hal
new file mode 100644
index 000000000..cf4e34aa7
--- /dev/null
+++ b/graphics/common/1.2/types.hal
@@ -0,0 +1,53 @@
+/*
+ * 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,
+};