[cogl/fosdem-2012: 7/20] Updates in line with latest wayland protocol



commit 4e6517d06ad1e750c04d0de9376d1fd23c1c593c
Author: Robert Bragg <robert linux intel com>
Date:   Thu Jan 12 20:24:48 2012 +0000

    Updates in line with latest wayland protocol
    
    The shm buffer format enum values were renamed and the explicitly
    premultiplied format was dropped since it's now assumed if the buffer
    has an alpha component then it's premultiplied.

 cogl/cogl-texture-2d.c |   12 +++---------
 examples/cogland.c     |   10 ++++------
 2 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
index 3af0914..4baacb2 100644
--- a/cogl/cogl-texture-2d.c
+++ b/cogl/cogl-texture-2d.c
@@ -507,24 +507,18 @@ cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
       switch (wl_shm_buffer_get_format (buffer))
         {
 #if G_BYTE_ORDER == G_BIG_ENDIAN
-          case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32:
+          case WL_SHM_FORMAT_ARGB8888:
             format = COGL_PIXEL_FORMAT_ARGB_8888_PRE;
             break;
-          case WL_SHM_FORMAT_ARGB32:
-            format = COGL_PIXEL_FORMAT_ARGB_8888;
-            break;
           case WL_SHM_FORMAT_XRGB32:
             format = COGL_PIXEL_FORMAT_ARGB_8888;
             internal_format = COGL_PIXEL_FORMAT_RGB_888;
             break;
 #elif G_BYTE_ORDER == G_LITTLE_ENDIAN
-          case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32:
+          case WL_SHM_FORMAT_ARGB8888:
             format = COGL_PIXEL_FORMAT_BGRA_8888_PRE;
             break;
-          case WL_SHM_FORMAT_ARGB32:
-            format = COGL_PIXEL_FORMAT_BGRA_8888;
-            break;
-          case WL_SHM_FORMAT_XRGB32:
+          case WL_SHM_FORMAT_XRGB8888:
             format = COGL_PIXEL_FORMAT_BGRA_8888;
             internal_format = COGL_PIXEL_FORMAT_BGR_888;
             break;
diff --git a/examples/cogland.c b/examples/cogland.c
index 03acf39..3b2fad0 100644
--- a/examples/cogland.c
+++ b/examples/cogland.c
@@ -198,19 +198,17 @@ shm_buffer_damaged (struct wl_buffer *wayland_buffer,
       switch (wl_shm_buffer_get_format (wayland_buffer))
         {
 #if G_BYTE_ORDER == G_BIG_ENDIAN
-          case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32:
+          case WL_SHM_FORMAT_ARGB8888:
             format = COGL_PIXEL_FORMAT_ARGB_8888_PRE;
             break;
-          case WL_SHM_FORMAT_ARGB32:
-          case WL_SHM_FORMAT_XRGB32:
+          case WL_SHM_FORMAT_XRGB8888:
             format = COGL_PIXEL_FORMAT_ARGB_8888;
             break;
 #elif G_BYTE_ORDER == G_LITTLE_ENDIAN
-          case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32:
+          case WL_SHM_FORMAT_ARGB8888:
             format = COGL_PIXEL_FORMAT_BGRA_8888_PRE;
             break;
-          case WL_SHM_FORMAT_ARGB32:
-          case WL_SHM_FORMAT_XRGB32:
+          case WL_SHM_FORMAT_XRGB8888:
             format = COGL_PIXEL_FORMAT_BGRA_8888;
             break;
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]