Skip to content

Commit 0508110

Browse files
squarewavewrupdater
authored and
wrupdater
committed
Bug 1441308 - Fix picture-caching interaction with doc spitting r=gw
This is a stab at what the correct approach to this should be. It seems that we should be using the window size here and not the screen_rect, as the screen_rect is not used to offset what we normally draw, but instead generally for scissoring(?). The end result is if we use an offset screen_rect, we end up applying the offset of the chrome area twice, once because the document's screen rect is offset, and once because of the tile.world_rect offset. Depends on D20696 Differential Revision: https://phabricator.services.mozilla.com/D20698 [wrupdater] From https://hg.mozilla.org/mozilla-central/rev/48bf7d6e2ea7be2eff20cafdbb4c79dfd3706e8e
1 parent 84c218f commit 0508110

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

webrender/src/frame_builder.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,11 @@ impl FrameBuilder {
475475
.take_render_tasks();
476476

477477
let root_render_task = RenderTask::new_picture(
478-
RenderTaskLocation::Fixed(self.screen_rect.to_i32()),
479-
self.screen_rect.size.to_f32(),
478+
// The rect here is the whole window. If we were to use the screen_rect,
479+
// any offset in that rect would doubly apply for cached pictures.
480+
RenderTaskLocation::Fixed(DeviceIntRect::new(DeviceIntPoint::zero(),
481+
self.window_size).to_i32()),
482+
self.window_size.to_f32(),
480483
self.root_pic_index,
481484
DeviceIntPoint::zero(),
482485
child_tasks,

0 commit comments

Comments
 (0)