gsk: Complain if we fail to realize a renderer

The only likely place where this is going to happen
is if a renderer was explicitly requested with the
GSK_RENDERER environment variable, and in that case,
it is misleading to silently use a different renderer.
This commit is contained in:
Matthias Clasen 2020-09-07 11:17:24 -04:00
parent 2738d5bc93
commit d595c6ab12

View File

@ -637,11 +637,10 @@ gsk_renderer_new_for_surface (GdkSurface *surface)
return renderer;
}
GSK_RENDERER_NOTE (renderer, RENDERER,
g_message ("Failed to realize renderer of type '%s' for surface '%s': %s\n",
G_OBJECT_TYPE_NAME (renderer),
G_OBJECT_TYPE_NAME (surface),
error->message));
g_message ("Failed to realize renderer of type '%s' for surface '%s': %s\n",
G_OBJECT_TYPE_NAME (renderer),
G_OBJECT_TYPE_NAME (surface),
error->message);
g_object_unref (renderer);
g_clear_error (&error);
}