Skip to content

Commit fc39f61

Browse files
Treehugger RobotAndroid (Google) Code Review
authored andcommitted
Merge "Add DISPLAY_BT2020 dataspace" into main
2 parents 225c2c8 + 94cd7bf commit fc39f61

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

libs/nativewindow/ANativeWindow.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ int32_t ANativeWindow_setBuffersDataSpace(ANativeWindow* window, int32_t dataSpa
222222
static_cast<int>(HAL_DATASPACE_BT2020_ITU_HLG));
223223
static_assert(static_cast<int>(ADATASPACE_DEPTH) == static_cast<int>(HAL_DATASPACE_DEPTH));
224224
static_assert(static_cast<int>(ADATASPACE_DYNAMIC_DEPTH) == static_cast<int>(HAL_DATASPACE_DYNAMIC_DEPTH));
225+
static_assert(static_cast<int>(ADATASPACE_DISPLAY_BT2020) ==
226+
static_cast<int>(HAL_DATASPACE_DISPLAY_BT2020));
225227

226228
if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) {
227229
return -EINVAL;

libs/nativewindow/include/android/data_space.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,13 @@ enum ADataSpace : int32_t {
578578
*/
579579
ADATASPACE_BT2020_ITU_HLG = 302383104, // ADATASPACE_STANDARD_BT2020 | ADATASPACE_TRANSFER_HLG |
580580
// ADATASPACE_RANGE_LIMITED
581+
/**
582+
* sRGB-encoded BT. 2020
583+
*
584+
* Uses full range, sRGB transfer and BT2020 standard.
585+
*/
586+
ADATASPACE_DISPLAY_BT2020 = 142999552, // ADATASPACE_STANDARD_BT2020 | ADATASPACE_TRANSFER_SRGB
587+
// | ADATASPACE_RANGE_FULL
581588

582589
/**
583590
* Depth

0 commit comments

Comments
 (0)