зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1654687 - Remove some more GTK3-version related checks, r=stransky
They are all present since 3.8. Also bumb a version check. Differential Revision: https://phabricator.services.mozilla.com/D84899
This commit is contained in:
Родитель
f13a78bbb2
Коммит
1e96614739
|
@ -796,15 +796,8 @@ WaylandGLSurface::~WaylandGLSurface() {
|
|||
// static
|
||||
EGLSurface GLContextEGL::CreateWaylandBufferSurface(
|
||||
GLLibraryEGL* const egl, EGLConfig config, mozilla::gfx::IntSize& pbsize) {
|
||||
// Available as of GTK 3.8+
|
||||
static auto sGdkWaylandDisplayGetWlCompositor =
|
||||
(wl_compositor * (*)(GdkDisplay*))
|
||||
dlsym(RTLD_DEFAULT, "gdk_wayland_display_get_wl_compositor");
|
||||
|
||||
if (!sGdkWaylandDisplayGetWlCompositor) return nullptr;
|
||||
|
||||
struct wl_compositor* compositor =
|
||||
sGdkWaylandDisplayGetWlCompositor(gdk_display_get_default());
|
||||
gdk_wayland_display_get_wl_compositor(gdk_display_get_default());
|
||||
struct wl_surface* wlsurface = wl_compositor_create_surface(compositor);
|
||||
struct wl_egl_window* eglwindow =
|
||||
wl_egl_window_create(wlsurface, pbsize.width, pbsize.height);
|
||||
|
|
|
@ -276,7 +276,7 @@ add_old_configure_assignment('MOZ_X11', True, when=toolkit_gtk)
|
|||
# Wayland support
|
||||
# ==============================================================
|
||||
wayland_headers = pkg_check_modules(
|
||||
'MOZ_WAYLAND', 'gtk+-wayland-3.0 >= 3.10 xkbcommon >= 0.4.1 libdrm >= 2.4',
|
||||
'MOZ_WAYLAND', 'gtk+-wayland-3.0 >= 3.14 xkbcommon >= 0.4.1 libdrm >= 2.4',
|
||||
allow_missing=depends(full_toolkit)(lambda t: t == 'cairo-gtk3'),
|
||||
when=depends(full_toolkit)(lambda t: t in ('cairo-gtk3', 'cairo-gtk3-wayland')))
|
||||
|
||||
|
|
|
@ -146,11 +146,8 @@ void moz_container_wayland_add_initial_draw_callback(
|
|||
}
|
||||
|
||||
wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget) {
|
||||
static auto sGdkWaylandWindowGetWlSurface = (wl_surface * (*)(GdkWindow*))
|
||||
dlsym(RTLD_DEFAULT, "gdk_wayland_window_get_wl_surface");
|
||||
|
||||
GdkWindow* window = gtk_widget_get_window(aWidget);
|
||||
wl_surface* surface = sGdkWaylandWindowGetWlSurface(window);
|
||||
wl_surface* surface = gdk_wayland_window_get_wl_surface(window);
|
||||
|
||||
LOGWAYLAND(("moz_gtk_widget_get_wl_surface [%p] wl_surface %p ID %d\n",
|
||||
(void*)aWidget, (void*)surface,
|
||||
|
|
|
@ -556,6 +556,9 @@ STUB(gdk_window_get_type)
|
|||
STUB(gdk_x11_window_get_xid)
|
||||
STUB(gdk_x11_display_get_type)
|
||||
STUB(gdk_wayland_display_get_type)
|
||||
STUB(gdk_wayland_display_get_wl_compositor)
|
||||
STUB(gdk_wayland_display_get_wl_display)
|
||||
STUB(gdk_wayland_window_get_wl_surface)
|
||||
STUB(gtk_box_new)
|
||||
STUB(gtk_cairo_should_draw_window)
|
||||
STUB(gtk_cairo_transform_to_window)
|
||||
|
|
|
@ -20,10 +20,7 @@ wl_display* WaylandDisplayGetWLDisplay(GdkDisplay* aGdkDisplay) {
|
|||
}
|
||||
}
|
||||
|
||||
// Available as of GTK 3.8+
|
||||
static auto sGdkWaylandDisplayGetWlDisplay = (wl_display * (*)(GdkDisplay*))
|
||||
dlsym(RTLD_DEFAULT, "gdk_wayland_display_get_wl_display");
|
||||
return sGdkWaylandDisplayGetWlDisplay(aGdkDisplay);
|
||||
return gdk_wayland_display_get_wl_display(aGdkDisplay);
|
||||
}
|
||||
|
||||
// nsWaylandDisplay needs to be created for each calling thread(main thread,
|
||||
|
|
Загрузка…
Ссылка в новой задаче