[webkit-changes] [WebKit/WebKit] 34c2d1: RemoteImageBufferSet::prepareBufferForDisplay uses...
Kimmo Kinnunen
noreply at github.com
Wed Dec 20 01:39:38 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34c2d1233dec1417e97868ce1c575e31b7f15fbc
https://github.com/WebKit/WebKit/commit/34c2d1233dec1417e97868ce1c575e31b7f15fbc
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
M Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp
Log Message:
-----------
RemoteImageBufferSet::prepareBufferForDisplay uses source rects larger than the layer bounds
https://bugs.webkit.org/show_bug.cgi?id=266628
rdar://problem/119862411
Reviewed by Matt Woodrow.
The drawImageBuffer(ib, ..., sourceRect, ..) would receive
FloatRect sourceRect = expandedIntRect({ { }, ib->logicalSize() })
This does not make sense, it is not well defined what it means to fetch
pixels outside of the source. This should be a caller bug.
For example, the logicalSize might be 95.5 with scale = 2. The
underlying native image would be 191 pixels.
The problem was caused by dirty rect calculations with Region, which
does not support floating point dimensions.
* Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp:
(WebKit::RemoteImageBufferSet::prepareBufferForDisplay):
Canonical link: https://commits.webkit.org/272330@main
More information about the webkit-changes
mailing list