Skip to content

Commit 52f1bf2

Browse files
jamienicolweb-flow
authored andcommitted
Bug 1893956 - Ensure consistent rounding for draw compositor tile and clip rects. r=gfx-reviewers,nical
In bug 1894106 we ensured that draw compositor tiles' tile rects and clip rects were both calculated on the CPU, to avoid visible seams whilst low-quality pinch zooming. However, the clip_rect's calculation uses CompositeState::get_device_rect(), which rounds the rect, whereas the newly added tile rect calculation used a raw call to ScaleOffset::map_rect(), which does not. This means that seams still sometimes flicker whilst zooming. This patch fixes this by using CompositeState::get_device_rect() for the tile rect calculation as well, ensuring consistent rounding. Differential Revision: https://phabricator.services.mozilla.com/D222641
1 parent 71c6434 commit 52f1bf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webrender/src/renderer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3158,8 +3158,8 @@ impl Renderer {
31583158
let tile = &composite_state.tiles[item.key];
31593159

31603160
let clip_rect = item.rectangle;
3161+
let tile_rect = composite_state.get_device_rect(&tile.local_rect, tile.transform_index);
31613162
let transform = composite_state.get_device_transform(tile.transform_index);
3162-
let tile_rect = transform.map_rect(&tile.local_rect);
31633163
let flip = (transform.scale.x < 0.0, transform.scale.y < 0.0);
31643164

31653165
// Work out the draw params based on the tile surface

0 commit comments

Comments
 (0)