aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread_2020/lib.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-03-14 18:40:54 +0100
committerGitHub <noreply@github.com>2024-03-14 17:40:54 +0000
commitad37a54f59f4eef2c8f815a3a59ab7d928b2946f (patch)
treee78d14062c6f8d807411ee535d0e426b9798f6aa /components/layout_thread_2020/lib.rs
parent4597aeae5f9b1d76d6af664afdbb72647908e907 (diff)
downloadservo-ad37a54f59f4eef2c8f815a3a59ab7d928b2946f.tar.gz
servo-ad37a54f59f4eef2c8f815a3a59ab7d928b2946f.zip
dependencies: Upgrade to WebRender 0.64 (#31486)
This brings the version of WebRender used in Servo up-to-date with Gecko upstream. The big change here is that HiDPI is no longer handled via WebRender. Instead this happens via a scale applied to the root layer in the compositor. In addition to this change, various changes are made to Servo to adapt to the new WebRender API. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'components/layout_thread_2020/lib.rs')
-rw-r--r--components/layout_thread_2020/lib.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/components/layout_thread_2020/lib.rs b/components/layout_thread_2020/lib.rs
index 8528128150a..7c27b9a9212 100644
--- a/components/layout_thread_2020/lib.rs
+++ b/components/layout_thread_2020/lib.rs
@@ -916,7 +916,7 @@ impl LayoutThread {
// particular pipeline, so we need to tell WebRender about that.
flags.insert(HitTestFlags::POINT_RELATIVE_TO_PIPELINE_VIEWPORT);
- let client_point = units::WorldPoint::from_untyped(client_point);
+ let client_point = units::DevicePoint::from_untyped(client_point);
let results = self.webrender_api.hit_test(
Some(self.id.to_webrender()),
client_point,
@@ -949,8 +949,11 @@ impl LayoutThread {
.insert(state.scroll_id, state.scroll_offset);
let point = Point2D::new(-state.scroll_offset.x, -state.scroll_offset.y);
- self.webrender_api
- .send_scroll_node(units::LayoutPoint::from_untyped(point), state.scroll_id);
+ self.webrender_api.send_scroll_node(
+ self.id.to_webrender(),
+ units::LayoutPoint::from_untyped(point),
+ state.scroll_id,
+ );
}
fn set_scroll_states<'a, 'b>(
@@ -1028,6 +1031,7 @@ impl LayoutThread {
epoch.into(),
fragment_tree.root_scroll_sensitivity,
);
+ display_list.wr.begin();
// `dump_serialized_display_list` doesn't actually print anything. It sets up
// the display list for printing the serialized version when `finalize()` is called.
@@ -1063,7 +1067,7 @@ impl LayoutThread {
if reflow_goal.needs_display() {
self.webrender_api
- .send_display_list(display_list.compositor_info, display_list.wr.finalize().1);
+ .send_display_list(display_list.compositor_info, display_list.wr.end().1);
}
self.update_iframe_sizes(iframe_sizes);