[gtk+] mir: don't request more surface formats than the supported ones
- From: Marco Trevisan <marcotrevi src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+] mir: don't request more surface formats than the supported ones
 
- Date: Thu, 13 Nov 2014 02:59:50 +0000 (UTC)
 
commit c7e7e350839b19732a2eea7a2151c0c3a76c2544
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Nov 13 03:58:32 2014 +0100
    mir: don't request more surface formats than the supported ones
 gdk/mir/gdkmirwindowimpl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 526e7d4..4f9f9d3 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -154,7 +154,7 @@ static void
 ensure_surface (GdkWindow *window)
 {
   GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
-  MirPixelFormat formats[100], pixel_format = mir_pixel_format_invalid;
+  MirPixelFormat formats[mir_pixel_formats], pixel_format = mir_pixel_format_invalid;
   unsigned int n_formats, i;
   MirSurfaceParameters parameters;
   MirEventDelegate event_delegate = { event_cb, NULL };
@@ -172,7 +172,7 @@ ensure_surface (GdkWindow *window)
 
   // Should probably calculate this once?
   // Should prefer certain formats over others
-  mir_connection_get_available_surface_formats (get_connection (window), formats, 100, &n_formats);
+  mir_connection_get_available_surface_formats (get_connection (window), formats, mir_pixel_formats, 
&n_formats);
   for (i = 0; i < n_formats; i++)
     if (formats[i] == mir_pixel_format_argb_8888)
       {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]