Bug 1777664 [Wayland] Add more logging to EGL window management r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D152692
This commit is contained in:
stransky 2022-07-26 14:56:48 +00:00
Родитель 809626ef79
Коммит f2bb8e9336
2 изменённых файлов: 13 добавлений и 6 удалений

Просмотреть файл

@ -118,15 +118,18 @@ void GtkCompositorWidget::RemoteLayoutSizeUpdated(
} }
EGLNativeWindowType GtkCompositorWidget::GetEGLNativeWindow() { EGLNativeWindowType GtkCompositorWidget::GetEGLNativeWindow() {
EGLNativeWindowType window = nullptr;
if (mWidget) { if (mWidget) {
return (EGLNativeWindowType)mWidget->GetNativeData(NS_NATIVE_EGL_WINDOW); window = (EGLNativeWindowType)mWidget->GetNativeData(NS_NATIVE_EGL_WINDOW);
} }
#if defined(MOZ_X11) #if defined(MOZ_X11)
if (mXWindow) { if (mXWindow) {
return (EGLNativeWindowType)mXWindow; window = (EGLNativeWindowType)mXWindow;
} }
#endif #endif
return nullptr; LOG("GtkCompositorWidget::GetEGLNativeWindow [%p] mWidget %p window %p\n",
(void*)mWidget.get(), mWidget.get(), window);
return window;
} }
#if defined(MOZ_WAYLAND) #if defined(MOZ_WAYLAND)

Просмотреть файл

@ -682,6 +682,9 @@ struct wl_egl_window* moz_container_wayland_get_egl_window(
MutexAutoLock lock(*wl_container->container_lock); MutexAutoLock lock(*wl_container->container_lock);
if (!wl_container->surface || !wl_container->ready_to_draw) { if (!wl_container->surface || !wl_container->ready_to_draw) {
LOGWAYLAND(
" quit, wl_container->surface %p wl_container->ready_to_draw %d\n",
wl_container->surface, wl_container->ready_to_draw);
return nullptr; return nullptr;
} }
if (!wl_container->eglwindow) { if (!wl_container->eglwindow) {
@ -690,9 +693,10 @@ struct wl_egl_window* moz_container_wayland_get_egl_window(
wl_container->surface, (int)round(gdk_window_get_width(window) * scale), wl_container->surface, (int)round(gdk_window_get_width(window) * scale),
(int)round(gdk_window_get_height(window) * scale)); (int)round(gdk_window_get_height(window) * scale));
LOGWAYLAND("%s [%p] created eglwindow %p\n", __FUNCTION__, LOGWAYLAND("%s [%p] created eglwindow %p size %d x %d scale %f\n",
(void*)moz_container_get_nsWindow(container), __FUNCTION__, (void*)moz_container_get_nsWindow(container),
(void*)wl_container->eglwindow); (void*)wl_container->eglwindow, gdk_window_get_width(window),
gdk_window_get_height(window), scale);
} }
return wl_container->eglwindow; return wl_container->eglwindow;
} }