Merge branch 'latest.glib.msvc-3' into 'gtk-3-24'
GTK-3.x: Fix builds against latest stable GLib with Visual Studio See merge request GNOME/gtk!3445
This commit is contained in:
@ -589,8 +589,6 @@ _gdk_win32_display_init_gl (GdkDisplay *display,
|
||||
gboolean disable_wgl = FALSE;
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
EGLDisplay egl_disp;
|
||||
|
||||
disable_wgl = ((_gdk_gl_flags & GDK_GL_GLES) != 0) ||
|
||||
display_win32->running_on_arm64;
|
||||
#endif
|
||||
@ -655,46 +653,48 @@ _gdk_win32_display_init_gl (GdkDisplay *display,
|
||||
wglMakeCurrent (NULL, NULL);
|
||||
|
||||
_destroy_dummy_gl_context (dummy);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
egl_disp = _gdk_win32_get_egl_display (display_win32);
|
||||
|
||||
if (egl_disp == EGL_NO_DISPLAY ||
|
||||
!eglInitialize (egl_disp, NULL, NULL))
|
||||
else
|
||||
{
|
||||
if (egl_disp != EGL_NO_DISPLAY)
|
||||
EGLDisplay egl_disp = _gdk_win32_get_egl_display (display_win32);
|
||||
|
||||
if (egl_disp == EGL_NO_DISPLAY ||
|
||||
!eglInitialize (egl_disp, NULL, NULL))
|
||||
{
|
||||
eglTerminate (egl_disp);
|
||||
egl_disp = EGL_NO_DISPLAY;
|
||||
if (egl_disp != EGL_NO_DISPLAY)
|
||||
{
|
||||
eglTerminate (egl_disp);
|
||||
egl_disp = EGL_NO_DISPLAY;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
display_win32->egl_disp = egl_disp;
|
||||
display_win32->have_egl = TRUE;
|
||||
display_win32->egl_version = epoxy_egl_version (egl_disp);
|
||||
|
||||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
|
||||
display_win32->hasEglSurfacelessContext =
|
||||
epoxy_has_egl_extension (egl_disp, "EGL_KHR_surfaceless_context");
|
||||
|
||||
|
||||
GDK_NOTE (OPENGL,
|
||||
g_print ("EGL API version %d.%d found\n"
|
||||
" - Vendor: %s\n"
|
||||
" - Checked extensions:\n"
|
||||
"\t* EGL_KHR_surfaceless_context: %s\n",
|
||||
display_win32->egl_version / 10,
|
||||
display_win32->egl_version % 10,
|
||||
eglQueryString (display_win32->egl_disp, EGL_VENDOR),
|
||||
display_win32->hasEglSurfacelessContext ? "yes" : "no"));
|
||||
}
|
||||
|
||||
display_win32->egl_disp = egl_disp;
|
||||
display_win32->have_egl = TRUE;
|
||||
display_win32->egl_version = epoxy_egl_version (egl_disp);
|
||||
|
||||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
|
||||
display_win32->hasEglSurfacelessContext =
|
||||
epoxy_has_egl_extension (egl_disp, "EGL_KHR_surfaceless_context");
|
||||
|
||||
|
||||
GDK_NOTE (OPENGL,
|
||||
g_print ("EGL API version %d.%d found\n"
|
||||
" - Vendor: %s\n"
|
||||
" - Checked extensions:\n"
|
||||
"\t* EGL_KHR_surfaceless_context: %s\n",
|
||||
display_win32->egl_version / 10,
|
||||
display_win32->egl_version % 10,
|
||||
eglQueryString (display_win32->egl_disp, EGL_VENDOR),
|
||||
display_win32->hasEglSurfacelessContext ? "yes" : "no"));
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Setup the legacy context after creating it */
|
||||
|
||||
@ -121,14 +121,14 @@ gtk_css_custom_gadget_get_preferred_size (GtkCssGadget *gadget,
|
||||
GtkCssCustomGadgetPrivate *priv = gtk_css_custom_gadget_get_instance_private (GTK_CSS_CUSTOM_GADGET (gadget));
|
||||
|
||||
if (priv->preferred_size_func)
|
||||
return priv->preferred_size_func (gadget, orientation, for_size,
|
||||
minimum, natural,
|
||||
minimum_baseline, natural_baseline,
|
||||
priv->data);
|
||||
priv->preferred_size_func (gadget, orientation, for_size,
|
||||
minimum, natural,
|
||||
minimum_baseline, natural_baseline,
|
||||
priv->data);
|
||||
else
|
||||
return GTK_CSS_GADGET_CLASS (gtk_css_custom_gadget_parent_class)->get_preferred_size (gadget, orientation, for_size,
|
||||
minimum, natural,
|
||||
minimum_baseline, natural_baseline);
|
||||
GTK_CSS_GADGET_CLASS (gtk_css_custom_gadget_parent_class)->get_preferred_size (gadget, orientation, for_size,
|
||||
minimum, natural,
|
||||
minimum_baseline, natural_baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -140,9 +140,9 @@ gtk_css_custom_gadget_allocate (GtkCssGadget *gadget,
|
||||
GtkCssCustomGadgetPrivate *priv = gtk_css_custom_gadget_get_instance_private (GTK_CSS_CUSTOM_GADGET (gadget));
|
||||
|
||||
if (priv->allocate_func)
|
||||
return priv->allocate_func (gadget, allocation, baseline, out_clip, priv->data);
|
||||
priv->allocate_func (gadget, allocation, baseline, out_clip, priv->data);
|
||||
else
|
||||
return GTK_CSS_GADGET_CLASS (gtk_css_custom_gadget_parent_class)->allocate (gadget, allocation, baseline, out_clip);
|
||||
GTK_CSS_GADGET_CLASS (gtk_css_custom_gadget_parent_class)->allocate (gadget, allocation, baseline, out_clip);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
Reference in New Issue
Block a user