From 904253df074de09d1e79bc96f9fba971bc3f97ac Mon Sep 17 00:00:00 2001 From: huangdarwin Date: Tue, 20 Dec 2022 23:31:21 +0000 Subject: [PATCH] HDR: Use SDR settings for gamma 2.2 in createEglSurface PiperOrigin-RevId: 496768072 --- .../main/java/com/google/android/exoplayer2/util/GlUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/common/src/main/java/com/google/android/exoplayer2/util/GlUtil.java b/library/common/src/main/java/com/google/android/exoplayer2/util/GlUtil.java index 50d84cb958..91b963c2d8 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/util/GlUtil.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/util/GlUtil.java @@ -292,7 +292,7 @@ public final class GlUtil { throws GlException { int[] configAttributes; int[] windowAttributes; - if (colorTransfer == C.COLOR_TRANSFER_SDR) { + if (colorTransfer == C.COLOR_TRANSFER_SDR || colorTransfer == C.COLOR_TRANSFER_GAMMA_2_2) { configAttributes = EGL_CONFIG_ATTRIBUTES_RGBA_8888; windowAttributes = EGL_WINDOW_SURFACE_ATTRIBUTES_NONE; } else if (colorTransfer == C.COLOR_TRANSFER_ST2084) {