From 916853162b025e3c1bafab144658627618c2ec55 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Jan 2023 11:25:04 +0100 Subject: [PATCH] Updated to 109.0 --- D163310.diff | 58 - D163696.diff | 55 - D163697.diff | 28 - D163698.diff | 315 ---- D164896.diff | 1842 -------------------- firefox.spec | 19 +- libwebrtc-screen-cast-sync.patch | 2673 +++++++++++++++--------------- mozilla-1663844.patch | 26 +- 8 files changed, 1341 insertions(+), 3675 deletions(-) delete mode 100644 D163310.diff delete mode 100644 D163696.diff delete mode 100644 D163697.diff delete mode 100644 D163698.diff delete mode 100644 D164896.diff diff --git a/D163310.diff b/D163310.diff deleted file mode 100644 index bad1f17..0000000 --- a/D163310.diff +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -3029,11 +3029,11 @@ - #endif - } - - void nsWindow::SetUserTimeAndStartupTokenForActivatedWindow() { - nsGTKToolkit* toolkit = nsGTKToolkit::GetToolkit(); -- if (!toolkit) { -+ if (!toolkit || MOZ_UNLIKELY(mWindowType == eWindowType_invisible)) { - return; - } - - mWindowActivationTokenFromEnv = toolkit->GetStartupToken(); - if (!mWindowActivationTokenFromEnv.IsEmpty()) { -@@ -6614,30 +6614,34 @@ - return; - } - } - } - // Set up usertime/startupID metadata for the created window. -- if (mWindowType != eWindowType_invisible) { -+ // On X11 we use gtk_window_set_startup_id() so we need to call it -+ // before show. -+ if (GdkIsX11Display()) { - SetUserTimeAndStartupTokenForActivatedWindow(); - } - if (GdkIsWaylandDisplay()) { - if (IsWaylandPopup()) { - ShowWaylandPopupWindow(); - } else { - ShowWaylandToplevelWindow(); - } -+ } else { -+ LOG(" calling gtk_widget_show(mShell)\n"); -+ gtk_widget_show(mShell); -+ } -+ if (GdkIsWaylandDisplay()) { -+ SetUserTimeAndStartupTokenForActivatedWindow(); - #ifdef MOZ_WAYLAND - auto token = std::move(mWindowActivationTokenFromEnv); - if (!token.IsEmpty()) { - FocusWaylandWindow(token.get()); - } - #endif -- } else { -- LOG(" calling gtk_widget_show(mShell)\n"); -- gtk_widget_show(mShell); -- } -- -+ } - if (mHiddenPopupPositioned && IsPopup()) { - LOG(" re-position hidden popup window"); - gtk_window_move(GTK_WINDOW(mShell), mPopupPosition.x, mPopupPosition.y); - mHiddenPopupPositioned = false; - } - diff --git a/D163696.diff b/D163696.diff deleted file mode 100644 index 9002e71..0000000 --- a/D163696.diff +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp ---- a/widget/gtk/GtkCompositorWidget.cpp -+++ b/widget/gtk/GtkCompositorWidget.cpp -@@ -19,13 +19,14 @@ - # include "mozilla/layers/NativeLayerWayland.h" - #endif - - #ifdef MOZ_LOGGING - # undef LOG --# define LOG(...) \ -+# define LOG(str, ...) \ - MOZ_LOG(IsPopup() ? gWidgetPopupLog : gWidgetLog, \ -- mozilla::LogLevel::Debug, (__VA_ARGS__)) -+ mozilla::LogLevel::Debug, \ -+ ("[%p]: " str, mWidget.get(), ##__VA_ARGS__)) - #endif /* MOZ_LOGGING */ - - namespace mozilla { - namespace widget { - -@@ -92,10 +93,13 @@ - - nsIWidget* GtkCompositorWidget::RealWidget() { return mWidget; } - - void GtkCompositorWidget::NotifyClientSizeChanged( - const LayoutDeviceIntSize& aClientSize) { -+ LOG("GtkCompositorWidget::NotifyClientSizeChanged() to %d x %d", -+ aClientSize.width, aClientSize.height); -+ - auto size = mClientSize.Lock(); - *size = aClientSize; - } - - LayoutDeviceIntSize GtkCompositorWidget::GetClientSize() { -@@ -107,14 +111,19 @@ - const LayoutDeviceRect& aSize) { - if (!mWidget || !mWidget->IsWaitingForCompositorResume()) { - return; - } - -+ LOG("GtkCompositorWidget::RemoteLayoutSizeUpdated() %d x %d", -+ (int)aSize.width, (int)aSize.height); -+ - // We're waiting for layout to match widget size. - auto clientSize = mClientSize.Lock(); - if (clientSize->width != (int)aSize.width || - clientSize->height != (int)aSize.height) { -+ LOG("quit, client size doesn't match (%d x %d)", clientSize->width, -+ clientSize->height); - return; - } - - mWidget->ResumeCompositorFromCompositorThread(); - } - diff --git a/D163697.diff b/D163697.diff deleted file mode 100644 index c6a15ba..0000000 --- a/D163697.diff +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/widget/gtk/ScreenHelperGTK.cpp b/widget/gtk/ScreenHelperGTK.cpp ---- a/widget/gtk/ScreenHelperGTK.cpp -+++ b/widget/gtk/ScreenHelperGTK.cpp -@@ -433,19 +433,21 @@ - return -1; - } - - GdkRectangle workArea; - if (!GdkMonitorGetWorkarea(monitor, &workArea)) { -+ LOG_SCREEN(" failed, can't get work area"); - return -1; - } - - for (unsigned int i = 0; i < mMonitors.Length(); i++) { - // Although Gtk/Mutter is very creative in reporting various screens sizes - // we can rely on Gtk work area start position to match wl_output. - if (mMonitors[i]->x == workArea.x && mMonitors[i]->y == workArea.y) { -- LOG_SCREEN(" monitor %d values %d %d -> %d x %d", i, mMonitors[i]->x, -- mMonitors[i]->y, mMonitors[i]->width, mMonitors[i]->height); -+ LOG_SCREEN(" monitor %d work area [%d, %d] -> (%d x %d) scale %d", i, -+ mMonitors[i]->x, mMonitors[i]->y, mMonitors[i]->width, -+ mMonitors[i]->height, mMonitors[i]->scale); - return i; - } - } - - return -1; - diff --git a/D163698.diff b/D163698.diff deleted file mode 100644 index d889961..0000000 --- a/D163698.diff +++ /dev/null @@ -1,315 +0,0 @@ -diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h ---- a/widget/gtk/MozContainerWayland.h -+++ b/widget/gtk/MozContainerWayland.h -@@ -76,13 +76,17 @@ - struct wl_egl_window* moz_container_wayland_get_egl_window( - MozContainer* container, double scale); - - gboolean moz_container_wayland_has_egl_window(MozContainer* container); - void moz_container_wayland_egl_window_set_size(MozContainer* container, -- int width, int height); -+ nsIntSize aSize); -+bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, -+ nsIntSize aSize, -+ int scale); - void moz_container_wayland_set_scale_factor(MozContainer* container); --void moz_container_wayland_set_scale_factor_locked(MozContainer* container); -+void moz_container_wayland_set_scale_factor_locked( -+ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container); - - void moz_container_wayland_add_initial_draw_callback_locked( - MozContainer* container, const std::function& initial_draw_cb); - void moz_container_wayland_add_or_fire_initial_draw_callback( - MozContainer* container, const std::function& initial_draw_cb); -diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp ---- a/widget/gtk/MozContainerWayland.cpp -+++ b/widget/gtk/MozContainerWayland.cpp -@@ -108,13 +108,11 @@ - mSurface = moz_container_wayland_surface_lock(aContainer); - } - MozContainerSurfaceLock::~MozContainerSurfaceLock() { - moz_container_wayland_surface_unlock(mContainer, &mSurface); - } --struct wl_surface* MozContainerSurfaceLock::GetSurface() { -- return mSurface; --} -+struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; } - - // Imlemented in MozContainer.cpp - void moz_container_realize(GtkWidget* widget); - - // Invalidate gtk wl_surface to commit changes to wl_subsurface. -@@ -163,15 +161,16 @@ - // This is called from layout/compositor code only with - // size equal to GL rendering context. Otherwise there are - // rendering artifacts as wl_egl_window size does not match - // GL rendering pipeline setup. - void moz_container_wayland_egl_window_set_size(MozContainer* container, -- int width, int height) { -+ nsIntSize aSize) { - MozContainerWayland* wl_container = &container->wl_container; - MutexAutoLock lock(*wl_container->container_lock); - if (wl_container->eglwindow) { -- wl_egl_window_resize(wl_container->eglwindow, width, height, 0, 0); -+ wl_egl_window_resize(wl_container->eglwindow, aSize.width, aSize.height, 0, -+ 0); - } - } - - void moz_container_wayland_class_init(MozContainerClass* klass) { - /*GObjectClass *gobject_class = G_OBJECT_CLASS (klass); -@@ -432,11 +431,11 @@ - MOZ_CONTAINER(widget))) { - return FALSE; - } - } - -- moz_container_wayland_set_scale_factor_locked(MOZ_CONTAINER(widget)); -+ moz_container_wayland_set_scale_factor_locked(lock, MOZ_CONTAINER(widget)); - moz_container_wayland_set_opaque_region_locked(lock, MOZ_CONTAINER(widget)); - moz_container_clear_input_region(MOZ_CONTAINER(widget)); - moz_container_wayland_invalidate(MOZ_CONTAINER(widget)); - return FALSE; - } -@@ -487,11 +486,11 @@ - if (!container->wl_container.surface) { - if (!moz_container_wayland_surface_create_locked(lock, container)) { - return; - } - } -- moz_container_wayland_set_scale_factor_locked(container); -+ moz_container_wayland_set_scale_factor_locked(lock, container); - moz_container_wayland_set_opaque_region_locked(lock, container); - moz_container_wayland_move_locked(lock, container, allocation->x, - allocation->y); - moz_container_clear_input_region(container); - moz_container_wayland_invalidate(MOZ_CONTAINER(widget)); -@@ -542,55 +541,61 @@ - if (wl_container->surface) { - moz_container_wayland_set_opaque_region_locked(lock, container); - } - } - --void moz_container_wayland_set_scale_factor_locked(MozContainer* container) { -+static void moz_container_wayland_surface_set_scale_locked( -+ const MutexAutoLock& aProofOfLock, MozContainerWayland* wl_container, -+ int scale) { -+ if (wl_container->buffer_scale == scale) { -+ return; -+ } -+ -+ LOGCONTAINER("%s scale %d\n", __FUNCTION__, scale); -+ -+ // There is a chance that the attached wl_buffer has not yet been doubled -+ // on the main thread when scale factor changed to 2. This leads to -+ // crash with the following message: -+ // Buffer size (AxB) must be an integer multiple of the buffer_scale (2) -+ // Removing the possibly wrong wl_buffer to prevent that crash: -+ wl_surface_attach(wl_container->surface, nullptr, 0, 0); -+ wl_surface_set_buffer_scale(wl_container->surface, scale); -+ wl_container->buffer_scale = scale; -+} -+ -+void moz_container_wayland_set_scale_factor_locked( -+ const MutexAutoLock& aProofOfLock, MozContainer* container) { - if (gfx::gfxVars::UseWebRenderCompositor()) { - // the compositor backend handles scaling itself - return; - } - - MozContainerWayland* wl_container = &container->wl_container; - wl_container->container_lock->AssertCurrentThreadOwns(); - - nsWindow* window = moz_container_get_nsWindow(container); -- -- if (window && window->UseFractionalScale()) { -+ MOZ_DIAGNOSTIC_ASSERT(window); -+ if (window->UseFractionalScale()) { - if (!wl_container->viewport) { - wl_container->viewport = wp_viewporter_get_viewport( - WaylandDisplayGet()->GetViewporter(), wl_container->surface); - } - - GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(container)); - wp_viewport_set_destination(wl_container->viewport, - gdk_window_get_width(gdkWindow), - gdk_window_get_height(gdkWindow)); - } else { -- int scale = window ? window->GdkCeiledScaleFactor() : 1; -- -- if (scale == wl_container->buffer_scale) { -- return; -- } -- -- LOGCONTAINER("%s [%p] scale %d\n", __FUNCTION__, -- (void*)moz_container_get_nsWindow(container), scale); -- // There is a chance that the attached wl_buffer has not yet been doubled -- // on the main thread when scale factor changed to 2. This leads to -- // crash with the following message: -- // Buffer size (AxB) must be an integer multiple of the buffer_scale (2) -- // Removing the possibly wrong wl_buffer to prevent that crash: -- wl_surface_attach(wl_container->surface, nullptr, 0, 0); -- wl_surface_set_buffer_scale(wl_container->surface, scale); -- wl_container->buffer_scale = scale; -+ moz_container_wayland_surface_set_scale_locked( -+ aProofOfLock, wl_container, window->GdkCeiledScaleFactor()); - } - } - - void moz_container_wayland_set_scale_factor(MozContainer* container) { - MutexAutoLock lock(*container->wl_container.container_lock); - if (container->wl_container.surface) { -- moz_container_wayland_set_scale_factor_locked(container); -+ moz_container_wayland_set_scale_factor_locked(lock, container); - } - } - - static bool moz_container_wayland_surface_create_locked( - const MutexAutoLock& aProofOfLock, MozContainer* container) { -@@ -598,10 +603,12 @@ - - LOGWAYLAND("%s [%p]\n", __FUNCTION__, - (void*)moz_container_get_nsWindow(container)); - - GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); -+ MOZ_DIAGNOSTIC_ASSERT(window); -+ - wl_surface* parent_surface = gdk_wayland_window_get_wl_surface(window); - if (!parent_surface) { - LOGWAYLAND(" Failed - missing parent surface!"); - return false; - } -@@ -691,36 +698,65 @@ - *surface = nullptr; - } - container->wl_container.container_lock->Unlock(); - } - -+bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, -+ nsIntSize aSize, -+ int aScale) { -+ MozContainerWayland* wl_container = &container->wl_container; -+ if (wl_container->buffer_scale != aScale) { -+ return true; -+ } -+ nsIntSize recentSize; -+ wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, -+ &recentSize.height); -+ return aSize != recentSize; -+} -+ - struct wl_egl_window* moz_container_wayland_get_egl_window( - MozContainer* container, double scale) { - MozContainerWayland* wl_container = &container->wl_container; - -- LOGCONTAINER("%s [%p] eglwindow %p\n", __FUNCTION__, -+ LOGCONTAINER("%s [%p] eglwindow %p scale %d\n", __FUNCTION__, - (void*)moz_container_get_nsWindow(container), -- (void*)wl_container->eglwindow); -+ (void*)wl_container->eglwindow, (int)scale); - - MutexAutoLock lock(*wl_container->container_lock); - if (!wl_container->surface || !wl_container->ready_to_draw) { -- LOGWAYLAND( -+ LOGCONTAINER( - " quit, wl_container->surface %p wl_container->ready_to_draw %d\n", - wl_container->surface, wl_container->ready_to_draw); - return nullptr; - } -+ -+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); -+ nsIntSize requestedSize((int)round(gdk_window_get_width(window) * scale), -+ (int)round(gdk_window_get_height(window) * scale)); -+ - if (!wl_container->eglwindow) { -- GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); - wl_container->eglwindow = wl_egl_window_create( -- wl_container->surface, (int)round(gdk_window_get_width(window) * scale), -- (int)round(gdk_window_get_height(window) * scale)); -+ wl_container->surface, requestedSize.width, requestedSize.height); - -- LOGCONTAINER("%s [%p] created eglwindow %p size %d x %d scale %f\n", -+ LOGCONTAINER("%s [%p] created eglwindow %p size %d x %d (with scale %f)\n", - __FUNCTION__, (void*)moz_container_get_nsWindow(container), -- (void*)wl_container->eglwindow, gdk_window_get_width(window), -- gdk_window_get_height(window), scale); -+ (void*)wl_container->eglwindow, requestedSize.width, -+ requestedSize.height, scale); -+ } else { -+ nsIntSize recentSize; -+ wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, -+ &recentSize.height); -+ if (requestedSize != recentSize) { -+ LOGCONTAINER("%s [%p] resized to %d x %d (with scale %f)\n", __FUNCTION__, -+ (void*)moz_container_get_nsWindow(container), -+ requestedSize.width, requestedSize.height, scale); -+ wl_egl_window_resize(wl_container->eglwindow, requestedSize.width, -+ requestedSize.height, 0, 0); -+ } - } -+ moz_container_wayland_surface_set_scale_locked(lock, wl_container, -+ static_cast(scale)); - return wl_container->eglwindow; - } - - gboolean moz_container_wayland_has_egl_window(MozContainer* container) { - return container->wl_container.eglwindow != nullptr; -diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp ---- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp -+++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp -@@ -301,11 +301,11 @@ - LayoutDeviceIntRect r = iter.Get(); - wl_surface_damage_buffer(waylandSurface, r.x, r.y, r.width, r.height); - } - } - -- moz_container_wayland_set_scale_factor_locked(container); -+ moz_container_wayland_set_scale_factor_locked(aProofOfLock, container); - mInProgressBuffer->AttachAndCommit(waylandSurface); - - mInProgressBuffer->ResetBufferAge(); - mFrontBuffer = mInProgressBuffer; - mFrontBufferInvalidRegion = aInvalidRegion; -diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c ---- a/widget/gtk/mozwayland/mozwayland.c -+++ b/widget/gtk/mozwayland/mozwayland.c -@@ -186,10 +186,13 @@ - MOZ_EXPORT void wl_egl_window_destroy(struct wl_egl_window* egl_window) {} - - MOZ_EXPORT void wl_egl_window_resize(struct wl_egl_window* egl_window, - int width, int height, int dx, int dy) {} - -+MOZ_EXPORT void wl_egl_window_get_attached_size( -+ struct wl_egl_window* egl_window, int* width, int* height) {} -+ - MOZ_EXPORT void wl_list_init(struct wl_list* list) {} - - MOZ_EXPORT void wl_list_insert(struct wl_list* list, struct wl_list* elm) {} - - MOZ_EXPORT void wl_list_remove(struct wl_list* elm) {} -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -9816,13 +9816,18 @@ - void nsWindow::SetEGLNativeWindowSize( - const LayoutDeviceIntSize& aEGLWindowSize) { - if (!mContainer || !GdkIsWaylandDisplay()) { - return; - } -- moz_container_wayland_egl_window_set_size(mContainer, aEGLWindowSize.width, -- aEGLWindowSize.height); -- moz_container_wayland_set_scale_factor(mContainer); -+ if (moz_container_wayland_egl_window_needs_size_update( -+ mContainer, aEGLWindowSize.ToUnknownSize(), GdkCeiledScaleFactor())) { -+ LOG("nsWindow::SetEGLNativeWindowSize() %d x %d", aEGLWindowSize.width, -+ aEGLWindowSize.height); -+ moz_container_wayland_egl_window_set_size(mContainer, -+ aEGLWindowSize.ToUnknownSize()); -+ moz_container_wayland_set_scale_factor(mContainer); -+ } - } - #endif - - LayoutDeviceIntSize nsWindow::GetMozContainerSize() { - LayoutDeviceIntSize size(0, 0); - diff --git a/D164896.diff b/D164896.diff deleted file mode 100644 index 3212ea5..0000000 --- a/D164896.diff +++ /dev/null @@ -1,1842 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -5775,13 +5775,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - - [[package]] - name = "uniffi" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee" - dependencies = [ - "anyhow", - "bytes 1.2.1", - "camino", - "cargo_metadata", -@@ -5885,13 +5885,11 @@ - "uniffi_macros", - ] - - [[package]] - name = "uniffi_bindgen" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621" -+version = "0.21.1" - dependencies = [ - "anyhow", - "askama", - "bincode", - "camino", -@@ -5908,24 +5906,34 @@ - "weedle2", - ] - - [[package]] - name = "uniffi_build" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f" - dependencies = [ - "anyhow", - "camino", - "uniffi_bindgen", - ] - - [[package]] -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" -+dependencies = [ -+ "quote", -+ "syn", -+] -+ -+[[package]] - name = "uniffi_macros" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127" - dependencies = [ - "bincode", - "camino", - "fs-err", - "once_cell", -@@ -5938,15 +5946,17 @@ - "uniffi_meta", - ] - - [[package]] - name = "uniffi_meta" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" - dependencies = [ - "serde", -+ "siphasher", -+ "uniffi_checksum_derive", - ] - - [[package]] - name = "unix_path" - version = "1.0.1" -diff --git a/Cargo.toml b/Cargo.toml ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -180,10 +180,14 @@ - # okay, but it means that their dependencies on UniFFI crates will normally - # also be the git versions. Patch them to use the published versions to avoid - # duplicate crates. - - [patch."https://github.com/mozilla/uniffi-rs.git"] --uniffi = "=0.21.0" --uniffi_bindgen = "=0.21.0" --uniffi_build = "=0.21.0" --uniffi_macros = "=0.21.0" -+uniffi = "=0.21.1" -+#uniffi_bindgen = "=0.21.1" -+uniffi_build = "=0.21.1" -+uniffi_macros = "=0.21.1" - weedle2 = "=4.0.0" -+ -+# Patched to use uniffi_version = 0.21.0 for checksums. -+[patch.crates-io.uniffi_bindgen] -+path = "third_party/rust/uniffi_bindgen" -diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml ---- a/supply-chain/audits.toml -+++ b/supply-chain/audits.toml -@@ -1535,10 +1535,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ - [[audits.uniffi_bindgen]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1558,10 +1564,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_bindgen]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "I authored the changes in this version." -+ - [[audits.uniffi_build]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1581,10 +1593,22 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_build]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ -+[[audits.uniffi_checksum_derive]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+version = "0.21.1" -+notes = "I authored this crate." -+ - [[audits.uniffi_macros]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1604,10 +1628,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_macros]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ - [[audits.uniffi_meta]] - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - version = "0.19.6" - notes = "Maintained by the Glean and Application Services team." -@@ -1621,10 +1651,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_meta]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "I authored the changes in this version." -+ - [[audits.void]] - who = "Bobby Holley " - criteria = "safe-to-deploy" - version = "1.0.2" - notes = "Very small crate, just hosts the Void type for easier cross-crate interfacing." -diff --git a/supply-chain/config.toml b/supply-chain/config.toml ---- a/supply-chain/config.toml -+++ b/supply-chain/config.toml -@@ -156,10 +156,14 @@ - - [policy.tabs] - audit-as-crates-io = false - notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." - -+[policy.uniffi_bindgen] -+audit-as-crates-io = false -+notes = "This is a first-party crate, normally vendored, but currently patched in-tree until next update." -+ - [policy.viaduct] - audit-as-crates-io = false - notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." - - [policy.webdriver] -diff --git a/third_party/rust/uniffi/.cargo-checksum.json b/third_party/rust/uniffi/.cargo-checksum.json ---- a/third_party/rust/uniffi/.cargo-checksum.json -+++ b/third_party/rust/uniffi/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"b7bde8b1b6bb7e1420c9c486d7562d1639fbb82a2b6459b8b3b7d15f002377d3","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830"} -\ No newline at end of file -+{"files":{"Cargo.toml":"40a5376941ee93f7d3d013862731eaced1121c852bd4df4affe1cd65bf9b68be","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi/Cargo.toml b/third_party/rust/uniffi/Cargo.toml ---- a/third_party/rust/uniffi/Cargo.toml -+++ b/third_party/rust/uniffi/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (runtime support code)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.anyhow] - version = "1" - - [dependencies.bytes] -@@ -48,15 +47,15 @@ - - [dependencies.static_assertions] - version = "1.1.0" - - [dependencies.uniffi_bindgen] --version = "=0.21.0" -+version = "=0.21.1" - optional = true - - [dependencies.uniffi_macros] --version = "=0.21.0" -+version = "=0.21.1" - - [dev-dependencies.trybuild] - version = "1" - - [features] -diff --git a/third_party/rust/uniffi_bindgen/.cargo-checksum.json b/third_party/rust/uniffi_bindgen/.cargo-checksum.json ---- a/third_party/rust/uniffi_bindgen/.cargo-checksum.json -+++ b/third_party/rust/uniffi_bindgen/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.lock":"5ed0714fd87076b5b5f11ca60553f12559e69794c2fec7d487a398f31a577a5f","Cargo.toml":"209b8cb7759ec813ee1e27a4b7e1d2bed2604c37d7c55578058bc7089ee9557e","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"2f76377eebdd62e770bb9089885482a49a57e1f8405320bb778353f3e8974447","src/interface/callbacks.rs":"c9f4b97b21195ba2d1787f032f1daa5f4ce2fc40e014942e07e4eb37b5b95ee9","src/interface/enum_.rs":"1a7cda619a986a20fd4d0f145206aba2c500ce5dfca90d01e5324996fd68dc04","src/interface/error.rs":"f31fc0a7e41b4c8f4b81d06958fda14af6f05bfa318206098e0ec351cf4db809","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"d6df6d8d412d7c45fe33c7337b37aeb851ae0f21834c4bd8b315aad4ca4ec309","src/interface/literal.rs":"3d2102cb47ff658f329d66d6c867b13a50e7f56535f23c1b414f857741360358","src/interface/mod.rs":"1d1993504ce61a2f578cb6fb42c79b7829a0767c20983581d631ee948819665e","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"44836747d5d00bb40ecadb889c9a6ff32c1cbf625b5a6a337f5891f495fd92fd","src/interface/record.rs":"5859ea6c1f6c5524d1e6f3846954986710d5f74f1c6fd6324c4245b5f70013d5","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"fe63c3fd233ad905af0358c5d610c85a5a57f263eb899acc756454a1029c4569","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621"} -\ No newline at end of file -+{"files":{"Cargo.lock":"3b1693f0ada97ba7e0527d763402404b39fe341da22bd45aaf057e4be3fa3234","Cargo.toml":"58662147277f1620eccd6592f83623cf71959df8326e9d700fdaac47c6e6cf35","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"6c062b60deb332fbb76e70bc675e65c2bc3f2060fad7cec87492609fa9ce166c","src/interface/callbacks.rs":"e311fe8c80fae1d84c1e867a3c36a47a6d6a41847bb2d633edefac7c69402c84","src/interface/enum_.rs":"4ff34ff12c19be0bc9d807020fd4c8e20660c418741e68408671a18165e4b95b","src/interface/error.rs":"85a61e5bb38b369b60110928a78dc84ae77a06d0cbae4dfe9ff9dff2b8c27e5a","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"19219c6c984d4117362ee5c269712ec2ad462476902442062ef2a3b0619b014c","src/interface/literal.rs":"d93d168176ba2824d26c490396f4baffc1d418c3c94e4a1ef0ceb3cfca16a239","src/interface/mod.rs":"88dd169859004da79bd1488e6432bc7dae8b6cba9238cab1d676e570dad31d62","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"106cbf5ec2a684700dd99c9748ba161320abb2cecec3c5022d5dd1a9ec4f5b85","src/interface/record.rs":"5b9db093c0c90f5c757e09e6c9afee6b99e2e724c7b388924990b1a6f46357e9","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"25a598fd206975cc1e62aaa269b461654c913ad6c0b6a2719c486acfcc68b45b","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"5d46080a4840abccf7c0cce21931dae53215cbd7dd969b5e63c486235ce91a2a"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_bindgen/Cargo.lock b/third_party/rust/uniffi_bindgen/Cargo.lock ---- a/third_party/rust/uniffi_bindgen/Cargo.lock -+++ b/third_party/rust/uniffi_bindgen/Cargo.lock -@@ -2,13 +2,13 @@ - # It is not intended for manual editing. - version = 3 - - [[package]] - name = "anyhow" --version = "1.0.65" -+version = "1.0.66" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" -+checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" - - [[package]] - name = "askama" - version = "0.11.1" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -97,13 +97,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - - [[package]] - name = "clap" --version = "3.2.22" -+version = "3.2.23" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" -+checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" - dependencies = [ - "atty", - "bitflags", - "clap_derive", - "clap_lex", -@@ -136,13 +136,13 @@ - "os_str_bytes", - ] - - [[package]] - name = "fs-err" --version = "2.8.1" -+version = "2.9.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50" -+checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" - - [[package]] - name = "goblin" - version = "0.5.4" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -174,13 +174,13 @@ - "libc", - ] - - [[package]] - name = "indexmap" --version = "1.9.1" -+version = "1.9.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" -+checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" - dependencies = [ - "autocfg", - "hashbrown", - ] - -@@ -190,13 +190,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" - - [[package]] - name = "libc" --version = "0.2.135" -+version = "0.2.138" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" -+checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" - - [[package]] - name = "log" - version = "0.4.17" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -243,25 +243,25 @@ - "minimal-lexical", - ] - - [[package]] - name = "once_cell" --version = "1.15.0" -+version = "1.16.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" -+checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" - - [[package]] - name = "os_str_bytes" --version = "6.3.0" -+version = "6.4.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" -+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - - [[package]] - name = "paste" --version = "1.0.9" -+version = "1.0.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" -+checksum = "cf1c2c742266c2f1041c914ba65355a83ae8747b05f208319784083583494b4b" - - [[package]] - name = "plain" - version = "0.2.3" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -291,13 +291,13 @@ - "version_check", - ] - - [[package]] - name = "proc-macro2" --version = "1.0.46" -+version = "1.0.47" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" -+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" - dependencies = [ - "unicode-ident", - ] - - [[package]] -@@ -335,50 +335,56 @@ - "syn", - ] - - [[package]] - name = "serde" --version = "1.0.145" -+version = "1.0.150" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" -+checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" - dependencies = [ - "serde_derive", - ] - - [[package]] - name = "serde_derive" --version = "1.0.145" -+version = "1.0.150" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" -+checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" - dependencies = [ - "proc-macro2", - "quote", - "syn", - ] - - [[package]] - name = "serde_json" --version = "1.0.86" -+version = "1.0.89" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074" -+checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" - dependencies = [ - "itoa", - "ryu", - "serde", - ] - - [[package]] -+name = "siphasher" -+version = "0.3.10" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" -+ -+[[package]] - name = "strsim" - version = "0.10.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - - [[package]] - name = "syn" --version = "1.0.102" -+version = "1.0.105" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" -+checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" - dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", - ] -@@ -392,19 +398,19 @@ - "winapi-util", - ] - - [[package]] - name = "textwrap" --version = "0.15.1" -+version = "0.16.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" -+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - - [[package]] - name = "toml" --version = "0.5.9" -+version = "0.5.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" -+checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" - dependencies = [ - "serde", - ] - - [[package]] -@@ -422,11 +428,11 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" - - [[package]] - name = "uniffi_bindgen" --version = "0.21.0" -+version = "0.21.1" - dependencies = [ - "anyhow", - "askama", - "bincode", - "camino", -@@ -442,16 +448,28 @@ - "uniffi_meta", - "weedle2", - ] - - [[package]] -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" -+dependencies = [ -+ "quote", -+ "syn", -+] -+ -+[[package]] - name = "uniffi_meta" --version = "0.21.0" -+version = "0.21.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" -+checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" - dependencies = [ - "serde", -+ "siphasher", -+ "uniffi_checksum_derive", - ] - - [[package]] - name = "version_check" - version = "0.9.4" -diff --git a/third_party/rust/uniffi_bindgen/Cargo.toml b/third_party/rust/uniffi_bindgen/Cargo.toml ---- a/third_party/rust/uniffi_bindgen/Cargo.toml -+++ b/third_party/rust/uniffi_bindgen/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_bindgen" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (codegen and cli tooling)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [[bin]] - name = "uniffi-bindgen" - path = "src/main.rs" - -@@ -74,9 +73,9 @@ - - [dependencies.toml] - version = "0.5" - - [dependencies.uniffi_meta] --version = "=0.21.0" -+version = "=0.21.1" - - [dependencies.weedle2] - version = "4.0.0" -diff --git a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs -@@ -13,17 +13,18 @@ - //! We only support a small number of attributes, so it's manageable to have them - //! all handled by a single abstraction. This might need to be refactored in future - //! if we grow significantly more complicated attribute handling. - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - /// Represents an attribute parsed from UDL, like `[ByRef]` or `[Throws]`. - /// - /// This is a convenience enum for parsing UDL attributes and erroring out if we encounter - /// any unsupported ones. These don't convert directly into parts of a `ComponentInterface`, but - /// may influence the properties of things like functions and arguments. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub(super) enum Attribute { - ByRef, - Enum, - Error, - Name(String), -@@ -117,11 +118,11 @@ - Ok(attrs) - } - - /// Attributes that can be attached to an `enum` definition in the UDL. - /// There's only one case here: using `[Error]` to mark an enum as an error class. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct EnumAttributes(Vec); - - impl EnumAttributes { - pub fn contains_error_attr(&self) -> bool { - self.0.iter().any(|attr| attr.is_error()) -@@ -153,11 +154,11 @@ - - /// Represents UDL attributes that might appear on a function. - /// - /// This supports the `[Throws=ErrorName]` attribute for functions that - /// can produce an error. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct FunctionAttributes(Vec); - - impl FunctionAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -196,11 +197,11 @@ - - /// Represents UDL attributes that might appear on a function argument. - /// - /// This supports the `[ByRef]` attribute for arguments that should be passed - /// by reference in the generated Rust scaffolding. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct ArgumentAttributes(Vec); - - impl ArgumentAttributes { - pub fn by_ref(&self) -> bool { - self.0.iter().any(|attr| matches!(attr, Attribute::ByRef)) -@@ -231,11 +232,11 @@ - } - } - } - - /// Represents UDL attributes that might appear on an `interface` definition. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct InterfaceAttributes(Vec); - - impl InterfaceAttributes { - pub fn contains_enum_attr(&self) -> bool { - self.0.iter().any(|attr| attr.is_enum()) -@@ -285,11 +286,11 @@ - - /// Represents UDL attributes that might appear on a constructor. - /// - /// This supports the `[Throws=ErrorName]` attribute for constructors that can produce - /// an error, and the `[Name=MethodName]` for non-default constructors. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct ConstructorAttributes(Vec); - - impl ConstructorAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -324,11 +325,11 @@ - - /// Represents UDL attributes that might appear on a method. - /// - /// This supports the `[Throws=ErrorName]` attribute for methods that can produce - /// an error, and the `[Self=ByArc]` attribute for methods that take `Arc` as receiver. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct MethodAttributes(Vec); - - impl MethodAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -373,11 +374,11 @@ - /// Represents the different possible types of method call receiver. - /// - /// Actually we only support one of these right now, `[Self=ByArc]`. - /// We might add more in future, e.g. a `[Self=ByRef]` if there are cases - /// where we need to force the receiver to be taken by reference. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub(super) enum SelfType { - ByArc, // Method receiver is `Arc`. - } - - impl TryFrom<&weedle::attribute::IdentifierOrString<'_>> for SelfType { -@@ -396,11 +397,11 @@ - } - - /// Represents UDL attributes that might appear on a typedef - /// - /// This supports the `[External="crate_name"]` and `[Custom]` attributes for types. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct TypedefAttributes(Vec); - - impl TypedefAttributes { - pub(super) fn get_crate_name(&self) -> String { - self.0 -diff --git a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs -@@ -31,23 +31,29 @@ - //! assert_eq!(callback.name(), "Example"); - //! assert_eq!(callback.methods()[0].name(), "hello"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - --use std::hash::{Hash, Hasher}; -- - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction, FFIType}; - use super::object::Method; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct CallbackInterface { - pub(super) name: String, - pub(super) methods: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_init_callback: FFIFunction, - } - - impl CallbackInterface { - fn new(name: String) -> CallbackInterface { -@@ -86,23 +92,10 @@ - pub fn iter_types(&self) -> TypeIterator<'_> { - Box::new(self.methods.iter().flat_map(Method::iter_types)) - } - } - --impl Hash for CallbackInterface { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.methods.hash(state); -- } --} -- - impl APIConverter for weedle::CallbackInterfaceDefinition<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.attributes.is_some() { - bail!("callback interface attributes are not supported yet"); - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs -@@ -75,21 +75,22 @@ - //! assert_eq!(e.variants()[1].fields()[0].name(), "first"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::record::Field; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - - /// Represents an enum with named variants, each of which may have named - /// and typed fields. - /// - /// Enums are passed across the FFI by serializing to a bytebuffer, with a - /// i32 indicating the variant followed by the serialization of each field. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Enum { - pub(super) name: String, - pub(super) variants: Vec, - // "Flat" enums do not have, and will never have, variants with associated data. - pub(super) flat: bool, -@@ -172,11 +173,11 @@ - } - - /// Represents an individual variant in an Enum. - /// - /// Each variant has a name and zero or more fields. --#[derive(Debug, Clone, Default, Hash)] -+#[derive(Debug, Clone, Default, Checksum)] - pub struct Variant { - pub(super) name: String, - pub(super) fields: Vec, - } - -diff --git a/third_party/rust/uniffi_bindgen/src/interface/error.rs b/third_party/rust/uniffi_bindgen/src/interface/error.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/error.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/error.rs -@@ -81,10 +81,11 @@ - //! assert_eq!(err.is_flat(), false); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::Result; -+use uniffi_meta::Checksum; - - use super::enum_::{Enum, Variant}; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - -@@ -92,11 +93,11 @@ - /// - /// Errors are represented in the UDL as enums with the special `[Error]` attribute, but - /// they're handled in the FFI very differently. We create them in `uniffi::call_with_result()` if - /// the wrapped function returns an `Err` value - /// struct and assign an integer error code to each variant. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Error { - pub name: String, - enum_: Enum, - } - -diff --git a/third_party/rust/uniffi_bindgen/src/interface/function.rs b/third_party/rust/uniffi_bindgen/src/interface/function.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/function.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/function.rs -@@ -30,13 +30,13 @@ - //! assert!(matches!(func.return_type(), Some(Type::String))); - //! assert_eq!(func.arguments().len(), 0); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - use std::convert::TryFrom; --use std::hash::{Hash, Hasher}; - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction}; - use super::literal::{convert_default_value, Literal}; - use super::types::{Type, TypeIterator}; - use super::{ -@@ -49,15 +49,22 @@ - /// - /// Each `Function` corresponds to a standalone function in the rust module, - /// and has a corresponding standalone function in the foreign language bindings. - /// - /// In the FFI, this will be a standalone function with appropriately lowered types. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Function { - pub(super) name: String, - pub(super) arguments: Vec, - pub(super) return_type: Option, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: FunctionAttributes, - } - - impl Function { -@@ -140,25 +147,10 @@ - attributes: Default::default(), - } - } - } - --impl Hash for Function { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.arguments.hash(state); -- self.return_type.hash(state); -- self.attributes.hash(state); -- } --} -- - impl APIConverter for weedle::namespace::NamespaceMember<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - match self { - weedle::namespace::NamespaceMember::Operation(f) => f.convert(ci), - _ => bail!("no support for namespace member type {:?} yet", self), -@@ -183,11 +175,11 @@ - } - - /// Represents an argument to a function/constructor/method call. - /// - /// Each argument has a name and a type, along with some optional metadata. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Argument { - pub(super) name: String, - pub(super) type_: Type, - pub(super) by_ref: bool, - pub(super) optional: bool, -diff --git a/third_party/rust/uniffi_bindgen/src/interface/literal.rs b/third_party/rust/uniffi_bindgen/src/interface/literal.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/literal.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/literal.rs -@@ -6,16 +6,17 @@ - //! - //! This module provides support for interpreting literal values from the UDL, - //! which appear in places such as default arguments. - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::types::Type; - - // Represents a literal value. - // Used for e.g. default argument values. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub enum Literal { - Boolean(bool), - String(String), - // Integers are represented as the widest representation we can. - // Number formatting vary with language and radix, so we avoid a lot of parsing and -@@ -33,11 +34,11 @@ - Null, - } - - // Represent the radix of integer literal values. - // We preserve the radix into the generated bindings for readability reasons. --#[derive(Debug, Clone, Copy, Hash)] -+#[derive(Debug, Clone, Copy, Checksum)] - pub enum Radix { - Decimal = 10, - Octal = 8, - Hexadecimal = 16, - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/mod.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/mod.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/mod.rs -@@ -42,16 +42,11 @@ - //! a good opportunity here for e.g. interned strings, but we're nowhere near the point were we need - //! that kind of optimization just yet. - //! - //! * Error messages and general developer experience leave a lot to be desired. - --use std::{ -- collections::HashSet, -- convert::TryFrom, -- hash::{Hash, Hasher}, -- iter, --}; -+use std::{collections::HashSet, convert::TryFrom, iter}; - - use anyhow::{bail, Result}; - - pub mod types; - pub use types::Type; -@@ -75,26 +70,30 @@ - mod record; - pub use record::{Field, Record}; - - pub mod ffi; - pub use ffi::{FFIArgument, FFIFunction, FFIType}; --use uniffi_meta::{MethodMetadata, ObjectMetadata}; -+use uniffi_meta::{Checksum, MethodMetadata, ObjectMetadata}; - - /// The main public interface for this module, representing the complete details of an interface exposed - /// by a rust component and the details of consuming it via an extern-C FFI layer. - /// --#[derive(Debug, Default)] -+#[derive(Debug, Default, Checksum)] - pub struct ComponentInterface { - /// Every ComponentInterface gets tagged with the version of uniffi used to create it. - /// This helps us avoid using a lib compiled with one version together with bindings created - /// using a different version, which might introduce unsafety. - uniffi_version: String, - /// All of the types used in the interface. -+ // We can't checksum `self.types`, but its contents are implied by the other fields -+ // anyway, so it's safe to ignore it. -+ #[checksum_ignore] - pub(super) types: TypeUniverse, - /// The unique prefix that we'll use for namespacing when exposing this component's API. - namespace: String, - /// The internal unique prefix used to namespace FFI symbols -+ #[checksum_ignore] - ffi_namespace: String, - /// The high-level API provided by the component. - enums: Vec, - records: Vec, - functions: Vec, -@@ -105,11 +104,11 @@ - - impl ComponentInterface { - /// Parse a `ComponentInterface` from a string containing a WebIDL definition. - pub fn from_webidl(idl: &str) -> Result { - let mut ci = Self { -- uniffi_version: env!("CARGO_PKG_VERSION").to_string(), -+ uniffi_version: "0.21.0".to_string(), - ..Default::default() - }; - // There's some lifetime thing with the errors returned from weedle::Definitions::parse - // that my own lifetime is too short to worry about figuring out; unwrap and move on. - -@@ -319,20 +318,12 @@ - /// and the same version of Rust, will always have the same checksum value. - /// - Two ComponentInterfaces will, with high probability, have different checksum values if: - /// - They were generated from two different WebIDL files. - /// - They were generated by two different versions of uniffi - /// -- /// The checksum may or may not change depending on the version of Rust used; since we expect -- /// consumers to be using the same executable to generate both the scaffolding and the bindings, -- /// assuming the same version of Rust seems acceptable. -- /// - /// Note that this is designed to prevent accidents, not attacks, so there is no need for the - /// checksum to be cryptographically secure. -- /// -- /// TODO: it's not clear to me if the derivation of `Hash` is actually deterministic enough to -- /// ensure the guarantees above, or if it might be sensitive to e.g. compiler-driven re-ordering -- /// of struct field. Let's see how it goes... - pub fn checksum(&self) -> u16 { - uniffi_meta::checksum(self) - } - - /// The namespace to use in FFI-level function definitions. -@@ -670,27 +661,10 @@ - } - Ok(()) - } - } - --/// `ComponentInterface` structs can be hashed, but this is mostly a convenient way to --/// produce a checksum of their contents. They're not really intended to live in a hashtable. --impl Hash for ComponentInterface { -- fn hash(&self, state: &mut H) { -- // We can't hash `self.types`, but its contents are implied by the other fields -- // anyway, so it's safe to ignore it. -- self.uniffi_version.hash(state); -- self.namespace.hash(state); -- self.enums.hash(state); -- self.records.hash(state); -- self.functions.hash(state); -- self.objects.hash(state); -- self.callback_interfaces.hash(state); -- self.errors.hash(state); -- } --} -- - fn get_or_insert_object<'a>(objects: &'a mut Vec, name: &str) -> &'a mut Object { - // The find-based way of writing this currently runs into a borrow checker - // error, so we use position - match objects.iter_mut().position(|o| o.name == name) { - Some(idx) => &mut objects[idx], -diff --git a/third_party/rust/uniffi_bindgen/src/interface/object.rs b/third_party/rust/uniffi_bindgen/src/interface/object.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/object.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/object.rs -@@ -56,14 +56,14 @@ - //! assert_eq!(obj.constructors().len(), 0); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use std::convert::TryFrom; --use std::hash::{Hash, Hasher}; - use std::{collections::HashSet, iter}; - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction, FFIType}; - use super::function::Argument; - use super::types::{Type, TypeIterator}; - use super::{ -@@ -84,16 +84,24 @@ - /// binding code is expected to stitch these functions back together into an appropriate class - /// definition (or that language's equivalent thereof). - /// - /// TODO: - /// - maybe "Class" would be a better name than "Object" here? --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Object { - pub(super) name: String, - pub(super) constructors: Vec, - pub(super) methods: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func_free: FFIFunction, -+ #[checksum_ignore] - pub(super) uses_deprecated_threadsafe_attribute: bool, - } - - impl Object { - pub(super) fn new(name: String) -> Object { -@@ -188,24 +196,10 @@ - .flatten(), - ) - } - } - --impl Hash for Object { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.constructors.hash(state); -- self.methods.hash(state); -- } --} -- - impl APIConverter for weedle::InterfaceDefinition<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.inheritance.is_some() { - bail!("interface inheritence is not supported"); - } -@@ -243,14 +237,21 @@ - - // Represents a constructor for an object type. - // - // In the FFI, this will be a function that returns a pointer to an instance - // of the corresponding object type. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Constructor { - pub(super) name: String, - pub(super) arguments: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: ConstructorAttributes, - } - - impl Constructor { -@@ -297,24 +298,10 @@ - pub fn iter_types(&self) -> TypeIterator<'_> { - Box::new(self.arguments.iter().flat_map(Argument::iter_types)) - } - } - --impl Hash for Constructor { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.arguments.hash(state); -- self.attributes.hash(state); -- } --} -- - impl Default for Constructor { - fn default() -> Self { - Constructor { - name: String::from("new"), - arguments: Vec::new(), -@@ -341,16 +328,23 @@ - - // Represents an instance method for an object type. - // - // The FFI will represent this as a function whose first/self argument is a - // `FFIType::RustArcPtr` to the instance. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Method { - pub(super) name: String, - pub(super) object_name: String, -+ pub(super) arguments: Vec, - pub(super) return_type: Option, -- pub(super) arguments: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: MethodAttributes, - } - - impl Method { -@@ -448,26 +442,10 @@ - attributes: Default::default(), - } - } - } - --impl Hash for Method { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.object_name.hash(state); -- self.arguments.hash(state); -- self.return_type.hash(state); -- self.attributes.hash(state); -- } --} -- - impl APIConverter for weedle::interface::OperationInterfaceMember<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.special.is_some() { - bail!("special operations not supported"); - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/record.rs b/third_party/rust/uniffi_bindgen/src/interface/record.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/record.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/record.rs -@@ -43,10 +43,11 @@ - //! assert_eq!(record.fields()[1].name(), "value"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::types::{Type, TypeIterator}; - use super::{ - convert_type, - literal::{convert_default_value, Literal}, -@@ -56,11 +57,11 @@ - /// Represents a "data class" style object, for passing around complex values. - /// - /// In the FFI these are represented as a byte buffer, which one side explicitly - /// serializes the data into and the other serializes it out of. So I guess they're - /// kind of like "pass by clone" values. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Record { - pub(super) name: String, - pub(super) fields: Vec, - } - -@@ -107,11 +108,11 @@ - }) - } - } - - // Represents an individual field on a Record. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Field { - pub(super) name: String, - pub(super) type_: Type, - pub(super) required: bool, - pub(super) default: Option, -diff --git a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs -@@ -23,10 +23,11 @@ - - use std::{collections::hash_map::Entry, collections::BTreeSet, collections::HashMap, iter}; - - use anyhow::{bail, Result}; - use heck::ToUpperCamelCase; -+use uniffi_meta::Checksum; - - use super::ffi::FFIType; - - mod finder; - pub(super) use finder::TypeFinder; -@@ -34,11 +35,11 @@ - pub(super) use resolver::{resolve_builtin_type, TypeResolver}; - - /// Represents all the different high-level types that can be used in a component interface. - /// At this level we identify user-defined types by name, without knowing any details - /// of their internal structure apart from what type of thing they are (record, enum, etc). --#[derive(Debug, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)] -+#[derive(Debug, Clone, Eq, PartialEq, Checksum, Ord, PartialOrd)] - pub enum Type { - // Primitive types. - UInt8, - Int8, - UInt16, -diff --git a/third_party/rust/uniffi_build/.cargo-checksum.json b/third_party/rust/uniffi_build/.cargo-checksum.json ---- a/third_party/rust/uniffi_build/.cargo-checksum.json -+++ b/third_party/rust/uniffi_build/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"bf9105f53978ecdccad9a75fc3645f97982d3c4162a5a9b49ab16554162b51c1","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db"} -\ No newline at end of file -+{"files":{"Cargo.toml":"30736876caf953bd0040b6c0fc824744556bf52fe23d656c7d01442d4c180674","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_build/Cargo.toml b/third_party/rust/uniffi_build/Cargo.toml ---- a/third_party/rust/uniffi_build/Cargo.toml -+++ b/third_party/rust/uniffi_build/Cargo.toml -@@ -10,31 +10,30 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_build" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (build script helpers)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.anyhow] - version = "1" - - [dependencies.camino] - version = "1.0.8" - - [dependencies.uniffi_bindgen] --version = "=0.21.0" -+version = "=0.21.1" - optional = true - - [features] - builtin-bindgen = ["uniffi_bindgen"] - default = [] -diff --git a/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json -@@ -0,0 +1 @@ -+{"files":{"Cargo.toml":"2ab3c60724c4c504297f8876bf0a8d1291f76a2fc46f5e83634aa147e89ffc71","src/lib.rs":"c68c69a1cf6a69e5fe78f7b069364a265c5bb6ce8c0abf0b5745eca01c79604a"},"package":"78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_checksum_derive/Cargo.toml b/third_party/rust/uniffi_checksum_derive/Cargo.toml -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/Cargo.toml -@@ -0,0 +1,42 @@ -+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -+# -+# When uploading crates to the registry Cargo will automatically -+# "normalize" Cargo.toml files for maximal compatibility -+# with all versions of Cargo and also rewrite `path` dependencies -+# to registry (e.g., crates.io) dependencies. -+# -+# If you are reading this file be aware that the original Cargo.toml -+# will likely look very different (and much more reasonable). -+# See Cargo.toml.orig for the original contents. -+ -+[package] -+edition = "2021" -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+authors = ["Firefox Sync Team "] -+description = "a multi-language bindings generator for rust (checksum custom derive)" -+homepage = "https://mozilla.github.io/uniffi-rs" -+documentation = "https://mozilla.github.io/uniffi-rs" -+keywords = [ -+ "ffi", -+ "bindgen", -+] -+license = "MPL-2.0" -+repository = "https://github.com/mozilla/uniffi-rs" -+ -+[lib] -+proc-macro = true -+ -+[dependencies.quote] -+version = "1.0" -+ -+[dependencies.syn] -+version = "1.0" -+features = [ -+ "derive", -+ "parsing", -+] -+ -+[features] -+default = [] -+nightly = [] -diff --git a/third_party/rust/uniffi_checksum_derive/src/lib.rs b/third_party/rust/uniffi_checksum_derive/src/lib.rs -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/src/lib.rs -@@ -0,0 +1,134 @@ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+#![cfg_attr(feature = "nightly", feature(proc_macro_expand))] -+ -+//! Custom derive for uniffi_meta::Checksum -+ -+use proc_macro::TokenStream; -+use quote::{format_ident, quote}; -+use syn::{parse_macro_input, Attribute, Data, DeriveInput, Expr, ExprLit, Fields, Index, Lit}; -+ -+fn has_ignore_attribute(attrs: &[Attribute]) -> bool { -+ attrs.iter().any(|attr| { -+ if attr.path.is_ident("checksum_ignore") { -+ if !attr.tokens.is_empty() { -+ panic!("#[checksum_ignore] doesn't accept extra information"); -+ } -+ true -+ } else { -+ false -+ } -+ }) -+} -+ -+#[proc_macro_derive(Checksum, attributes(checksum_ignore))] -+pub fn checksum_derive(input: TokenStream) -> TokenStream { -+ let input: DeriveInput = parse_macro_input!(input); -+ -+ let name = input.ident; -+ -+ let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); -+ -+ let code = match input.data { -+ Data::Enum(enum_) -+ if enum_.variants.len() == 1 -+ && enum_ -+ .variants -+ .iter() -+ .all(|variant| matches!(variant.fields, Fields::Unit)) => -+ { -+ quote!() -+ } -+ Data::Enum(enum_) => { -+ let mut next_discriminant = 0u64; -+ let match_inner = enum_.variants.iter().map(|variant| { -+ let ident = &variant.ident; -+ if has_ignore_attribute(&variant.attrs) { -+ panic!("#[checksum_ignore] is not supported in enums"); -+ } -+ match &variant.discriminant { -+ Some((_, Expr::Lit(ExprLit { lit: Lit::Int(value), .. }))) => { -+ next_discriminant = value.base10_parse::().unwrap(); -+ } -+ Some(_) => { -+ panic!("#[derive(Checksum)] doesn't support non-numeric explicit discriminants in enums"); -+ } -+ None => {} -+ } -+ let discriminant = quote! { state.write(&#next_discriminant.to_le_bytes()) }; -+ next_discriminant += 1; -+ match &variant.fields { -+ Fields::Unnamed(fields) => { -+ let field_idents = fields -+ .unnamed -+ .iter() -+ .enumerate() -+ .map(|(num, _)| format_ident!("__self_{}", num)); -+ let field_stmts = field_idents -+ .clone() -+ .map(|ident| quote! { Checksum::checksum(#ident, state); }); -+ quote! { -+ Self::#ident(#(#field_idents,)*) => { -+ #discriminant; -+ #(#field_stmts)* -+ } -+ } -+ } -+ Fields::Named(fields) => { -+ let field_idents = fields -+ .named -+ .iter() -+ .map(|field| field.ident.as_ref().unwrap()); -+ let field_stmts = field_idents -+ .clone() -+ .map(|ident| quote! { Checksum::checksum(#ident, state); }); -+ quote! { -+ Self::#ident { #(#field_idents,)* } => { -+ #discriminant; -+ #(#field_stmts)* -+ } -+ } -+ } -+ Fields::Unit => quote! { Self::#ident => #discriminant, }, -+ } -+ }); -+ quote! { -+ match self { -+ #(#match_inner)* -+ } -+ } -+ } -+ Data::Struct(struct_) => { -+ let stmts = struct_ -+ .fields -+ .iter() -+ .enumerate() -+ .filter_map(|(num, field)| { -+ (!has_ignore_attribute(&field.attrs)).then(|| match field.ident.as_ref() { -+ Some(ident) => quote! { Checksum::checksum(&self.#ident, state); }, -+ None => { -+ let i = Index::from(num); -+ quote! { Checksum::checksum(&self.#i, state); } -+ } -+ }) -+ }); -+ quote! { -+ #(#stmts)* -+ } -+ } -+ Data::Union(_) => { -+ panic!("#[derive(Checksum)] is not supported for unions"); -+ } -+ }; -+ -+ quote! { -+ #[automatically_derived] -+ impl #impl_generics Checksum for #name #ty_generics #where_clause { -+ fn checksum<__H: ::core::hash::Hasher>(&self, state: &mut __H) { -+ #code -+ } -+ } -+ } -+ .into() -+} -diff --git a/third_party/rust/uniffi_macros/.cargo-checksum.json b/third_party/rust/uniffi_macros/.cargo-checksum.json ---- a/third_party/rust/uniffi_macros/.cargo-checksum.json -+++ b/third_party/rust/uniffi_macros/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"55f7e114dd34b0c60b58890120f8707601a5401e9d49d42a239b03da2e660d4f","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10"} -\ No newline at end of file -+{"files":{"Cargo.toml":"6511b493b676ac3941d70477c91abec62642c3c9aab088ecdf4f733eef3f1faa","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_macros/Cargo.toml b/third_party/rust/uniffi_macros/Cargo.toml ---- a/third_party/rust/uniffi_macros/Cargo.toml -+++ b/third_party/rust/uniffi_macros/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_macros" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (convenience macros)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [lib] - proc-macro = true - - [dependencies.bincode] -@@ -58,14 +57,14 @@ - - [dependencies.toml] - version = "0.5.9" - - [dependencies.uniffi_build] --version = "=0.21.0" -+version = "=0.21.1" - - [dependencies.uniffi_meta] --version = "=0.21.0" -+version = "=0.21.1" - - [features] - builtin-bindgen = ["uniffi_build/builtin-bindgen"] - default = [] - nightly = [] -diff --git a/third_party/rust/uniffi_meta/.cargo-checksum.json b/third_party/rust/uniffi_meta/.cargo-checksum.json ---- a/third_party/rust/uniffi_meta/.cargo-checksum.json -+++ b/third_party/rust/uniffi_meta/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"4a474782b3acac7e99435c0cfc6cd4790817ee5c15980b10dc927d95795b977f","src/lib.rs":"dc4c91763c01e8c09ef55cdb103bc02c7aba71c5660ba88f776a8a03a747d6e8"},"package":"cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57"} -\ No newline at end of file -+{"files":{"Cargo.toml":"4c34032ec5fadf8b996c671425d5afa38e0e5c223ab0b2ed3b44099fb78157d3","src/lib.rs":"a9854421f120e1c4a9d7d36bb006a4c5e7d2e054564f95aa9b6956e7ebb348fd"},"package":"729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_meta/Cargo.toml b/third_party/rust/uniffi_meta/Cargo.toml ---- a/third_party/rust/uniffi_meta/Cargo.toml -+++ b/third_party/rust/uniffi_meta/Cargo.toml -@@ -10,19 +10,24 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_meta" --version = "0.21.0" -+version = "0.21.1" - description = "uniffi_meta" - homepage = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.serde] - version = "1.0.136" - features = ["derive"] -+ -+[dependencies.siphasher] -+version = "0.3" -+ -+[dependencies.uniffi_checksum_derive] -+version = "0.21.0" -diff --git a/third_party/rust/uniffi_meta/src/lib.rs b/third_party/rust/uniffi_meta/src/lib.rs ---- a/third_party/rust/uniffi_meta/src/lib.rs -+++ b/third_party/rust/uniffi_meta/src/lib.rs -@@ -1,17 +1,87 @@ - /* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - --use std::{ -- collections::hash_map::DefaultHasher, -- hash::{Hash, Hasher}, --}; -+use std::hash::Hasher; -+pub use uniffi_checksum_derive::Checksum; - - use serde::{Deserialize, Serialize}; - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+/// Similar to std::hash::Hash. -+/// -+/// Implementations of this trait are expected to update the hasher state in -+/// the same way across platforms. #[derive(Checksum)] will do the right thing. -+pub trait Checksum { -+ fn checksum(&self, state: &mut H); -+} -+ -+impl Checksum for bool { -+ fn checksum(&self, state: &mut H) { -+ state.write_u8(*self as u8); -+ } -+} -+ -+impl Checksum for u64 { -+ fn checksum(&self, state: &mut H) { -+ state.write(&self.to_le_bytes()); -+ } -+} -+ -+impl Checksum for i64 { -+ fn checksum(&self, state: &mut H) { -+ state.write(&self.to_le_bytes()); -+ } -+} -+ -+impl Checksum for Box { -+ fn checksum(&self, state: &mut H) { -+ (**self).checksum(state) -+ } -+} -+ -+impl Checksum for [T] { -+ fn checksum(&self, state: &mut H) { -+ state.write(&(self.len() as u64).to_le_bytes()); -+ for item in self { -+ Checksum::checksum(item, state); -+ } -+ } -+} -+ -+impl Checksum for Vec { -+ fn checksum(&self, state: &mut H) { -+ Checksum::checksum(&**self, state); -+ } -+} -+ -+impl Checksum for Option { -+ fn checksum(&self, state: &mut H) { -+ match self { -+ None => state.write(&0u64.to_le_bytes()), -+ Some(value) => { -+ state.write(&1u64.to_le_bytes()); -+ Checksum::checksum(value, state) -+ } -+ } -+ } -+} -+ -+impl Checksum for str { -+ fn checksum(&self, state: &mut H) { -+ state.write(self.as_bytes()); -+ state.write_u8(0xff); -+ } -+} -+ -+impl Checksum for String { -+ fn checksum(&self, state: &mut H) { -+ (**self).checksum(state) -+ } -+} -+ -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FnMetadata { - pub module_path: Vec, - pub name: String, - pub inputs: Vec, - pub return_type: Option, -@@ -21,11 +91,11 @@ - pub fn ffi_symbol_name(&self) -> String { - fn_ffi_symbol_name(&self.module_path, &self.name, checksum(self)) - } - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct MethodMetadata { - pub module_path: Vec, - pub self_name: String, - pub name: String, - pub inputs: Vec, -@@ -37,18 +107,18 @@ - let full_name = format!("impl_{}_{}", self.self_name, self.name); - fn_ffi_symbol_name(&self.module_path, &full_name, checksum(self)) - } - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FnParamMetadata { - pub name: String, - #[serde(rename = "type")] - pub ty: Type, - } - --#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Checksum, Deserialize, Serialize)] - pub enum Type { - U8, - U16, - U32, - U64, -@@ -76,25 +146,25 @@ - Unresolved { - name: String, - }, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct RecordMetadata { - pub module_path: Vec, - pub name: String, - pub fields: Vec, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FieldMetadata { - pub name: String, - #[serde(rename = "type")] - pub ty: Type, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct ObjectMetadata { - pub module_path: Vec, - pub name: String, - } - -@@ -106,27 +176,27 @@ - let free_name = format!("object_free_{}", self.name); - fn_ffi_symbol_name(&self.module_path, &free_name, checksum(self)) - } - } - --/// Returns the last 16 bits of the value's hash as computed with [`DefaultHasher`]. -+/// Returns the last 16 bits of the value's hash as computed with [`SipHasher13`]. - /// - /// To be used as a checksum of FFI symbols, as a safeguard against different UniFFI versions being - /// used for scaffolding and bindings generation. --pub fn checksum(val: &T) -> u16 { -- let mut hasher = DefaultHasher::new(); -- val.hash(&mut hasher); -+pub fn checksum(val: &T) -> u16 { -+ let mut hasher = siphasher::sip::SipHasher13::new(); -+ val.checksum(&mut hasher); - (hasher.finish() & 0x000000000000FFFF) as u16 - } - - pub fn fn_ffi_symbol_name(mod_path: &[String], name: &str, checksum: u16) -> String { - let mod_path = mod_path.join("__"); - format!("_uniffi_{mod_path}_{name}_{checksum:x}") - } - - /// Enum covering all the possible metadata types --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub enum Metadata { - Func(FnMetadata), - Method(MethodMetadata), - Record(RecordMetadata), - Object(ObjectMetadata), - diff --git a/firefox.spec b/firefox.spec index af584c6..fb86584 100644 --- a/firefox.spec +++ b/firefox.spec @@ -172,13 +172,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 108.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 109.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20221218.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230111.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -225,7 +225,6 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch -Patch79: D163310.diff # Test patches # Generate without context by @@ -250,10 +249,6 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch -Patch416: D163696.diff -Patch417: D163697.diff -Patch418: D163698.diff -Patch419: D164896.diff # PGO/LTO patches Patch600: pgo.patch @@ -506,7 +501,6 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 -%patch79 -p1 -b .D163310 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -529,10 +523,6 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 -%patch416 -p1 -b .D163696 -%patch417 -p1 -b .D163697 -%patch418 -p1 -b .D163698 -%patch419 -p1 -b .D164896 # PGO patches %if %{build_with_pgo} @@ -1086,6 +1076,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 11 2023 Martin Stransky - 109.0-1 +- Update to 109.0 + * Mon Jan 09 2023 Kalev Lember - 108.0.1-4 - Drop conditionals for F35 diff --git a/libwebrtc-screen-cast-sync.patch b/libwebrtc-screen-cast-sync.patch index ede3aec..5631b26 100644 --- a/libwebrtc-screen-cast-sync.patch +++ b/libwebrtc-screen-cast-sync.patch @@ -1,1230 +1,18 @@ -diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build -index ddf9321b58ea..af0f7ab64cc3 100644 ---- a/dom/media/webrtc/moz.build -+++ b/dom/media/webrtc/moz.build +diff -up firefox-109.0/dom/media/webrtc/moz.build.libwebrtc-screen-cast-sync firefox-109.0/dom/media/webrtc/moz.build +--- firefox-109.0/dom/media/webrtc/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:10.000000000 +0100 ++++ firefox-109.0/dom/media/webrtc/moz.build 2023-01-12 15:16:09.192614055 +0100 @@ -84,6 +84,8 @@ if CONFIG["MOZ_WEBRTC_SIGNALING"]: ] - + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + DIRS += ["/third_party/drm/libdrm"] + DIRS += ["/third_party/gbm/libgbm"] DIRS += ["/third_party/pipewire/libpipewire"] - + # Avoid warnings from third-party code that we can not modify. -diff --git a/third_party/drm/README b/third_party/drm/README -new file mode 100644 -index 000000000000..f68ed100bb77 ---- /dev/null -+++ b/third_party/drm/README -@@ -0,0 +1,4 @@ -+Libdrm is a drm library wrapper needed to build and run Firefox with -+Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/drm). -+ -+libdrm directory stores headers of libdrm needed for build only. -diff --git a/third_party/drm/drm/drm.h b/third_party/drm/drm/drm.h -new file mode 100644 -index 000000000000..5e54c3aa4c3a ---- /dev/null -+++ b/third_party/drm/drm/drm.h -@@ -0,0 +1,1193 @@ -+/* -+ * Header for the Direct Rendering Manager -+ * -+ * Author: Rickard E. (Rik) Faith -+ * -+ * Acknowledgments: -+ * Dec 1999, Richard Henderson , move to generic cmpxchg. -+ */ -+ -+/* -+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. -+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. -+ * All rights reserved. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef _DRM_H_ -+#define _DRM_H_ -+ -+#if defined(__linux__) -+ -+#include -+#include -+typedef unsigned int drm_handle_t; -+ -+#else /* One of the BSDs */ -+ -+#include -+#include -+#include -+typedef int8_t __s8; -+typedef uint8_t __u8; -+typedef int16_t __s16; -+typedef uint16_t __u16; -+typedef int32_t __s32; -+typedef uint32_t __u32; -+typedef int64_t __s64; -+typedef uint64_t __u64; -+typedef size_t __kernel_size_t; -+typedef unsigned long drm_handle_t; -+ -+#endif -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ -+#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ -+#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ -+#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */ -+ -+#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */ -+#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */ -+#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD) -+#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) -+#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) -+ -+typedef unsigned int drm_context_t; -+typedef unsigned int drm_drawable_t; -+typedef unsigned int drm_magic_t; -+ -+/* -+ * Cliprect. -+ * -+ * \warning: If you change this structure, make sure you change -+ * XF86DRIClipRectRec in the server as well -+ * -+ * \note KW: Actually it's illegal to change either for -+ * backwards-compatibility reasons. -+ */ -+struct drm_clip_rect { -+ unsigned short x1; -+ unsigned short y1; -+ unsigned short x2; -+ unsigned short y2; -+}; -+ -+/* -+ * Drawable information. -+ */ -+struct drm_drawable_info { -+ unsigned int num_rects; -+ struct drm_clip_rect *rects; -+}; -+ -+/* -+ * Texture region, -+ */ -+struct drm_tex_region { -+ unsigned char next; -+ unsigned char prev; -+ unsigned char in_use; -+ unsigned char padding; -+ unsigned int age; -+}; -+ -+/* -+ * Hardware lock. -+ * -+ * The lock structure is a simple cache-line aligned integer. To avoid -+ * processor bus contention on a multiprocessor system, there should not be any -+ * other data stored in the same cache line. -+ */ -+struct drm_hw_lock { -+ __volatile__ unsigned int lock; /**< lock variable */ -+ char padding[60]; /**< Pad to cache line */ -+}; -+ -+/* -+ * DRM_IOCTL_VERSION ioctl argument type. -+ * -+ * \sa drmGetVersion(). -+ */ -+struct drm_version { -+ int version_major; /**< Major version */ -+ int version_minor; /**< Minor version */ -+ int version_patchlevel; /**< Patch level */ -+ __kernel_size_t name_len; /**< Length of name buffer */ -+ char *name; /**< Name of driver */ -+ __kernel_size_t date_len; /**< Length of date buffer */ -+ char *date; /**< User-space buffer to hold date */ -+ __kernel_size_t desc_len; /**< Length of desc buffer */ -+ char *desc; /**< User-space buffer to hold desc */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_UNIQUE ioctl argument type. -+ * -+ * \sa drmGetBusid() and drmSetBusId(). -+ */ -+struct drm_unique { -+ __kernel_size_t unique_len; /**< Length of unique */ -+ char *unique; /**< Unique name for driver instantiation */ -+}; -+ -+struct drm_list { -+ int count; /**< Length of user-space structures */ -+ struct drm_version *version; -+}; -+ -+struct drm_block { -+ int unused; -+}; -+ -+/* -+ * DRM_IOCTL_CONTROL ioctl argument type. -+ * -+ * \sa drmCtlInstHandler() and drmCtlUninstHandler(). -+ */ -+struct drm_control { -+ enum { -+ DRM_ADD_COMMAND, -+ DRM_RM_COMMAND, -+ DRM_INST_HANDLER, -+ DRM_UNINST_HANDLER -+ } func; -+ int irq; -+}; -+ -+/* -+ * Type of memory to map. -+ */ -+enum drm_map_type { -+ _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ -+ _DRM_REGISTERS = 1, /**< no caching, no core dump */ -+ _DRM_SHM = 2, /**< shared, cached */ -+ _DRM_AGP = 3, /**< AGP/GART */ -+ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ -+ _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ -+}; -+ -+/* -+ * Memory mapping flags. -+ */ -+enum drm_map_flags { -+ _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ -+ _DRM_READ_ONLY = 0x02, -+ _DRM_LOCKED = 0x04, /**< shared, cached, locked */ -+ _DRM_KERNEL = 0x08, /**< kernel requires access */ -+ _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ -+ _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ -+ _DRM_REMOVABLE = 0x40, /**< Removable mapping */ -+ _DRM_DRIVER = 0x80 /**< Managed by driver */ -+}; -+ -+struct drm_ctx_priv_map { -+ unsigned int ctx_id; /**< Context requesting private mapping */ -+ void *handle; /**< Handle of map */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls -+ * argument type. -+ * -+ * \sa drmAddMap(). -+ */ -+struct drm_map { -+ unsigned long offset; /**< Requested physical address (0 for SAREA)*/ -+ unsigned long size; /**< Requested physical size (bytes) */ -+ enum drm_map_type type; /**< Type of memory to map */ -+ enum drm_map_flags flags; /**< Flags */ -+ void *handle; /**< User-space: "Handle" to pass to mmap() */ -+ /**< Kernel-space: kernel-virtual address */ -+ int mtrr; /**< MTRR slot used */ -+ /* Private data */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_CLIENT ioctl argument type. -+ */ -+struct drm_client { -+ int idx; /**< Which client desired? */ -+ int auth; /**< Is client authenticated? */ -+ unsigned long pid; /**< Process ID */ -+ unsigned long uid; /**< User ID */ -+ unsigned long magic; /**< Magic */ -+ unsigned long iocs; /**< Ioctl count */ -+}; -+ -+enum drm_stat_type { -+ _DRM_STAT_LOCK, -+ _DRM_STAT_OPENS, -+ _DRM_STAT_CLOSES, -+ _DRM_STAT_IOCTLS, -+ _DRM_STAT_LOCKS, -+ _DRM_STAT_UNLOCKS, -+ _DRM_STAT_VALUE, /**< Generic value */ -+ _DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */ -+ _DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */ -+ -+ _DRM_STAT_IRQ, /**< IRQ */ -+ _DRM_STAT_PRIMARY, /**< Primary DMA bytes */ -+ _DRM_STAT_SECONDARY, /**< Secondary DMA bytes */ -+ _DRM_STAT_DMA, /**< DMA */ -+ _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ -+ _DRM_STAT_MISSED /**< Missed DMA opportunity */ -+ /* Add to the *END* of the list */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_STATS ioctl argument type. -+ */ -+struct drm_stats { -+ unsigned long count; -+ struct { -+ unsigned long value; -+ enum drm_stat_type type; -+ } data[15]; -+}; -+ -+/* -+ * Hardware locking flags. -+ */ -+enum drm_lock_flags { -+ _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ -+ _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ -+ _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ -+ _DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */ -+ /* These *HALT* flags aren't supported yet -+ -- they will be used to support the -+ full-screen DGA-like mode. */ -+ _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ -+ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ -+}; -+ -+/* -+ * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. -+ * -+ * \sa drmGetLock() and drmUnlock(). -+ */ -+struct drm_lock { -+ int context; -+ enum drm_lock_flags flags; -+}; -+ -+/* -+ * DMA flags -+ * -+ * \warning -+ * These values \e must match xf86drm.h. -+ * -+ * \sa drm_dma. -+ */ -+enum drm_dma_flags { -+ /* Flags for DMA buffer dispatch */ -+ _DRM_DMA_BLOCK = 0x01, /**< -+ * Block until buffer dispatched. -+ * -+ * \note The buffer may not yet have -+ * been processed by the hardware -- -+ * getting a hardware lock with the -+ * hardware quiescent will ensure -+ * that the buffer has been -+ * processed. -+ */ -+ _DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */ -+ _DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */ -+ -+ /* Flags for DMA buffer request */ -+ _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ -+ _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ -+ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ -+}; -+ -+/* -+ * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. -+ * -+ * \sa drmAddBufs(). -+ */ -+struct drm_buf_desc { -+ int count; /**< Number of buffers of this size */ -+ int size; /**< Size in bytes */ -+ int low_mark; /**< Low water mark */ -+ int high_mark; /**< High water mark */ -+ enum { -+ _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ -+ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ -+ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ -+ _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ -+ _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ -+ } flags; -+ unsigned long agp_start; /**< -+ * Start address of where the AGP buffers are -+ * in the AGP aperture -+ */ -+}; -+ -+/* -+ * DRM_IOCTL_INFO_BUFS ioctl argument type. -+ */ -+struct drm_buf_info { -+ int count; /**< Entries in list */ -+ struct drm_buf_desc *list; -+}; -+ -+/* -+ * DRM_IOCTL_FREE_BUFS ioctl argument type. -+ */ -+struct drm_buf_free { -+ int count; -+ int *list; -+}; -+ -+/* -+ * Buffer information -+ * -+ * \sa drm_buf_map. -+ */ -+struct drm_buf_pub { -+ int idx; /**< Index into the master buffer list */ -+ int total; /**< Buffer size */ -+ int used; /**< Amount of buffer in use (for DMA) */ -+ void *address; /**< Address of buffer */ -+}; -+ -+/* -+ * DRM_IOCTL_MAP_BUFS ioctl argument type. -+ */ -+struct drm_buf_map { -+ int count; /**< Length of the buffer list */ -+#ifdef __cplusplus -+ void *virt; -+#else -+ void *virtual; /**< Mmap'd area in user-virtual */ -+#endif -+ struct drm_buf_pub *list; /**< Buffer information */ -+}; -+ -+/* -+ * DRM_IOCTL_DMA ioctl argument type. -+ * -+ * Indices here refer to the offset into the buffer list in drm_buf_get. -+ * -+ * \sa drmDMA(). -+ */ -+struct drm_dma { -+ int context; /**< Context handle */ -+ int send_count; /**< Number of buffers to send */ -+ int *send_indices; /**< List of handles to buffers */ -+ int *send_sizes; /**< Lengths of data to send */ -+ enum drm_dma_flags flags; /**< Flags */ -+ int request_count; /**< Number of buffers requested */ -+ int request_size; /**< Desired size for buffers */ -+ int *request_indices; /**< Buffer information */ -+ int *request_sizes; -+ int granted_count; /**< Number of buffers granted */ -+}; -+ -+enum drm_ctx_flags { -+ _DRM_CONTEXT_PRESERVED = 0x01, -+ _DRM_CONTEXT_2DONLY = 0x02 -+}; -+ -+/* -+ * DRM_IOCTL_ADD_CTX ioctl argument type. -+ * -+ * \sa drmCreateContext() and drmDestroyContext(). -+ */ -+struct drm_ctx { -+ drm_context_t handle; -+ enum drm_ctx_flags flags; -+}; -+ -+/* -+ * DRM_IOCTL_RES_CTX ioctl argument type. -+ */ -+struct drm_ctx_res { -+ int count; -+ struct drm_ctx *contexts; -+}; -+ -+/* -+ * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. -+ */ -+struct drm_draw { -+ drm_drawable_t handle; -+}; -+ -+/* -+ * DRM_IOCTL_UPDATE_DRAW ioctl argument type. -+ */ -+typedef enum { -+ DRM_DRAWABLE_CLIPRECTS -+} drm_drawable_info_type_t; -+ -+struct drm_update_draw { -+ drm_drawable_t handle; -+ unsigned int type; -+ unsigned int num; -+ unsigned long long data; -+}; -+ -+/* -+ * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. -+ */ -+struct drm_auth { -+ drm_magic_t magic; -+}; -+ -+/* -+ * DRM_IOCTL_IRQ_BUSID ioctl argument type. -+ * -+ * \sa drmGetInterruptFromBusID(). -+ */ -+struct drm_irq_busid { -+ int irq; /**< IRQ number */ -+ int busnum; /**< bus number */ -+ int devnum; /**< device number */ -+ int funcnum; /**< function number */ -+}; -+ -+enum drm_vblank_seq_type { -+ _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ -+ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ -+ /* bits 1-6 are reserved for high crtcs */ -+ _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, -+ _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ -+ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ -+ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ -+ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ -+ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ -+}; -+#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 -+ -+#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) -+#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ -+ _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS) -+ -+struct drm_wait_vblank_request { -+ enum drm_vblank_seq_type type; -+ unsigned int sequence; -+ unsigned long signal; -+}; -+ -+struct drm_wait_vblank_reply { -+ enum drm_vblank_seq_type type; -+ unsigned int sequence; -+ long tval_sec; -+ long tval_usec; -+}; -+ -+/* -+ * DRM_IOCTL_WAIT_VBLANK ioctl argument type. -+ * -+ * \sa drmWaitVBlank(). -+ */ -+union drm_wait_vblank { -+ struct drm_wait_vblank_request request; -+ struct drm_wait_vblank_reply reply; -+}; -+ -+#define _DRM_PRE_MODESET 1 -+#define _DRM_POST_MODESET 2 -+ -+/* -+ * DRM_IOCTL_MODESET_CTL ioctl argument type -+ * -+ * \sa drmModesetCtl(). -+ */ -+struct drm_modeset_ctl { -+ __u32 crtc; -+ __u32 cmd; -+}; -+ -+/* -+ * DRM_IOCTL_AGP_ENABLE ioctl argument type. -+ * -+ * \sa drmAgpEnable(). -+ */ -+struct drm_agp_mode { -+ unsigned long mode; /**< AGP mode */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. -+ * -+ * \sa drmAgpAlloc() and drmAgpFree(). -+ */ -+struct drm_agp_buffer { -+ unsigned long size; /**< In bytes -- will round to page boundary */ -+ unsigned long handle; /**< Used for binding / unbinding */ -+ unsigned long type; /**< Type of memory to allocate */ -+ unsigned long physical; /**< Physical used by i810 */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. -+ * -+ * \sa drmAgpBind() and drmAgpUnbind(). -+ */ -+struct drm_agp_binding { -+ unsigned long handle; /**< From drm_agp_buffer */ -+ unsigned long offset; /**< In bytes -- will round to page boundary */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_INFO ioctl argument type. -+ * -+ * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), -+ * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), -+ * drmAgpVendorId() and drmAgpDeviceId(). -+ */ -+struct drm_agp_info { -+ int agp_version_major; -+ int agp_version_minor; -+ unsigned long mode; -+ unsigned long aperture_base; /* physical address */ -+ unsigned long aperture_size; /* bytes */ -+ unsigned long memory_allowed; /* bytes */ -+ unsigned long memory_used; -+ -+ /* PCI information */ -+ unsigned short id_vendor; -+ unsigned short id_device; -+}; -+ -+/* -+ * DRM_IOCTL_SG_ALLOC ioctl argument type. -+ */ -+struct drm_scatter_gather { -+ unsigned long size; /**< In bytes -- will round to page boundary */ -+ unsigned long handle; /**< Used for mapping / unmapping */ -+}; -+ -+/* -+ * DRM_IOCTL_SET_VERSION ioctl argument type. -+ */ -+struct drm_set_version { -+ int drm_di_major; -+ int drm_di_minor; -+ int drm_dd_major; -+ int drm_dd_minor; -+}; -+ -+/* DRM_IOCTL_GEM_CLOSE ioctl argument type */ -+struct drm_gem_close { -+ /** Handle of the object to be closed. */ -+ __u32 handle; -+ __u32 pad; -+}; -+ -+/* DRM_IOCTL_GEM_FLINK ioctl argument type */ -+struct drm_gem_flink { -+ /** Handle for the object being named */ -+ __u32 handle; -+ -+ /** Returned global name */ -+ __u32 name; -+}; -+ -+/* DRM_IOCTL_GEM_OPEN ioctl argument type */ -+struct drm_gem_open { -+ /** Name of object being opened */ -+ __u32 name; -+ -+ /** Returned handle for the object */ -+ __u32 handle; -+ -+ /** Returned size of the object */ -+ __u64 size; -+}; -+ -+/** -+ * DRM_CAP_DUMB_BUFFER -+ * -+ * If set to 1, the driver supports creating dumb buffers via the -+ * &DRM_IOCTL_MODE_CREATE_DUMB ioctl. -+ */ -+#define DRM_CAP_DUMB_BUFFER 0x1 -+/** -+ * DRM_CAP_VBLANK_HIGH_CRTC -+ * -+ * If set to 1, the kernel supports specifying a :ref:`CRTC index` -+ * in the high bits of &drm_wait_vblank_request.type. -+ * -+ * Starting kernel version 2.6.39, this capability is always set to 1. -+ */ -+#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 -+/** -+ * DRM_CAP_DUMB_PREFERRED_DEPTH -+ * -+ * The preferred bit depth for dumb buffers. -+ * -+ * The bit depth is the number of bits used to indicate the color of a single -+ * pixel excluding any padding. This is different from the number of bits per -+ * pixel. For instance, XRGB8888 has a bit depth of 24 but has 32 bits per -+ * pixel. -+ * -+ * Note that this preference only applies to dumb buffers, it's irrelevant for -+ * other types of buffers. -+ */ -+#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 -+/** -+ * DRM_CAP_DUMB_PREFER_SHADOW -+ * -+ * If set to 1, the driver prefers userspace to render to a shadow buffer -+ * instead of directly rendering to a dumb buffer. For best speed, userspace -+ * should do streaming ordered memory copies into the dumb buffer and never -+ * read from it. -+ * -+ * Note that this preference only applies to dumb buffers, it's irrelevant for -+ * other types of buffers. -+ */ -+#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 -+/** -+ * DRM_CAP_PRIME -+ * -+ * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT -+ * and &DRM_PRIME_CAP_EXPORT. -+ * -+ * PRIME buffers are exposed as dma-buf file descriptors. See -+ * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing". -+ */ -+#define DRM_CAP_PRIME 0x5 -+/** -+ * DRM_PRIME_CAP_IMPORT -+ * -+ * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME -+ * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. -+ */ -+#define DRM_PRIME_CAP_IMPORT 0x1 -+/** -+ * DRM_PRIME_CAP_EXPORT -+ * -+ * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME -+ * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. -+ */ -+#define DRM_PRIME_CAP_EXPORT 0x2 -+/** -+ * DRM_CAP_TIMESTAMP_MONOTONIC -+ * -+ * If set to 0, the kernel will report timestamps with ``CLOCK_REALTIME`` in -+ * struct drm_event_vblank. If set to 1, the kernel will report timestamps with -+ * ``CLOCK_MONOTONIC``. See ``clock_gettime(2)`` for the definition of these -+ * clocks. -+ * -+ * Starting from kernel version 2.6.39, the default value for this capability -+ * is 1. Starting kernel version 4.15, this capability is always set to 1. -+ */ -+#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 -+/** -+ * DRM_CAP_ASYNC_PAGE_FLIP -+ * -+ * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC. -+ */ -+#define DRM_CAP_ASYNC_PAGE_FLIP 0x7 -+/** -+ * DRM_CAP_CURSOR_WIDTH -+ * -+ * The ``CURSOR_WIDTH`` and ``CURSOR_HEIGHT`` capabilities return a valid -+ * width x height combination for the hardware cursor. The intention is that a -+ * hardware agnostic userspace can query a cursor plane size to use. -+ * -+ * Note that the cross-driver contract is to merely return a valid size; -+ * drivers are free to attach another meaning on top, eg. i915 returns the -+ * maximum plane size. -+ */ -+#define DRM_CAP_CURSOR_WIDTH 0x8 -+/** -+ * DRM_CAP_CURSOR_HEIGHT -+ * -+ * See &DRM_CAP_CURSOR_WIDTH. -+ */ -+#define DRM_CAP_CURSOR_HEIGHT 0x9 -+/** -+ * DRM_CAP_ADDFB2_MODIFIERS -+ * -+ * If set to 1, the driver supports supplying modifiers in the -+ * &DRM_IOCTL_MODE_ADDFB2 ioctl. -+ */ -+#define DRM_CAP_ADDFB2_MODIFIERS 0x10 -+/** -+ * DRM_CAP_PAGE_FLIP_TARGET -+ * -+ * If set to 1, the driver supports the &DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE and -+ * &DRM_MODE_PAGE_FLIP_TARGET_RELATIVE flags in -+ * &drm_mode_crtc_page_flip_target.flags for the &DRM_IOCTL_MODE_PAGE_FLIP -+ * ioctl. -+ */ -+#define DRM_CAP_PAGE_FLIP_TARGET 0x11 -+/** -+ * DRM_CAP_CRTC_IN_VBLANK_EVENT -+ * -+ * If set to 1, the kernel supports reporting the CRTC ID in -+ * &drm_event_vblank.crtc_id for the &DRM_EVENT_VBLANK and -+ * &DRM_EVENT_FLIP_COMPLETE events. -+ * -+ * Starting kernel version 4.12, this capability is always set to 1. -+ */ -+#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 -+/** -+ * DRM_CAP_SYNCOBJ -+ * -+ * If set to 1, the driver supports sync objects. See -+ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". -+ */ -+#define DRM_CAP_SYNCOBJ 0x13 -+/** -+ * DRM_CAP_SYNCOBJ_TIMELINE -+ * -+ * If set to 1, the driver supports timeline operations on sync objects. See -+ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". -+ */ -+#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 -+ -+/* DRM_IOCTL_GET_CAP ioctl argument type */ -+struct drm_get_cap { -+ __u64 capability; -+ __u64 value; -+}; -+ -+/** -+ * DRM_CLIENT_CAP_STEREO_3D -+ * -+ * If set to 1, the DRM core will expose the stereo 3D capabilities of the -+ * monitor by advertising the supported 3D layouts in the flags of struct -+ * drm_mode_modeinfo. See ``DRM_MODE_FLAG_3D_*``. -+ * -+ * This capability is always supported for all drivers starting from kernel -+ * version 3.13. -+ */ -+#define DRM_CLIENT_CAP_STEREO_3D 1 -+ -+/** -+ * DRM_CLIENT_CAP_UNIVERSAL_PLANES -+ * -+ * If set to 1, the DRM core will expose all planes (overlay, primary, and -+ * cursor) to userspace. -+ * -+ * This capability has been introduced in kernel version 3.15. Starting from -+ * kernel version 3.17, this capability is always supported for all drivers. -+ */ -+#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 -+ -+/** -+ * DRM_CLIENT_CAP_ATOMIC -+ * -+ * If set to 1, the DRM core will expose atomic properties to userspace. This -+ * implicitly enables &DRM_CLIENT_CAP_UNIVERSAL_PLANES and -+ * &DRM_CLIENT_CAP_ASPECT_RATIO. -+ * -+ * If the driver doesn't support atomic mode-setting, enabling this capability -+ * will fail with -EOPNOTSUPP. -+ * -+ * This capability has been introduced in kernel version 4.0. Starting from -+ * kernel version 4.2, this capability is always supported for atomic-capable -+ * drivers. -+ */ -+#define DRM_CLIENT_CAP_ATOMIC 3 -+ -+/** -+ * DRM_CLIENT_CAP_ASPECT_RATIO -+ * -+ * If set to 1, the DRM core will provide aspect ratio information in modes. -+ * See ``DRM_MODE_FLAG_PIC_AR_*``. -+ * -+ * This capability is always supported for all drivers starting from kernel -+ * version 4.18. -+ */ -+#define DRM_CLIENT_CAP_ASPECT_RATIO 4 -+ -+/** -+ * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS -+ * -+ * If set to 1, the DRM core will expose special connectors to be used for -+ * writing back to memory the scene setup in the commit. The client must enable -+ * &DRM_CLIENT_CAP_ATOMIC first. -+ * -+ * This capability is always supported for atomic-capable drivers starting from -+ * kernel version 4.19. -+ */ -+#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 -+ -+/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ -+struct drm_set_client_cap { -+ __u64 capability; -+ __u64 value; -+}; -+ -+#define DRM_RDWR O_RDWR -+#define DRM_CLOEXEC O_CLOEXEC -+struct drm_prime_handle { -+ __u32 handle; -+ -+ /** Flags.. only applicable for handle->fd */ -+ __u32 flags; -+ -+ /** Returned dmabuf file descriptor */ -+ __s32 fd; -+}; -+ -+struct drm_syncobj_create { -+ __u32 handle; -+#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) -+ __u32 flags; -+}; -+ -+struct drm_syncobj_destroy { -+ __u32 handle; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) -+#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) -+struct drm_syncobj_handle { -+ __u32 handle; -+ __u32 flags; -+ -+ __s32 fd; -+ __u32 pad; -+}; -+ -+struct drm_syncobj_transfer { -+ __u32 src_handle; -+ __u32 dst_handle; -+ __u64 src_point; -+ __u64 dst_point; -+ __u32 flags; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ -+struct drm_syncobj_wait { -+ __u64 handles; -+ /* absolute timeout */ -+ __s64 timeout_nsec; -+ __u32 count_handles; -+ __u32 flags; -+ __u32 first_signaled; /* only valid when not waiting all */ -+ __u32 pad; -+}; -+ -+struct drm_syncobj_timeline_wait { -+ __u64 handles; -+ /* wait on specific timeline point for every handles*/ -+ __u64 points; -+ /* absolute timeout */ -+ __s64 timeout_nsec; -+ __u32 count_handles; -+ __u32 flags; -+ __u32 first_signaled; /* only valid when not waiting all */ -+ __u32 pad; -+}; -+ -+ -+struct drm_syncobj_array { -+ __u64 handles; -+ __u32 count_handles; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */ -+struct drm_syncobj_timeline_array { -+ __u64 handles; -+ __u64 points; -+ __u32 count_handles; -+ __u32 flags; -+}; -+ -+ -+/* Query current scanout sequence number */ -+struct drm_crtc_get_sequence { -+ __u32 crtc_id; /* requested crtc_id */ -+ __u32 active; /* return: crtc output is active */ -+ __u64 sequence; /* return: most recent vblank sequence */ -+ __s64 sequence_ns; /* return: most recent time of first pixel out */ -+}; -+ -+/* Queue event to be delivered at specified sequence. Time stamp marks -+ * when the first pixel of the refresh cycle leaves the display engine -+ * for the display -+ */ -+#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */ -+#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */ -+ -+struct drm_crtc_queue_sequence { -+ __u32 crtc_id; -+ __u32 flags; -+ __u64 sequence; /* on input, target sequence. on output, actual sequence */ -+ __u64 user_data; /* user data passed to event */ -+}; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#include "drm_mode.h" -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#define DRM_IOCTL_BASE 'd' -+#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) -+#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) -+#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type) -+#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type) -+ -+#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version) -+#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique) -+#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth) -+#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid) -+#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map) -+#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) -+#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) -+#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) -+#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) -+#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) -+#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) -+#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) -+#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) -+#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) -+ -+#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) -+#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) -+#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block) -+#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block) -+#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control) -+#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map) -+#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc) -+#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc) -+#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info) -+#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map) -+#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free) -+ -+#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map) -+ -+#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) -+#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) -+ -+#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) -+#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) -+ -+#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) -+#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) -+#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx) -+#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx) -+#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx) -+#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx) -+#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res) -+#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw) -+#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw) -+#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma) -+#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock) -+#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) -+#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) -+ -+#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) -+#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) -+ -+#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) -+#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) -+#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) -+#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info) -+#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer) -+#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer) -+#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding) -+#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding) -+ -+#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather) -+#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather) -+ -+#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) -+ -+#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) -+#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) -+ -+#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) -+ -+#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) -+#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) -+#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc) -+#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor) -+#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut) -+#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) -+#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) -+#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) -+#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */ -+#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */ -+ -+#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) -+#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) -+#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob) -+#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) -+#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) -+/** -+ * DRM_IOCTL_MODE_RMFB - Remove a framebuffer. -+ * -+ * This removes a framebuffer previously added via ADDFB/ADDFB2. The IOCTL -+ * argument is a framebuffer object ID. -+ * -+ * Warning: removing a framebuffer currently in-use on an enabled plane will -+ * disable that plane. The CRTC the plane is linked to may also be disabled -+ * (depending on driver capabilities). -+ */ -+#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) -+#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) -+#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) -+ -+#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) -+#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) -+#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) -+#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) -+#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) -+#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) -+#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) -+#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) -+#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) -+#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) -+#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) -+#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob) -+#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob) -+ -+#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create) -+#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) -+#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) -+#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) -+#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) -+#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) -+#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) -+ -+#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) -+#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) -+#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) -+#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) -+ -+#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) -+#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) -+#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) -+#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) -+ -+#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) -+ -+/* -+ * Device specific ioctls should only be in their respective headers -+ * The device specific ioctl range is from 0x40 to 0x9f. -+ * Generic IOCTLS restart at 0xA0. -+ * -+ * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and -+ * drmCommandReadWrite(). -+ */ -+#define DRM_COMMAND_BASE 0x40 -+#define DRM_COMMAND_END 0xA0 -+ -+/* -+ * Header for events written back to userspace on the drm fd. The -+ * type defines the type of event, the length specifies the total -+ * length of the event (including the header), and user_data is -+ * typically a 64 bit value passed with the ioctl that triggered the -+ * event. A read on the drm fd will always only return complete -+ * events, that is, if for example the read buffer is 100 bytes, and -+ * there are two 64 byte events pending, only one will be returned. -+ * -+ * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and -+ * up are chipset specific. -+ */ -+struct drm_event { -+ __u32 type; -+ __u32 length; -+}; -+ -+#define DRM_EVENT_VBLANK 0x01 -+#define DRM_EVENT_FLIP_COMPLETE 0x02 -+#define DRM_EVENT_CRTC_SEQUENCE 0x03 -+ -+struct drm_event_vblank { -+ struct drm_event base; -+ __u64 user_data; -+ __u32 tv_sec; -+ __u32 tv_usec; -+ __u32 sequence; -+ __u32 crtc_id; /* 0 on older kernels that do not support this */ -+}; -+ -+/* Event delivered at sequence. Time stamp marks when the first pixel -+ * of the refresh cycle leaves the display engine for the display -+ */ -+struct drm_event_crtc_sequence { -+ struct drm_event base; -+ __u64 user_data; -+ __s64 time_ns; -+ __u64 sequence; -+}; -+ -+/* typedef area */ -+typedef struct drm_clip_rect drm_clip_rect_t; -+typedef struct drm_drawable_info drm_drawable_info_t; -+typedef struct drm_tex_region drm_tex_region_t; -+typedef struct drm_hw_lock drm_hw_lock_t; -+typedef struct drm_version drm_version_t; -+typedef struct drm_unique drm_unique_t; -+typedef struct drm_list drm_list_t; -+typedef struct drm_block drm_block_t; -+typedef struct drm_control drm_control_t; -+typedef enum drm_map_type drm_map_type_t; -+typedef enum drm_map_flags drm_map_flags_t; -+typedef struct drm_ctx_priv_map drm_ctx_priv_map_t; -+typedef struct drm_map drm_map_t; -+typedef struct drm_client drm_client_t; -+typedef enum drm_stat_type drm_stat_type_t; -+typedef struct drm_stats drm_stats_t; -+typedef enum drm_lock_flags drm_lock_flags_t; -+typedef struct drm_lock drm_lock_t; -+typedef enum drm_dma_flags drm_dma_flags_t; -+typedef struct drm_buf_desc drm_buf_desc_t; -+typedef struct drm_buf_info drm_buf_info_t; -+typedef struct drm_buf_free drm_buf_free_t; -+typedef struct drm_buf_pub drm_buf_pub_t; -+typedef struct drm_buf_map drm_buf_map_t; -+typedef struct drm_dma drm_dma_t; -+typedef union drm_wait_vblank drm_wait_vblank_t; -+typedef struct drm_agp_mode drm_agp_mode_t; -+typedef enum drm_ctx_flags drm_ctx_flags_t; -+typedef struct drm_ctx drm_ctx_t; -+typedef struct drm_ctx_res drm_ctx_res_t; -+typedef struct drm_draw drm_draw_t; -+typedef struct drm_update_draw drm_update_draw_t; -+typedef struct drm_auth drm_auth_t; -+typedef struct drm_irq_busid drm_irq_busid_t; -+typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; -+ -+typedef struct drm_agp_buffer drm_agp_buffer_t; -+typedef struct drm_agp_binding drm_agp_binding_t; -+typedef struct drm_agp_info drm_agp_info_t; -+typedef struct drm_scatter_gather drm_scatter_gather_t; -+typedef struct drm_set_version drm_set_version_t; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif -diff --git a/third_party/drm/drm/drm_fourcc.h b/third_party/drm/drm/drm_fourcc.h -new file mode 100644 -index 000000000000..4ececa84baa6 ---- /dev/null -+++ b/third_party/drm/drm/drm_fourcc.h +diff -up firefox-109.0/third_party/drm/drm/drm_fourcc.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm_fourcc.h +--- firefox-109.0/third_party/drm/drm/drm_fourcc.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.193614089 +0100 ++++ firefox-109.0/third_party/drm/drm/drm_fourcc.h 2023-01-12 15:16:09.193614089 +0100 @@ -0,0 +1,1377 @@ +/* + * Copyright 2011 Intel Corporation @@ -2603,11 +1391,1206 @@ index 000000000000..4ececa84baa6 +#endif + +#endif /* DRM_FOURCC_H */ -diff --git a/third_party/drm/drm/drm_mode.h b/third_party/drm/drm/drm_mode.h -new file mode 100644 -index 000000000000..e1e351682872 ---- /dev/null -+++ b/third_party/drm/drm/drm_mode.h +diff -up firefox-109.0/third_party/drm/drm/drm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm.h +--- firefox-109.0/third_party/drm/drm/drm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.193614089 +0100 ++++ firefox-109.0/third_party/drm/drm/drm.h 2023-01-12 15:16:09.193614089 +0100 +@@ -0,0 +1,1193 @@ ++/* ++ * Header for the Direct Rendering Manager ++ * ++ * Author: Rickard E. (Rik) Faith ++ * ++ * Acknowledgments: ++ * Dec 1999, Richard Henderson , move to generic cmpxchg. ++ */ ++ ++/* ++ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. ++ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. ++ * All rights reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef _DRM_H_ ++#define _DRM_H_ ++ ++#if defined(__linux__) ++ ++#include ++#include ++typedef unsigned int drm_handle_t; ++ ++#else /* One of the BSDs */ ++ ++#include ++#include ++#include ++typedef int8_t __s8; ++typedef uint8_t __u8; ++typedef int16_t __s16; ++typedef uint16_t __u16; ++typedef int32_t __s32; ++typedef uint32_t __u32; ++typedef int64_t __s64; ++typedef uint64_t __u64; ++typedef size_t __kernel_size_t; ++typedef unsigned long drm_handle_t; ++ ++#endif ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ ++#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ ++#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ ++#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */ ++ ++#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */ ++#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */ ++#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD) ++#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) ++#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) ++ ++typedef unsigned int drm_context_t; ++typedef unsigned int drm_drawable_t; ++typedef unsigned int drm_magic_t; ++ ++/* ++ * Cliprect. ++ * ++ * \warning: If you change this structure, make sure you change ++ * XF86DRIClipRectRec in the server as well ++ * ++ * \note KW: Actually it's illegal to change either for ++ * backwards-compatibility reasons. ++ */ ++struct drm_clip_rect { ++ unsigned short x1; ++ unsigned short y1; ++ unsigned short x2; ++ unsigned short y2; ++}; ++ ++/* ++ * Drawable information. ++ */ ++struct drm_drawable_info { ++ unsigned int num_rects; ++ struct drm_clip_rect *rects; ++}; ++ ++/* ++ * Texture region, ++ */ ++struct drm_tex_region { ++ unsigned char next; ++ unsigned char prev; ++ unsigned char in_use; ++ unsigned char padding; ++ unsigned int age; ++}; ++ ++/* ++ * Hardware lock. ++ * ++ * The lock structure is a simple cache-line aligned integer. To avoid ++ * processor bus contention on a multiprocessor system, there should not be any ++ * other data stored in the same cache line. ++ */ ++struct drm_hw_lock { ++ __volatile__ unsigned int lock; /**< lock variable */ ++ char padding[60]; /**< Pad to cache line */ ++}; ++ ++/* ++ * DRM_IOCTL_VERSION ioctl argument type. ++ * ++ * \sa drmGetVersion(). ++ */ ++struct drm_version { ++ int version_major; /**< Major version */ ++ int version_minor; /**< Minor version */ ++ int version_patchlevel; /**< Patch level */ ++ __kernel_size_t name_len; /**< Length of name buffer */ ++ char *name; /**< Name of driver */ ++ __kernel_size_t date_len; /**< Length of date buffer */ ++ char *date; /**< User-space buffer to hold date */ ++ __kernel_size_t desc_len; /**< Length of desc buffer */ ++ char *desc; /**< User-space buffer to hold desc */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_UNIQUE ioctl argument type. ++ * ++ * \sa drmGetBusid() and drmSetBusId(). ++ */ ++struct drm_unique { ++ __kernel_size_t unique_len; /**< Length of unique */ ++ char *unique; /**< Unique name for driver instantiation */ ++}; ++ ++struct drm_list { ++ int count; /**< Length of user-space structures */ ++ struct drm_version *version; ++}; ++ ++struct drm_block { ++ int unused; ++}; ++ ++/* ++ * DRM_IOCTL_CONTROL ioctl argument type. ++ * ++ * \sa drmCtlInstHandler() and drmCtlUninstHandler(). ++ */ ++struct drm_control { ++ enum { ++ DRM_ADD_COMMAND, ++ DRM_RM_COMMAND, ++ DRM_INST_HANDLER, ++ DRM_UNINST_HANDLER ++ } func; ++ int irq; ++}; ++ ++/* ++ * Type of memory to map. ++ */ ++enum drm_map_type { ++ _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ ++ _DRM_REGISTERS = 1, /**< no caching, no core dump */ ++ _DRM_SHM = 2, /**< shared, cached */ ++ _DRM_AGP = 3, /**< AGP/GART */ ++ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ ++ _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ ++}; ++ ++/* ++ * Memory mapping flags. ++ */ ++enum drm_map_flags { ++ _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ ++ _DRM_READ_ONLY = 0x02, ++ _DRM_LOCKED = 0x04, /**< shared, cached, locked */ ++ _DRM_KERNEL = 0x08, /**< kernel requires access */ ++ _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ ++ _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ ++ _DRM_REMOVABLE = 0x40, /**< Removable mapping */ ++ _DRM_DRIVER = 0x80 /**< Managed by driver */ ++}; ++ ++struct drm_ctx_priv_map { ++ unsigned int ctx_id; /**< Context requesting private mapping */ ++ void *handle; /**< Handle of map */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls ++ * argument type. ++ * ++ * \sa drmAddMap(). ++ */ ++struct drm_map { ++ unsigned long offset; /**< Requested physical address (0 for SAREA)*/ ++ unsigned long size; /**< Requested physical size (bytes) */ ++ enum drm_map_type type; /**< Type of memory to map */ ++ enum drm_map_flags flags; /**< Flags */ ++ void *handle; /**< User-space: "Handle" to pass to mmap() */ ++ /**< Kernel-space: kernel-virtual address */ ++ int mtrr; /**< MTRR slot used */ ++ /* Private data */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_CLIENT ioctl argument type. ++ */ ++struct drm_client { ++ int idx; /**< Which client desired? */ ++ int auth; /**< Is client authenticated? */ ++ unsigned long pid; /**< Process ID */ ++ unsigned long uid; /**< User ID */ ++ unsigned long magic; /**< Magic */ ++ unsigned long iocs; /**< Ioctl count */ ++}; ++ ++enum drm_stat_type { ++ _DRM_STAT_LOCK, ++ _DRM_STAT_OPENS, ++ _DRM_STAT_CLOSES, ++ _DRM_STAT_IOCTLS, ++ _DRM_STAT_LOCKS, ++ _DRM_STAT_UNLOCKS, ++ _DRM_STAT_VALUE, /**< Generic value */ ++ _DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */ ++ _DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */ ++ ++ _DRM_STAT_IRQ, /**< IRQ */ ++ _DRM_STAT_PRIMARY, /**< Primary DMA bytes */ ++ _DRM_STAT_SECONDARY, /**< Secondary DMA bytes */ ++ _DRM_STAT_DMA, /**< DMA */ ++ _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ ++ _DRM_STAT_MISSED /**< Missed DMA opportunity */ ++ /* Add to the *END* of the list */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_STATS ioctl argument type. ++ */ ++struct drm_stats { ++ unsigned long count; ++ struct { ++ unsigned long value; ++ enum drm_stat_type type; ++ } data[15]; ++}; ++ ++/* ++ * Hardware locking flags. ++ */ ++enum drm_lock_flags { ++ _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ ++ _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ ++ _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ ++ _DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */ ++ /* These *HALT* flags aren't supported yet ++ -- they will be used to support the ++ full-screen DGA-like mode. */ ++ _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ ++ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ ++}; ++ ++/* ++ * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. ++ * ++ * \sa drmGetLock() and drmUnlock(). ++ */ ++struct drm_lock { ++ int context; ++ enum drm_lock_flags flags; ++}; ++ ++/* ++ * DMA flags ++ * ++ * \warning ++ * These values \e must match xf86drm.h. ++ * ++ * \sa drm_dma. ++ */ ++enum drm_dma_flags { ++ /* Flags for DMA buffer dispatch */ ++ _DRM_DMA_BLOCK = 0x01, /**< ++ * Block until buffer dispatched. ++ * ++ * \note The buffer may not yet have ++ * been processed by the hardware -- ++ * getting a hardware lock with the ++ * hardware quiescent will ensure ++ * that the buffer has been ++ * processed. ++ */ ++ _DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */ ++ _DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */ ++ ++ /* Flags for DMA buffer request */ ++ _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ ++ _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ ++ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ ++}; ++ ++/* ++ * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. ++ * ++ * \sa drmAddBufs(). ++ */ ++struct drm_buf_desc { ++ int count; /**< Number of buffers of this size */ ++ int size; /**< Size in bytes */ ++ int low_mark; /**< Low water mark */ ++ int high_mark; /**< High water mark */ ++ enum { ++ _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ ++ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ ++ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ ++ _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ ++ _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ ++ } flags; ++ unsigned long agp_start; /**< ++ * Start address of where the AGP buffers are ++ * in the AGP aperture ++ */ ++}; ++ ++/* ++ * DRM_IOCTL_INFO_BUFS ioctl argument type. ++ */ ++struct drm_buf_info { ++ int count; /**< Entries in list */ ++ struct drm_buf_desc *list; ++}; ++ ++/* ++ * DRM_IOCTL_FREE_BUFS ioctl argument type. ++ */ ++struct drm_buf_free { ++ int count; ++ int *list; ++}; ++ ++/* ++ * Buffer information ++ * ++ * \sa drm_buf_map. ++ */ ++struct drm_buf_pub { ++ int idx; /**< Index into the master buffer list */ ++ int total; /**< Buffer size */ ++ int used; /**< Amount of buffer in use (for DMA) */ ++ void *address; /**< Address of buffer */ ++}; ++ ++/* ++ * DRM_IOCTL_MAP_BUFS ioctl argument type. ++ */ ++struct drm_buf_map { ++ int count; /**< Length of the buffer list */ ++#ifdef __cplusplus ++ void *virt; ++#else ++ void *virtual; /**< Mmap'd area in user-virtual */ ++#endif ++ struct drm_buf_pub *list; /**< Buffer information */ ++}; ++ ++/* ++ * DRM_IOCTL_DMA ioctl argument type. ++ * ++ * Indices here refer to the offset into the buffer list in drm_buf_get. ++ * ++ * \sa drmDMA(). ++ */ ++struct drm_dma { ++ int context; /**< Context handle */ ++ int send_count; /**< Number of buffers to send */ ++ int *send_indices; /**< List of handles to buffers */ ++ int *send_sizes; /**< Lengths of data to send */ ++ enum drm_dma_flags flags; /**< Flags */ ++ int request_count; /**< Number of buffers requested */ ++ int request_size; /**< Desired size for buffers */ ++ int *request_indices; /**< Buffer information */ ++ int *request_sizes; ++ int granted_count; /**< Number of buffers granted */ ++}; ++ ++enum drm_ctx_flags { ++ _DRM_CONTEXT_PRESERVED = 0x01, ++ _DRM_CONTEXT_2DONLY = 0x02 ++}; ++ ++/* ++ * DRM_IOCTL_ADD_CTX ioctl argument type. ++ * ++ * \sa drmCreateContext() and drmDestroyContext(). ++ */ ++struct drm_ctx { ++ drm_context_t handle; ++ enum drm_ctx_flags flags; ++}; ++ ++/* ++ * DRM_IOCTL_RES_CTX ioctl argument type. ++ */ ++struct drm_ctx_res { ++ int count; ++ struct drm_ctx *contexts; ++}; ++ ++/* ++ * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. ++ */ ++struct drm_draw { ++ drm_drawable_t handle; ++}; ++ ++/* ++ * DRM_IOCTL_UPDATE_DRAW ioctl argument type. ++ */ ++typedef enum { ++ DRM_DRAWABLE_CLIPRECTS ++} drm_drawable_info_type_t; ++ ++struct drm_update_draw { ++ drm_drawable_t handle; ++ unsigned int type; ++ unsigned int num; ++ unsigned long long data; ++}; ++ ++/* ++ * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. ++ */ ++struct drm_auth { ++ drm_magic_t magic; ++}; ++ ++/* ++ * DRM_IOCTL_IRQ_BUSID ioctl argument type. ++ * ++ * \sa drmGetInterruptFromBusID(). ++ */ ++struct drm_irq_busid { ++ int irq; /**< IRQ number */ ++ int busnum; /**< bus number */ ++ int devnum; /**< device number */ ++ int funcnum; /**< function number */ ++}; ++ ++enum drm_vblank_seq_type { ++ _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ ++ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ ++ /* bits 1-6 are reserved for high crtcs */ ++ _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, ++ _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ ++ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ ++ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ ++ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ ++ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ ++}; ++#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 ++ ++#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) ++#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ ++ _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS) ++ ++struct drm_wait_vblank_request { ++ enum drm_vblank_seq_type type; ++ unsigned int sequence; ++ unsigned long signal; ++}; ++ ++struct drm_wait_vblank_reply { ++ enum drm_vblank_seq_type type; ++ unsigned int sequence; ++ long tval_sec; ++ long tval_usec; ++}; ++ ++/* ++ * DRM_IOCTL_WAIT_VBLANK ioctl argument type. ++ * ++ * \sa drmWaitVBlank(). ++ */ ++union drm_wait_vblank { ++ struct drm_wait_vblank_request request; ++ struct drm_wait_vblank_reply reply; ++}; ++ ++#define _DRM_PRE_MODESET 1 ++#define _DRM_POST_MODESET 2 ++ ++/* ++ * DRM_IOCTL_MODESET_CTL ioctl argument type ++ * ++ * \sa drmModesetCtl(). ++ */ ++struct drm_modeset_ctl { ++ __u32 crtc; ++ __u32 cmd; ++}; ++ ++/* ++ * DRM_IOCTL_AGP_ENABLE ioctl argument type. ++ * ++ * \sa drmAgpEnable(). ++ */ ++struct drm_agp_mode { ++ unsigned long mode; /**< AGP mode */ ++}; ++ ++/* ++ * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. ++ * ++ * \sa drmAgpAlloc() and drmAgpFree(). ++ */ ++struct drm_agp_buffer { ++ unsigned long size; /**< In bytes -- will round to page boundary */ ++ unsigned long handle; /**< Used for binding / unbinding */ ++ unsigned long type; /**< Type of memory to allocate */ ++ unsigned long physical; /**< Physical used by i810 */ ++}; ++ ++/* ++ * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. ++ * ++ * \sa drmAgpBind() and drmAgpUnbind(). ++ */ ++struct drm_agp_binding { ++ unsigned long handle; /**< From drm_agp_buffer */ ++ unsigned long offset; /**< In bytes -- will round to page boundary */ ++}; ++ ++/* ++ * DRM_IOCTL_AGP_INFO ioctl argument type. ++ * ++ * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), ++ * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), ++ * drmAgpVendorId() and drmAgpDeviceId(). ++ */ ++struct drm_agp_info { ++ int agp_version_major; ++ int agp_version_minor; ++ unsigned long mode; ++ unsigned long aperture_base; /* physical address */ ++ unsigned long aperture_size; /* bytes */ ++ unsigned long memory_allowed; /* bytes */ ++ unsigned long memory_used; ++ ++ /* PCI information */ ++ unsigned short id_vendor; ++ unsigned short id_device; ++}; ++ ++/* ++ * DRM_IOCTL_SG_ALLOC ioctl argument type. ++ */ ++struct drm_scatter_gather { ++ unsigned long size; /**< In bytes -- will round to page boundary */ ++ unsigned long handle; /**< Used for mapping / unmapping */ ++}; ++ ++/* ++ * DRM_IOCTL_SET_VERSION ioctl argument type. ++ */ ++struct drm_set_version { ++ int drm_di_major; ++ int drm_di_minor; ++ int drm_dd_major; ++ int drm_dd_minor; ++}; ++ ++/* DRM_IOCTL_GEM_CLOSE ioctl argument type */ ++struct drm_gem_close { ++ /** Handle of the object to be closed. */ ++ __u32 handle; ++ __u32 pad; ++}; ++ ++/* DRM_IOCTL_GEM_FLINK ioctl argument type */ ++struct drm_gem_flink { ++ /** Handle for the object being named */ ++ __u32 handle; ++ ++ /** Returned global name */ ++ __u32 name; ++}; ++ ++/* DRM_IOCTL_GEM_OPEN ioctl argument type */ ++struct drm_gem_open { ++ /** Name of object being opened */ ++ __u32 name; ++ ++ /** Returned handle for the object */ ++ __u32 handle; ++ ++ /** Returned size of the object */ ++ __u64 size; ++}; ++ ++/** ++ * DRM_CAP_DUMB_BUFFER ++ * ++ * If set to 1, the driver supports creating dumb buffers via the ++ * &DRM_IOCTL_MODE_CREATE_DUMB ioctl. ++ */ ++#define DRM_CAP_DUMB_BUFFER 0x1 ++/** ++ * DRM_CAP_VBLANK_HIGH_CRTC ++ * ++ * If set to 1, the kernel supports specifying a :ref:`CRTC index` ++ * in the high bits of &drm_wait_vblank_request.type. ++ * ++ * Starting kernel version 2.6.39, this capability is always set to 1. ++ */ ++#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 ++/** ++ * DRM_CAP_DUMB_PREFERRED_DEPTH ++ * ++ * The preferred bit depth for dumb buffers. ++ * ++ * The bit depth is the number of bits used to indicate the color of a single ++ * pixel excluding any padding. This is different from the number of bits per ++ * pixel. For instance, XRGB8888 has a bit depth of 24 but has 32 bits per ++ * pixel. ++ * ++ * Note that this preference only applies to dumb buffers, it's irrelevant for ++ * other types of buffers. ++ */ ++#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 ++/** ++ * DRM_CAP_DUMB_PREFER_SHADOW ++ * ++ * If set to 1, the driver prefers userspace to render to a shadow buffer ++ * instead of directly rendering to a dumb buffer. For best speed, userspace ++ * should do streaming ordered memory copies into the dumb buffer and never ++ * read from it. ++ * ++ * Note that this preference only applies to dumb buffers, it's irrelevant for ++ * other types of buffers. ++ */ ++#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 ++/** ++ * DRM_CAP_PRIME ++ * ++ * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT ++ * and &DRM_PRIME_CAP_EXPORT. ++ * ++ * PRIME buffers are exposed as dma-buf file descriptors. See ++ * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing". ++ */ ++#define DRM_CAP_PRIME 0x5 ++/** ++ * DRM_PRIME_CAP_IMPORT ++ * ++ * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME ++ * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. ++ */ ++#define DRM_PRIME_CAP_IMPORT 0x1 ++/** ++ * DRM_PRIME_CAP_EXPORT ++ * ++ * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME ++ * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. ++ */ ++#define DRM_PRIME_CAP_EXPORT 0x2 ++/** ++ * DRM_CAP_TIMESTAMP_MONOTONIC ++ * ++ * If set to 0, the kernel will report timestamps with ``CLOCK_REALTIME`` in ++ * struct drm_event_vblank. If set to 1, the kernel will report timestamps with ++ * ``CLOCK_MONOTONIC``. See ``clock_gettime(2)`` for the definition of these ++ * clocks. ++ * ++ * Starting from kernel version 2.6.39, the default value for this capability ++ * is 1. Starting kernel version 4.15, this capability is always set to 1. ++ */ ++#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 ++/** ++ * DRM_CAP_ASYNC_PAGE_FLIP ++ * ++ * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC. ++ */ ++#define DRM_CAP_ASYNC_PAGE_FLIP 0x7 ++/** ++ * DRM_CAP_CURSOR_WIDTH ++ * ++ * The ``CURSOR_WIDTH`` and ``CURSOR_HEIGHT`` capabilities return a valid ++ * width x height combination for the hardware cursor. The intention is that a ++ * hardware agnostic userspace can query a cursor plane size to use. ++ * ++ * Note that the cross-driver contract is to merely return a valid size; ++ * drivers are free to attach another meaning on top, eg. i915 returns the ++ * maximum plane size. ++ */ ++#define DRM_CAP_CURSOR_WIDTH 0x8 ++/** ++ * DRM_CAP_CURSOR_HEIGHT ++ * ++ * See &DRM_CAP_CURSOR_WIDTH. ++ */ ++#define DRM_CAP_CURSOR_HEIGHT 0x9 ++/** ++ * DRM_CAP_ADDFB2_MODIFIERS ++ * ++ * If set to 1, the driver supports supplying modifiers in the ++ * &DRM_IOCTL_MODE_ADDFB2 ioctl. ++ */ ++#define DRM_CAP_ADDFB2_MODIFIERS 0x10 ++/** ++ * DRM_CAP_PAGE_FLIP_TARGET ++ * ++ * If set to 1, the driver supports the &DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE and ++ * &DRM_MODE_PAGE_FLIP_TARGET_RELATIVE flags in ++ * &drm_mode_crtc_page_flip_target.flags for the &DRM_IOCTL_MODE_PAGE_FLIP ++ * ioctl. ++ */ ++#define DRM_CAP_PAGE_FLIP_TARGET 0x11 ++/** ++ * DRM_CAP_CRTC_IN_VBLANK_EVENT ++ * ++ * If set to 1, the kernel supports reporting the CRTC ID in ++ * &drm_event_vblank.crtc_id for the &DRM_EVENT_VBLANK and ++ * &DRM_EVENT_FLIP_COMPLETE events. ++ * ++ * Starting kernel version 4.12, this capability is always set to 1. ++ */ ++#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 ++/** ++ * DRM_CAP_SYNCOBJ ++ * ++ * If set to 1, the driver supports sync objects. See ++ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". ++ */ ++#define DRM_CAP_SYNCOBJ 0x13 ++/** ++ * DRM_CAP_SYNCOBJ_TIMELINE ++ * ++ * If set to 1, the driver supports timeline operations on sync objects. See ++ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". ++ */ ++#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 ++ ++/* DRM_IOCTL_GET_CAP ioctl argument type */ ++struct drm_get_cap { ++ __u64 capability; ++ __u64 value; ++}; ++ ++/** ++ * DRM_CLIENT_CAP_STEREO_3D ++ * ++ * If set to 1, the DRM core will expose the stereo 3D capabilities of the ++ * monitor by advertising the supported 3D layouts in the flags of struct ++ * drm_mode_modeinfo. See ``DRM_MODE_FLAG_3D_*``. ++ * ++ * This capability is always supported for all drivers starting from kernel ++ * version 3.13. ++ */ ++#define DRM_CLIENT_CAP_STEREO_3D 1 ++ ++/** ++ * DRM_CLIENT_CAP_UNIVERSAL_PLANES ++ * ++ * If set to 1, the DRM core will expose all planes (overlay, primary, and ++ * cursor) to userspace. ++ * ++ * This capability has been introduced in kernel version 3.15. Starting from ++ * kernel version 3.17, this capability is always supported for all drivers. ++ */ ++#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 ++ ++/** ++ * DRM_CLIENT_CAP_ATOMIC ++ * ++ * If set to 1, the DRM core will expose atomic properties to userspace. This ++ * implicitly enables &DRM_CLIENT_CAP_UNIVERSAL_PLANES and ++ * &DRM_CLIENT_CAP_ASPECT_RATIO. ++ * ++ * If the driver doesn't support atomic mode-setting, enabling this capability ++ * will fail with -EOPNOTSUPP. ++ * ++ * This capability has been introduced in kernel version 4.0. Starting from ++ * kernel version 4.2, this capability is always supported for atomic-capable ++ * drivers. ++ */ ++#define DRM_CLIENT_CAP_ATOMIC 3 ++ ++/** ++ * DRM_CLIENT_CAP_ASPECT_RATIO ++ * ++ * If set to 1, the DRM core will provide aspect ratio information in modes. ++ * See ``DRM_MODE_FLAG_PIC_AR_*``. ++ * ++ * This capability is always supported for all drivers starting from kernel ++ * version 4.18. ++ */ ++#define DRM_CLIENT_CAP_ASPECT_RATIO 4 ++ ++/** ++ * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS ++ * ++ * If set to 1, the DRM core will expose special connectors to be used for ++ * writing back to memory the scene setup in the commit. The client must enable ++ * &DRM_CLIENT_CAP_ATOMIC first. ++ * ++ * This capability is always supported for atomic-capable drivers starting from ++ * kernel version 4.19. ++ */ ++#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 ++ ++/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ ++struct drm_set_client_cap { ++ __u64 capability; ++ __u64 value; ++}; ++ ++#define DRM_RDWR O_RDWR ++#define DRM_CLOEXEC O_CLOEXEC ++struct drm_prime_handle { ++ __u32 handle; ++ ++ /** Flags.. only applicable for handle->fd */ ++ __u32 flags; ++ ++ /** Returned dmabuf file descriptor */ ++ __s32 fd; ++}; ++ ++struct drm_syncobj_create { ++ __u32 handle; ++#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) ++ __u32 flags; ++}; ++ ++struct drm_syncobj_destroy { ++ __u32 handle; ++ __u32 pad; ++}; ++ ++#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) ++#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) ++struct drm_syncobj_handle { ++ __u32 handle; ++ __u32 flags; ++ ++ __s32 fd; ++ __u32 pad; ++}; ++ ++struct drm_syncobj_transfer { ++ __u32 src_handle; ++ __u32 dst_handle; ++ __u64 src_point; ++ __u64 dst_point; ++ __u32 flags; ++ __u32 pad; ++}; ++ ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ ++struct drm_syncobj_wait { ++ __u64 handles; ++ /* absolute timeout */ ++ __s64 timeout_nsec; ++ __u32 count_handles; ++ __u32 flags; ++ __u32 first_signaled; /* only valid when not waiting all */ ++ __u32 pad; ++}; ++ ++struct drm_syncobj_timeline_wait { ++ __u64 handles; ++ /* wait on specific timeline point for every handles*/ ++ __u64 points; ++ /* absolute timeout */ ++ __s64 timeout_nsec; ++ __u32 count_handles; ++ __u32 flags; ++ __u32 first_signaled; /* only valid when not waiting all */ ++ __u32 pad; ++}; ++ ++ ++struct drm_syncobj_array { ++ __u64 handles; ++ __u32 count_handles; ++ __u32 pad; ++}; ++ ++#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */ ++struct drm_syncobj_timeline_array { ++ __u64 handles; ++ __u64 points; ++ __u32 count_handles; ++ __u32 flags; ++}; ++ ++ ++/* Query current scanout sequence number */ ++struct drm_crtc_get_sequence { ++ __u32 crtc_id; /* requested crtc_id */ ++ __u32 active; /* return: crtc output is active */ ++ __u64 sequence; /* return: most recent vblank sequence */ ++ __s64 sequence_ns; /* return: most recent time of first pixel out */ ++}; ++ ++/* Queue event to be delivered at specified sequence. Time stamp marks ++ * when the first pixel of the refresh cycle leaves the display engine ++ * for the display ++ */ ++#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */ ++#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */ ++ ++struct drm_crtc_queue_sequence { ++ __u32 crtc_id; ++ __u32 flags; ++ __u64 sequence; /* on input, target sequence. on output, actual sequence */ ++ __u64 user_data; /* user data passed to event */ ++}; ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#include "drm_mode.h" ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++#define DRM_IOCTL_BASE 'd' ++#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) ++#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) ++#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type) ++#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type) ++ ++#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version) ++#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique) ++#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth) ++#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid) ++#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map) ++#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) ++#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) ++#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) ++#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) ++#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) ++#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) ++#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) ++#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) ++#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) ++ ++#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) ++#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) ++#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block) ++#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block) ++#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control) ++#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map) ++#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc) ++#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc) ++#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info) ++#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map) ++#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free) ++ ++#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map) ++ ++#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) ++#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) ++ ++#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) ++#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) ++ ++#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) ++#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) ++#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx) ++#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx) ++#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx) ++#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx) ++#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res) ++#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw) ++#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw) ++#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma) ++#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock) ++#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) ++#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) ++ ++#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) ++#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) ++ ++#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) ++#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) ++#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) ++#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info) ++#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer) ++#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer) ++#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding) ++#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding) ++ ++#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather) ++#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather) ++ ++#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) ++ ++#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) ++#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) ++ ++#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) ++ ++#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) ++#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) ++#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc) ++#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor) ++#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut) ++#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) ++#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) ++#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) ++#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */ ++#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */ ++ ++#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) ++#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) ++#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob) ++#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) ++#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) ++/** ++ * DRM_IOCTL_MODE_RMFB - Remove a framebuffer. ++ * ++ * This removes a framebuffer previously added via ADDFB/ADDFB2. The IOCTL ++ * argument is a framebuffer object ID. ++ * ++ * Warning: removing a framebuffer currently in-use on an enabled plane will ++ * disable that plane. The CRTC the plane is linked to may also be disabled ++ * (depending on driver capabilities). ++ */ ++#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) ++#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) ++#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) ++ ++#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) ++#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) ++#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) ++#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) ++#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) ++#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) ++#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) ++#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) ++#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) ++#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) ++#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) ++#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob) ++#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob) ++ ++#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create) ++#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) ++#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) ++#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) ++#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) ++#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) ++#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) ++ ++#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) ++#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) ++#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) ++#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) ++ ++#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) ++#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) ++#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) ++#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) ++ ++#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) ++ ++/* ++ * Device specific ioctls should only be in their respective headers ++ * The device specific ioctl range is from 0x40 to 0x9f. ++ * Generic IOCTLS restart at 0xA0. ++ * ++ * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and ++ * drmCommandReadWrite(). ++ */ ++#define DRM_COMMAND_BASE 0x40 ++#define DRM_COMMAND_END 0xA0 ++ ++/* ++ * Header for events written back to userspace on the drm fd. The ++ * type defines the type of event, the length specifies the total ++ * length of the event (including the header), and user_data is ++ * typically a 64 bit value passed with the ioctl that triggered the ++ * event. A read on the drm fd will always only return complete ++ * events, that is, if for example the read buffer is 100 bytes, and ++ * there are two 64 byte events pending, only one will be returned. ++ * ++ * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and ++ * up are chipset specific. ++ */ ++struct drm_event { ++ __u32 type; ++ __u32 length; ++}; ++ ++#define DRM_EVENT_VBLANK 0x01 ++#define DRM_EVENT_FLIP_COMPLETE 0x02 ++#define DRM_EVENT_CRTC_SEQUENCE 0x03 ++ ++struct drm_event_vblank { ++ struct drm_event base; ++ __u64 user_data; ++ __u32 tv_sec; ++ __u32 tv_usec; ++ __u32 sequence; ++ __u32 crtc_id; /* 0 on older kernels that do not support this */ ++}; ++ ++/* Event delivered at sequence. Time stamp marks when the first pixel ++ * of the refresh cycle leaves the display engine for the display ++ */ ++struct drm_event_crtc_sequence { ++ struct drm_event base; ++ __u64 user_data; ++ __s64 time_ns; ++ __u64 sequence; ++}; ++ ++/* typedef area */ ++typedef struct drm_clip_rect drm_clip_rect_t; ++typedef struct drm_drawable_info drm_drawable_info_t; ++typedef struct drm_tex_region drm_tex_region_t; ++typedef struct drm_hw_lock drm_hw_lock_t; ++typedef struct drm_version drm_version_t; ++typedef struct drm_unique drm_unique_t; ++typedef struct drm_list drm_list_t; ++typedef struct drm_block drm_block_t; ++typedef struct drm_control drm_control_t; ++typedef enum drm_map_type drm_map_type_t; ++typedef enum drm_map_flags drm_map_flags_t; ++typedef struct drm_ctx_priv_map drm_ctx_priv_map_t; ++typedef struct drm_map drm_map_t; ++typedef struct drm_client drm_client_t; ++typedef enum drm_stat_type drm_stat_type_t; ++typedef struct drm_stats drm_stats_t; ++typedef enum drm_lock_flags drm_lock_flags_t; ++typedef struct drm_lock drm_lock_t; ++typedef enum drm_dma_flags drm_dma_flags_t; ++typedef struct drm_buf_desc drm_buf_desc_t; ++typedef struct drm_buf_info drm_buf_info_t; ++typedef struct drm_buf_free drm_buf_free_t; ++typedef struct drm_buf_pub drm_buf_pub_t; ++typedef struct drm_buf_map drm_buf_map_t; ++typedef struct drm_dma drm_dma_t; ++typedef union drm_wait_vblank drm_wait_vblank_t; ++typedef struct drm_agp_mode drm_agp_mode_t; ++typedef enum drm_ctx_flags drm_ctx_flags_t; ++typedef struct drm_ctx drm_ctx_t; ++typedef struct drm_ctx_res drm_ctx_res_t; ++typedef struct drm_draw drm_draw_t; ++typedef struct drm_update_draw drm_update_draw_t; ++typedef struct drm_auth drm_auth_t; ++typedef struct drm_irq_busid drm_irq_busid_t; ++typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; ++ ++typedef struct drm_agp_buffer drm_agp_buffer_t; ++typedef struct drm_agp_binding drm_agp_binding_t; ++typedef struct drm_agp_info drm_agp_info_t; ++typedef struct drm_scatter_gather drm_scatter_gather_t; ++typedef struct drm_set_version drm_set_version_t; ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif +diff -up firefox-109.0/third_party/drm/drm/drm_mode.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm_mode.h +--- firefox-109.0/third_party/drm/drm/drm_mode.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/drm/drm_mode.h 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,1217 @@ +/* + * Copyright (c) 2007 Dave Airlie @@ -3826,11 +3809,9 @@ index 000000000000..e1e351682872 +#endif + +#endif -diff --git a/third_party/drm/drm/xf86drm.h b/third_party/drm/drm/xf86drm.h -new file mode 100644 -index 000000000000..a105b9e13108 ---- /dev/null -+++ b/third_party/drm/drm/xf86drm.h +diff -up firefox-109.0/third_party/drm/drm/xf86drm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/xf86drm.h +--- firefox-109.0/third_party/drm/drm/xf86drm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/drm/xf86drm.h 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,966 @@ +/** + * \file xf86drm.h @@ -4798,11 +4779,9 @@ index 000000000000..a105b9e13108 +#endif + +#endif -diff --git a/third_party/drm/libdrm/moz.build b/third_party/drm/libdrm/moz.build -new file mode 100644 -index 000000000000..3b37b913e8b2 ---- /dev/null -+++ b/third_party/drm/libdrm/moz.build +diff -up firefox-109.0/third_party/drm/libdrm/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/libdrm/moz.build +--- firefox-109.0/third_party/drm/libdrm/moz.build.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/libdrm/moz.build 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,16 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: @@ -4820,11 +4799,9 @@ index 000000000000..3b37b913e8b2 +LOCAL_INCLUDES += ['/third_party/drm'] + +FINAL_LIBRARY = 'xul' -diff --git a/third_party/drm/libdrm/mozdrm.cpp b/third_party/drm/libdrm/mozdrm.cpp -new file mode 100644 -index 000000000000..b2fb59be64a2 ---- /dev/null -+++ b/third_party/drm/libdrm/mozdrm.cpp +diff -up firefox-109.0/third_party/drm/libdrm/mozdrm.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/libdrm/mozdrm.cpp +--- firefox-109.0/third_party/drm/libdrm/mozdrm.cpp.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/libdrm/mozdrm.cpp 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,66 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: @@ -4892,21 +4869,17 @@ index 000000000000..b2fb59be64a2 + } + return drmFreeDevices_fn(devices, count); +} -diff --git a/third_party/gbm/README b/third_party/gbm/README -new file mode 100644 -index 000000000000..4b6e2e8e02b2 ---- /dev/null -+++ b/third_party/gbm/README +diff -up firefox-109.0/third_party/drm/README.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/README +--- firefox-109.0/third_party/drm/README.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/README 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,4 @@ -+Libgbm is a gbm library wrapper needed to build and run Firefox with -+Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/gbm). ++Libdrm is a drm library wrapper needed to build and run Firefox with ++Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/drm). + -+libgbm directory stores headers of libgbm needed for build only. -diff --git a/third_party/gbm/gbm/gbm.h b/third_party/gbm/gbm/gbm.h -new file mode 100644 -index 000000000000..e28fa04aaed8 ---- /dev/null -+++ b/third_party/gbm/gbm/gbm.h ++libdrm directory stores headers of libdrm needed for build only. +diff -up firefox-109.0/third_party/gbm/gbm/gbm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/gbm/gbm.h +--- firefox-109.0/third_party/gbm/gbm/gbm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/gbm/gbm.h 2023-01-12 15:16:09.195614155 +0100 @@ -0,0 +1,452 @@ +/* + * Copyright © 2011 Intel Corporation @@ -5360,11 +5333,9 @@ index 000000000000..e28fa04aaed8 +#endif + +#endif -diff --git a/third_party/gbm/libgbm/moz.build b/third_party/gbm/libgbm/moz.build -new file mode 100644 -index 000000000000..0953d2f17a54 ---- /dev/null -+++ b/third_party/gbm/libgbm/moz.build +diff -up firefox-109.0/third_party/gbm/libgbm/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/libgbm/moz.build +--- firefox-109.0/third_party/gbm/libgbm/moz.build.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/libgbm/moz.build 2023-01-12 15:16:09.195614155 +0100 @@ -0,0 +1,16 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: @@ -5382,11 +5353,9 @@ index 000000000000..0953d2f17a54 +LOCAL_INCLUDES += ['/third_party/gbm'] + +FINAL_LIBRARY = 'xul' -diff --git a/third_party/gbm/libgbm/mozgbm.cpp b/third_party/gbm/libgbm/mozgbm.cpp -new file mode 100644 -index 000000000000..bc024a11c0b7 ---- /dev/null -+++ b/third_party/gbm/libgbm/mozgbm.cpp +diff -up firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp +--- firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp 2023-01-12 15:16:09.195614155 +0100 @@ -0,0 +1,66 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: @@ -5454,19 +5423,26 @@ index 000000000000..bc024a11c0b7 + } + return gbm_device_destroy_fn(gbm); +} -diff --git a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build -index 809899a92847..8869fae89703 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build -+++ b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build +diff -up firefox-109.0/third_party/gbm/README.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/README +--- firefox-109.0/third_party/gbm/README.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/README 2023-01-12 15:16:09.195614155 +0100 +@@ -0,0 +1,4 @@ ++Libgbm is a gbm library wrapper needed to build and run Firefox with ++Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/gbm). ++ ++libgbm directory stores headers of libgbm needed for build only. +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:19.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2023-01-13 10:53:01.407572566 +0100 @@ -8,7 +8,8 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] - + -COMPILE_FLAGS["OS_INCLUDES"] = [] +# FIXME: No idea why it doesn't pick libdrm from /third_party/drm +COMPILE_FLAGS["OS_INCLUDES"] = [ "-I/usr/include/libdrm" ] AllowCompilerWarnings() - + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" @@ -27,6 +28,8 @@ LOCAL_INCLUDES += [ "/ipc/chromium/src", @@ -5477,14 +5453,15 @@ index 809899a92847..8869fae89703 100644 "/third_party/libwebrtc/", "/third_party/libwebrtc/third_party/abseil-cpp/", "/third_party/pipewire/", -@@ -240,7 +243,15 @@ if CONFIG["CPU_ARCH"] == "arm": +@@ -242,7 +245,16 @@ if CONFIG["CPU_ARCH"] == "arm": DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", @@ -5492,33 +5469,34 @@ index 809899a92847..8869fae89703 100644 + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "ppc64": -@@ -295,7 +306,15 @@ if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +@@ -297,7 +309,15 @@ if CONFIG["CPU_ARCH"] == "aarch64" and C DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -@@ -305,7 +324,15 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -307,7 +327,16 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFI DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", @@ -5526,16 +5504,17 @@ index 809899a92847..8869fae89703 100644 + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -@@ -315,7 +342,15 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +@@ -317,7 +346,16 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CO DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", @@ -5543,13 +5522,12 @@ index 809899a92847..8869fae89703 100644 + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -diff --git a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc -index 8bdc83b76218..ab7932195c85 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc -@@ -14,7 +14,7 @@ +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:20.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc 2023-01-12 15:16:09.196614189 +0100 +@@ -17,7 +17,7 @@ #elif defined(WEBRTC_WIN) #include "modules/desktop_capture/win/full_screen_win_application_handler.h" #endif @@ -5557,8 +5535,8 @@ index 8bdc83b76218..ab7932195c85 100644 +#if defined(WEBRTC_USE_PIPEWIRE) #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h" #endif - -@@ -40,7 +40,7 @@ DesktopCaptureOptions DesktopCaptureOptions::CreateDefault() { + +@@ -41,7 +41,7 @@ DesktopCaptureOptions DesktopCaptureOpti #if defined(WEBRTC_USE_X11) result.set_x_display(SharedXDisplay::CreateDefault()); #endif @@ -5567,34 +5545,32 @@ index 8bdc83b76218..ab7932195c85 100644 result.set_screencast_stream(SharedScreenCastStream::CreateDefault()); #endif #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -diff --git a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h -index 1605d30f82d1..eb5b8a2a8777 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h -+++ b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h 2023-01-13 10:00:35.449402964 +0100 @@ -17,7 +17,7 @@ #include "modules/desktop_capture/linux/x11/shared_x_display.h" #endif - + -#if defined(WEBRTC_USE_PIPEWIRE) && !defined(WEBRTC_MOZILLA_BUILD) +#if defined(WEBRTC_USE_PIPEWIRE) #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h" #endif - + @@ -181,7 +181,6 @@ class RTC_EXPORT DesktopCaptureOptions { bool allow_pipewire() const { return allow_pipewire_; } void set_allow_pipewire(bool allow) { allow_pipewire_ = allow; } - + -#if !defined(WEBRTC_MOZILLA_BUILD) const rtc::scoped_refptr& screencast_stream() const { return screencast_stream_; } -@@ -189,14 +188,13 @@ class RTC_EXPORT DesktopCaptureOptions { - rtc::scoped_refptr stream) { - screencast_stream_ = stream; - } --#endif +@@ -196,13 +195,12 @@ class RTC_EXPORT DesktopCaptureOptions { + void set_height(uint32_t height) { height_ = height; } + uint32_t get_height() const { return height_; } #endif - +-#endif + private: #if defined(WEBRTC_USE_X11) rtc::scoped_refptr x_display_; @@ -5604,26 +5580,24 @@ index 1605d30f82d1..eb5b8a2a8777 100644 // An instance of shared PipeWire ScreenCast stream we share between // BaseCapturerPipeWire and MouseCursorMonitorPipeWire as cursor information // is sent together with screen content. -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -index 75659a9eb9e2..32578411059b 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -@@ -105,7 +105,7 @@ bool BaseCapturerPipeWire::GetSourceList(SourceList* sources) { +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc 2023-01-12 15:16:09.196614189 +0100 +@@ -136,7 +136,7 @@ bool BaseCapturerPipeWire::GetSourceList // is often treated as a null/placeholder id, so we shouldn't use that. // TODO(https://crbug.com/1297671): Reconsider type of ID when plumbing // token that will enable stream re-use. -- sources->push_back({1}); +- sources->push_back({source_id_}); + sources->push_back({PIPEWIRE_ID, 0, PIPEWIRE_NAME}); return true; } - -diff --git a/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc b/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc -index d9f27951302d..18840cc6d7ef 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc + +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:20.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc 2023-01-12 15:16:09.196614189 +0100 @@ -14,11 +14,7 @@ #include "modules/desktop_capture/desktop_capturer.h" - + #if defined(WEBRTC_USE_PIPEWIRE) -#if defined(WEBRTC_MOZILLA_BUILD) -#include "modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.h" @@ -5631,9 +5605,9 @@ index d9f27951302d..18840cc6d7ef 100644 #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" -#endif #endif // defined(WEBRTC_USE_PIPEWIRE) - + #if defined(WEBRTC_USE_X11) -@@ -32,11 +28,7 @@ std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( +@@ -32,11 +28,7 @@ std::unique_ptr Desktop const DesktopCaptureOptions& options) { #if defined(WEBRTC_USE_PIPEWIRE) if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { @@ -5644,14 +5618,13 @@ index d9f27951302d..18840cc6d7ef 100644 -#endif } #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff --git a/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc b/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc -index b2b1e376ada5..638c42ae3963 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc + +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc 2023-01-12 15:16:09.196614189 +0100 @@ -14,11 +14,7 @@ #include "modules/desktop_capture/desktop_capturer.h" - + #if defined(WEBRTC_USE_PIPEWIRE) -#if defined(WEBRTC_MOZILLA_BUILD) -#include "modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.h" @@ -5659,9 +5632,9 @@ index b2b1e376ada5..638c42ae3963 100644 #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" -#endif #endif // defined(WEBRTC_USE_PIPEWIRE) - + #if defined(WEBRTC_USE_X11) -@@ -32,11 +28,7 @@ std::unique_ptr DesktopCapturer::CreateRawWindowCapturer( +@@ -32,11 +28,7 @@ std::unique_ptr Desktop const DesktopCaptureOptions& options) { #if defined(WEBRTC_USE_PIPEWIRE) if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { @@ -5672,15 +5645,14 @@ index b2b1e376ada5..638c42ae3963 100644 -#endif } #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff --git a/third_party/moz.build b/third_party/moz.build -index 19ee0224b041..fab8f23c624f 100644 ---- a/third_party/moz.build -+++ b/third_party/moz.build + +diff -up firefox-109.0/third_party/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/moz.build +--- firefox-109.0/third_party/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/moz.build 2023-01-12 15:16:09.197614223 +0100 @@ -61,6 +61,12 @@ with Files("libwebrtc/**"): with Files("pipewire/**"): BUG_COMPONENT = ("Core", "WebRTC") - + +with Files("drm/**"): + BUG_COMPONENT = ("Core", "WebRTC") + @@ -5689,12 +5661,11 @@ index 19ee0224b041..fab8f23c624f 100644 + with Files('rlbox_wasm2c_sandbox/**'): BUG_COMPONENT = ('Firefox Build System', 'General') - -diff --git a/third_party/pipewire/libpipewire/mozpipewire.cpp b/third_party/pipewire/libpipewire/mozpipewire.cpp -index 1ecfc3196af1..fbeeb8e5a760 100644 ---- a/third_party/pipewire/libpipewire/mozpipewire.cpp -+++ b/third_party/pipewire/libpipewire/mozpipewire.cpp -@@ -69,11 +69,13 @@ static int (*pw_stream_connect_fn)(struct pw_stream *stream, + +diff -up firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp +--- firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp 2023-01-12 15:16:09.197614223 +0100 +@@ -69,11 +69,13 @@ static int (*pw_stream_connect_fn)(struc enum pw_stream_flags flags, const struct spa_pod **params, uint32_t n_params); @@ -5708,7 +5679,7 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 static int (*pw_stream_queue_buffer_fn)(struct pw_stream *stream, struct pw_buffer *buffer); static int (*pw_stream_update_params_fn)(struct pw_stream *stream, -@@ -87,7 +89,10 @@ static int (*pw_thread_loop_start_fn)(struct pw_thread_loop *loop); +@@ -87,7 +89,10 @@ static int (*pw_thread_loop_start_fn)(st static void (*pw_thread_loop_stop_fn)(struct pw_thread_loop *loop); static void (*pw_thread_loop_lock_fn)(struct pw_thread_loop *loop); static void (*pw_thread_loop_unlock_fn)(struct pw_thread_loop *loop); @@ -5716,7 +5687,7 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 +static void (*pw_thread_loop_signal_fn)(struct pw_thread_loop *loop, bool wait_for_accept); static struct pw_properties* (*pw_properties_new_string_fn)(const char *str); +static const char* (*pw_get_library_version_fn)(); - + bool IsPwLibraryLoaded() { static bool isLoaded = @@ -99,6 +104,7 @@ bool IsPwLibraryLoaded() { @@ -5736,7 +5707,7 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 + IS_FUNC_LOADED(pw_thread_loop_wait_fn) && + IS_FUNC_LOADED(pw_properties_new_string_fn) && + IS_FUNC_LOADED(pw_get_library_version_fn)); - + return isLoaded; } @@ -136,6 +145,7 @@ bool LoadPWLibrary() { @@ -5756,12 +5727,12 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 GET_FUNC(pw_properties_new_string, pwLib); + GET_FUNC(pw_get_library_version, pwLib); } - + return IsPwLibraryLoaded(); -@@ -242,6 +255,15 @@ pw_stream_connect(struct pw_stream *stream, +@@ -242,6 +255,15 @@ pw_stream_connect(struct pw_stream *stre params, n_params); } - + +int +pw_stream_disconnect(struct pw_stream *stream) +{ @@ -5774,10 +5745,10 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 struct pw_buffer * pw_stream_dequeue_buffer(struct pw_stream *stream) { -@@ -356,6 +378,23 @@ pw_thread_loop_unlock(struct pw_thread_loop *loop) +@@ -356,6 +378,23 @@ pw_thread_loop_unlock(struct pw_thread_l return pw_thread_loop_unlock_fn(loop); } - + +void +pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept) +{ @@ -5795,13 +5766,13 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 + } + return pw_thread_loop_wait_fn(loop); +} - + struct pw_properties * pw_properties_new_string(const char *str) -@@ -366,3 +405,12 @@ pw_properties_new_string(const char *str) +@@ -366,3 +405,12 @@ pw_properties_new_string(const char *str return pw_properties_new_string_fn(str); } - + +const char* +pw_get_library_version() +{ diff --git a/mozilla-1663844.patch b/mozilla-1663844.patch index 4cc43ea..afa5168 100644 --- a/mozilla-1663844.patch +++ b/mozilla-1663844.patch @@ -1,7 +1,7 @@ -diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h ---- firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 2022-06-08 23:06:36.000000000 +0200 -+++ firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h 2022-06-09 17:17:04.775008085 +0200 -@@ -27,7 +27,7 @@ class GMPSharedMem { +diff -up firefox-109.0/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-109.0/dom/media/gmp/GMPSharedMemManager.h +--- firefox-109.0/dom/media/gmp/GMPSharedMemManager.h.1663844 2023-01-09 20:34:10.000000000 +0100 ++++ firefox-109.0/dom/media/gmp/GMPSharedMemManager.h 2023-01-12 09:28:56.035741438 +0100 +@@ -26,7 +26,7 @@ class GMPSharedMem { // returned to the parent pool (which is not included). If more than // this are needed, we presume the client has either crashed or hung // (perhaps temporarily). @@ -10,9 +10,9 @@ diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-101 GMPSharedMem() { for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]); -diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp ---- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 2022-06-08 16:10:21.000000000 +0200 -+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp 2022-06-09 20:31:25.120035588 +0200 +diff -up firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp +--- firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 2023-01-09 20:34:10.000000000 +0100 ++++ firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp 2023-01-12 09:28:56.036741473 +0100 @@ -84,6 +84,9 @@ media::DecodeSupportSet GMPDecoderModule media::DecodeSupportSet GMPDecoderModule::SupportsMimeType( @@ -23,12 +23,12 @@ diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1 return media::DecodeSupport::Unsupported; } -diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp ---- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 2022-06-08 16:10:21.000000000 +0200 -+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp 2022-06-09 17:17:04.776008117 +0200 -@@ -70,6 +70,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4 - RefPtr self = this; - if (v) { +diff -up firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp +--- firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 2023-01-12 09:28:56.036741473 +0100 ++++ firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp 2023-01-12 14:18:12.354866405 +0100 +@@ -81,6 +81,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4 + }); + mDecodedData.AppendElement(std::move(v)); + mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__); + mDecodedData = DecodedData();