diff mbox

SDL2: add bgrx pixel format

Message ID 20160517072848.4540.34695.stgit@PASHA-ISP (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Dovgalyuk May 17, 2016, 7:28 a.m. UTC
This patch adds support of b8g8r8x8 pixel format for SDL2.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
---
 ui/sdl2-2d.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Gerd Hoffman May 23, 2016, 1:25 p.m. UTC | #1
On Di, 2016-05-17 at 10:28 +0300, Pavel Dovgalyuk wrote:
> This patch adds support of b8g8r8x8 pixel format for SDL2.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
>  ui/sdl2-2d.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c
> index 9593006..8ab68d6 100644
> --- a/ui/sdl2-2d.c
> +++ b/ui/sdl2-2d.c
> @@ -116,6 +116,9 @@ void sdl2_2d_switch(DisplayChangeListener *dcl,
>      case PIXMAN_r8g8b8x8:
>          format = SDL_PIXELFORMAT_RGBA8888;
>          break;
> +    case PIXMAN_b8g8r8x8:
> +        format = SDL_PIXELFORMAT_BGRX8888;
> +        break;
>      default:
>          g_assert_not_reached();
>      }
> 

added to ui patche queue.

thanks,
  Gerd
diff mbox

Patch

diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c
index 9593006..8ab68d6 100644
--- a/ui/sdl2-2d.c
+++ b/ui/sdl2-2d.c
@@ -116,6 +116,9 @@  void sdl2_2d_switch(DisplayChangeListener *dcl,
     case PIXMAN_r8g8b8x8:
         format = SDL_PIXELFORMAT_RGBA8888;
         break;
+    case PIXMAN_b8g8r8x8:
+        format = SDL_PIXELFORMAT_BGRX8888;
+        break;
     default:
         g_assert_not_reached();
     }