tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit ef8ac4ef583008db87b924703340666f173e8ff9
parent ecb3a4ee22be3258fc8bec32c81ea37b299bdbce
Author: stransky <stransky@redhat.com>
Date:   Mon, 15 Dec 2025 09:45:48 +0000

Bug 2004199 [Wayland/HDR] Round transformed buffer source coordinates r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D276202

Diffstat:
Mgfx/layers/NativeLayerWayland.cpp | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gfx/layers/NativeLayerWayland.cpp b/gfx/layers/NativeLayerWayland.cpp @@ -802,11 +802,22 @@ void NativeLayerWayland::UpdateLayerPlacementLocked( mSurface->MoveLocked(aProofOfLock, rect.TopLeft()); mSurface->SetViewPortDestLocked(aProofOfLock, rect.Size()); + LOGVERBOSE( + "NativeLayerWayland::UpdateLayerPlacement(): destination [%d,%d] -> [%d " + "x %d]", + rect.x, rect.y, rect.width, rect.height); + auto transform2DInversed = transform2D.Inverse(); Rect bufferClip = transform2DInversed.TransformBounds(surfaceRectClipped); - mSurface->SetViewPortSourceRectLocked( - aProofOfLock, + auto viewportRect = gfx::RoundedToInt( bufferClip.Intersect(Rect(0, 0, mSize.width, mSize.height))); + + LOGVERBOSE( + "NativeLayerWayland::UpdateLayerPlacement(): source [%d,%d] -> [%d x %d]", + viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height); + + mSurface->SetViewPortSourceRectLocked( + aProofOfLock, DesktopIntRect::FromUnknownRect(viewportRect)); } void NativeLayerWayland::RenderLayer(double aScale) {