forked from AuroraMiddleware/gtk
GDK-Win32: Drop GDK_WIN32_ENABLE_EGL flag
Instead, use HAVE_EGL check macro instead, which is used by the other platforms as well.
This commit is contained in:
parent
dc9b145e27
commit
480031439f
@ -38,7 +38,7 @@
|
|||||||
#include <dwmapi.h>
|
#include <dwmapi.h>
|
||||||
|
|
||||||
#include "gdkwin32langnotification.h"
|
#include "gdkwin32langnotification.h"
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
# include <epoxy/egl.h>
|
# include <epoxy/egl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ gdk_win32_display_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
|
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
if (display_win32->egl_disp != EGL_NO_DISPLAY)
|
if (display_win32->egl_disp != EGL_NO_DISPLAY)
|
||||||
{
|
{
|
||||||
eglTerminate (display_win32->egl_disp);
|
eglTerminate (display_win32->egl_disp);
|
||||||
@ -1158,7 +1158,7 @@ gdk_win32_display_init_gl_backend (GdkDisplay *display,
|
|||||||
|
|
||||||
result = gdk_win32_display_init_wgl (display, error);
|
result = gdk_win32_display_init_wgl (display, error);
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
g_clear_error (error);
|
g_clear_error (error);
|
||||||
@ -1179,7 +1179,7 @@ gdk_win32_display_init_gl (GdkDisplay *display,
|
|||||||
if (!gdk_win32_display_init_gl_backend (display, error))
|
if (!gdk_win32_display_init_gl_backend (display, error))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
if (display_win32->egl_disp)
|
if (display_win32->egl_disp)
|
||||||
gl_context = g_object_new (GDK_TYPE_WIN32_GL_CONTEXT_EGL, "display", display, NULL);
|
gl_context = g_object_new (GDK_TYPE_WIN32_GL_CONTEXT_EGL, "display", display, NULL);
|
||||||
else
|
else
|
||||||
@ -1203,13 +1203,13 @@ gdk_win32_display_init_gl (GdkDisplay *display,
|
|||||||
gpointer
|
gpointer
|
||||||
gdk_win32_display_get_egl_display (GdkDisplay *display)
|
gdk_win32_display_get_egl_display (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
GdkWin32Display *display_win32;
|
GdkWin32Display *display_win32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_return_val_if_fail (GDK_IS_WIN32_DISPLAY (display), NULL);
|
g_return_val_if_fail (GDK_IS_WIN32_DISPLAY (display), NULL);
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
display_win32 = GDK_WIN32_DISPLAY (display);
|
display_win32 = GDK_WIN32_DISPLAY (display);
|
||||||
|
|
||||||
if (display_win32->wgl_pixel_format != 0)
|
if (display_win32->wgl_pixel_format != 0)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "gdkwin32screen.h"
|
#include "gdkwin32screen.h"
|
||||||
#include "gdkwin32cursor.h"
|
#include "gdkwin32cursor.h"
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
# include <epoxy/egl.h>
|
# include <epoxy/egl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ struct _GdkWin32Display
|
|||||||
int wgl_pixel_format;
|
int wgl_pixel_format;
|
||||||
guint gl_version;
|
guint gl_version;
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
/* EGL (Angle) Items */
|
/* EGL (Angle) Items */
|
||||||
guint egl_version;
|
guint egl_version;
|
||||||
EGLDisplay egl_disp;
|
EGLDisplay egl_disp;
|
||||||
@ -151,7 +151,7 @@ struct _GdkWin32Display
|
|||||||
guint hasWglARBPixelFormat : 1;
|
guint hasWglARBPixelFormat : 1;
|
||||||
guint hasWglARBmultisample : 1;
|
guint hasWglARBmultisample : 1;
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
guint hasEglKHRCreateContext : 1;
|
guint hasEglKHRCreateContext : 1;
|
||||||
guint hasEglSurfacelessContext : 1;
|
guint hasEglSurfacelessContext : 1;
|
||||||
EGLint egl_min_swap_interval;
|
EGLint egl_min_swap_interval;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
#include <epoxy/wgl.h>
|
#include <epoxy/wgl.h>
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
# include <epoxy/egl.h>
|
# include <epoxy/egl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <epoxy/gl.h>
|
#include <epoxy/gl.h>
|
||||||
#include <epoxy/wgl.h>
|
#include <epoxy/wgl.h>
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
# include <epoxy/egl.h>
|
# include <epoxy/egl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -688,7 +688,7 @@ gdk_win32_surface_destroy (GdkSurface *window,
|
|||||||
gdk_win32_surface_set_transient_for (child, NULL);
|
gdk_win32_surface_set_transient_for (child, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_surface_get_display (window));
|
GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_surface_get_display (window));
|
||||||
|
|
||||||
/* Get rid of any EGLSurfaces that we might have created */
|
/* Get rid of any EGLSurfaces that we might have created */
|
||||||
@ -5053,7 +5053,7 @@ gdk_win32_drag_surface_iface_init (GdkDragSurfaceInterface *iface)
|
|||||||
iface->present = gdk_win32_drag_surface_present;
|
iface->present = gdk_win32_drag_surface_present;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
EGLSurface
|
EGLSurface
|
||||||
gdk_win32_surface_get_egl_surface (GdkSurface *surface,
|
gdk_win32_surface_get_egl_surface (GdkSurface *surface,
|
||||||
EGLConfig config,
|
EGLConfig config,
|
||||||
@ -5170,7 +5170,7 @@ _gdk_win32_surface_invalidate_egl_framebuffer (GdkSurface *surface)
|
|||||||
* as we need to re-acquire the EGL surfaces that we rendered to upload to Cairo explicitly,
|
* as we need to re-acquire the EGL surfaces that we rendered to upload to Cairo explicitly,
|
||||||
* using gdk_window_invalidate_rect (), when we maximize or restore or use aerosnap
|
* using gdk_window_invalidate_rect (), when we maximize or restore or use aerosnap
|
||||||
*/
|
*/
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
if (surface->gl_paint_context != NULL && gdk_gl_context_get_use_es (surface->gl_paint_context))
|
if (surface->gl_paint_context != NULL && gdk_gl_context_get_use_es (surface->gl_paint_context))
|
||||||
{
|
{
|
||||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
|
GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
# include <epoxy/egl.h>
|
# include <epoxy/egl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ struct _GdkWin32Surface
|
|||||||
RECT configured_rect;
|
RECT configured_rect;
|
||||||
} next_layout;
|
} next_layout;
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
EGLSurface egl_surface;
|
EGLSurface egl_surface;
|
||||||
EGLSurface egl_dummy_surface;
|
EGLSurface egl_dummy_surface;
|
||||||
guint egl_force_redraw_all : 1;
|
guint egl_force_redraw_all : 1;
|
||||||
@ -373,7 +373,7 @@ void gdk_win32_surface_move_resize (GdkSurface *window,
|
|||||||
RECT
|
RECT
|
||||||
gdk_win32_surface_handle_queued_move_resize (GdkDrawContext *draw_context);
|
gdk_win32_surface_handle_queued_move_resize (GdkDrawContext *draw_context);
|
||||||
|
|
||||||
#ifdef GDK_WIN32_ENABLE_EGL
|
#ifdef HAVE_EGL
|
||||||
EGLSurface gdk_win32_surface_get_egl_surface (GdkSurface *surface,
|
EGLSurface gdk_win32_surface_get_egl_surface (GdkSurface *surface,
|
||||||
EGLConfig config,
|
EGLConfig config,
|
||||||
gboolean is_dummy);
|
gboolean is_dummy);
|
||||||
|
@ -46,10 +46,7 @@ gdk_win32_public_headers = files([
|
|||||||
|
|
||||||
install_headers(gdk_win32_public_headers, 'gdkwin32.h', subdir: 'gtk-4.0/gdk/win32/')
|
install_headers(gdk_win32_public_headers, 'gdkwin32.h', subdir: 'gtk-4.0/gdk/win32/')
|
||||||
|
|
||||||
GDK_WIN32_EGL_CFLAGS = []
|
|
||||||
|
|
||||||
if have_egl
|
if have_egl
|
||||||
GDK_WIN32_EGL_CFLAGS = ['-DGDK_WIN32_ENABLE_EGL']
|
|
||||||
gdk_win32_sources += ['gdkglcontext-win32-egl.c']
|
gdk_win32_sources += ['gdkglcontext-win32-egl.c']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -67,6 +64,6 @@ libgdk_win32 = static_library('gdk-win32',
|
|||||||
'-DINSIDE_GDK_WIN32',
|
'-DINSIDE_GDK_WIN32',
|
||||||
'-D_WIN32_WINNT=0x0601',
|
'-D_WIN32_WINNT=0x0601',
|
||||||
'-DWINVER=0x0601',
|
'-DWINVER=0x0601',
|
||||||
] + GDK_WIN32_EGL_CFLAGS,
|
],
|
||||||
dependencies: [ gdk_deps, gdk_win32_deps ],
|
dependencies: [ gdk_deps, gdk_win32_deps ],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user