mir: stop using deprecated surface api
This commit is contained in:
@ -183,19 +183,20 @@ create_mir_surface (GdkDisplay *display,
|
|||||||
gint height,
|
gint height,
|
||||||
MirBufferUsage buffer_usage)
|
MirBufferUsage buffer_usage)
|
||||||
{
|
{
|
||||||
MirSurfaceParameters parameters;
|
MirSurfaceSpec *spec;
|
||||||
MirConnection *connection;
|
MirConnection *connection;
|
||||||
|
MirPixelFormat format;
|
||||||
parameters.name = g_get_prgname ();
|
MirSurface *surface;
|
||||||
parameters.width = width;
|
|
||||||
parameters.height = height;
|
|
||||||
parameters.pixel_format = _gdk_mir_display_get_pixel_format (display, buffer_usage);
|
|
||||||
parameters.buffer_usage = buffer_usage;
|
|
||||||
parameters.output_id = mir_display_output_id_invalid;
|
|
||||||
|
|
||||||
connection = gdk_mir_display_get_mir_connection (display);
|
connection = gdk_mir_display_get_mir_connection (display);
|
||||||
|
format = _gdk_mir_display_get_pixel_format (display, buffer_usage);
|
||||||
|
spec = mir_connection_create_spec_for_normal_surface (connection, width, height, format);
|
||||||
|
mir_surface_spec_set_name (spec, g_get_prgname ());
|
||||||
|
mir_surface_spec_set_buffer_usage (spec, buffer_usage);
|
||||||
|
surface = mir_surface_create_sync (spec);
|
||||||
|
mir_surface_spec_release (spec);
|
||||||
|
|
||||||
return mir_connection_create_surface_sync (connection, ¶meters);
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user