forked from AuroraMiddleware/gtk
media: Always use GL with gstreamer
As long as we can create a GL context, pass one to gstreamer. This at least gets us GL textures with the ngl renderer, the previous code was arbitrarily refusing that.
This commit is contained in:
parent
7ecd004d50
commit
60ccae000b
@ -192,20 +192,10 @@ gtk_gst_paintable_realize (GtkGstPaintable *self,
|
|||||||
GdkSurface *surface)
|
GdkSurface *surface)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GtkNative *native;
|
|
||||||
GskRenderer *renderer;
|
|
||||||
|
|
||||||
if (self->context)
|
if (self->context)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
native = gtk_native_get_for_surface (surface);
|
|
||||||
renderer = gtk_native_get_renderer (native);
|
|
||||||
if (!GSK_IS_GL_RENDERER (renderer))
|
|
||||||
{
|
|
||||||
GST_INFO ("not using GL with a %s renderer\n", G_OBJECT_TYPE_NAME (renderer));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
self->context = gdk_surface_create_gl_context (surface, &error);
|
self->context = gdk_surface_create_gl_context (surface, &error);
|
||||||
if (self->context == NULL)
|
if (self->context == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user