From 947d3b862b63c6ab2003e45662bf62189b43a39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 6 Oct 2021 20:28:53 +0200 Subject: [PATCH] app_server: handle RGB48 and RGBA64 in switches Change-Id: I14019b3285e036eba4b73effd79d7e1b4181daeb Reviewed-on: https://review.haiku-os.org/c/haiku/+/4558 Tested-by: Commit checker robot Reviewed-by: Adrien Destugues --- src/servers/app/DirectWindowInfo.cpp | 8 ++++++++ src/servers/app/drawing/ViewHWInterface.cpp | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/servers/app/DirectWindowInfo.cpp b/src/servers/app/DirectWindowInfo.cpp index 80d1ee5724..aadbe66696 100644 --- a/src/servers/app/DirectWindowInfo.cpp +++ b/src/servers/app/DirectWindowInfo.cpp @@ -98,6 +98,14 @@ DirectWindowInfo::SetState(direct_buffer_state bufferState, fBufferInfo->bytes_per_row = buffer->BytesPerRow(); switch (buffer->ColorSpace()) { + case B_RGBA64: + case B_RGBA64_BIG: + fBufferInfo->bits_per_pixel = 64; + break; + case B_RGB48: + case B_RGB48_BIG: + fBufferInfo->bits_per_pixel = 48; + break; case B_RGB32: case B_RGBA32: case B_RGB32_BIG: diff --git a/src/servers/app/drawing/ViewHWInterface.cpp b/src/servers/app/drawing/ViewHWInterface.cpp index 95e9914cb1..d01e713f1a 100644 --- a/src/servers/app/drawing/ViewHWInterface.cpp +++ b/src/servers/app/drawing/ViewHWInterface.cpp @@ -64,6 +64,18 @@ string_for_color_space(color_space format) { const char* name = ""; switch (format) { + case B_RGBA64: + name = "B_RGBA64"; + break; + case B_RGBA64_BIG: + name = "B_RGBA64_BIG"; + break; + case B_RGB48: + name = "B_RGB48"; + break; + case B_RGB48_BIG: + name = "B_RGB48_BIG"; + break; case B_RGB32: name = "B_RGB32"; break;