commit 3fc5674a9037846fcf760920c9e34e9c2f7a480e
parent 1e9cedee9d66a3c08d2d4a11adf14ff46c6b5235
Author: stransky <stransky@redhat.com>
Date: Tue, 4 Nov 2025 19:14:22 +0000
Bug 1986260 [Wayland] Make sure we call opaque region frame callback after opaque region update r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D271211
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/widget/gtk/WaylandSurface.cpp b/widget/gtk/WaylandSurface.cpp
@@ -741,11 +741,12 @@ bool WaylandSurface::DisableUserInputLocked(
void WaylandSurface::OpaqueCallbackHandler() {
WaylandSurfaceLock lock(this);
if (mPendingOpaqueRegion) {
- LOGVERBOSE("WaylandSurface::OpaqueCallbackHandler()");
+ LOGVERBOSE("WaylandSurface::SetOpaqueRegionCallbackHandler()");
wl_surface_set_opaque_region(mSurface, mPendingOpaqueRegion);
MozClearPointer(mPendingOpaqueRegion, wl_region_destroy);
mSurfaceNeedsCommit = true;
}
+ MozClearPointer(mOpaqueRegionFrameCallback, wl_callback_destroy);
}
void WaylandSurface::SetOpaqueLocked(const WaylandSurfaceLock& aProofOfLock) {
@@ -768,8 +769,6 @@ void WaylandSurface::SetOpaqueRegionLocked(
return;
}
- LOGVERBOSE("WaylandSurface::SetOpaqueRegionLocked()");
-
// Region should be in surface-logical coordinates, so we need to divide by
// the buffer scale. We use round-in in order to be safe with subpixels.
UnknownScaleFactor scale(GetScale());
@@ -781,8 +780,9 @@ void WaylandSurface::SetOpaqueRegionLocked(
const auto& rect = gfx::RoundedIn(iter.Get().ToUnknownRect() / scale);
wl_region_add(mPendingOpaqueRegion, rect.x, rect.y, rect.Width(),
rect.Height());
- LOGVERBOSE(" region [%d, %d] -> [%d x %d]", rect.x, rect.y, rect.Width(),
- rect.Height());
+ LOGVERBOSE(
+ "WaylandSurface::SetOpaqueRegionLocked() region [%d, %d] -> [%d x %d]",
+ rect.x, rect.y, rect.Width(), rect.Height());
}
RequestFrameCallbackLocked(aProofOfLock);
}