Repository navigation
layout: Skip layout traversals that obviously won't do anything. - #10021
Conversation
| let display_list = if flow::base(&**layout_root).restyle_damage | ||
| .contains(REPAINT) || | ||
| rw_data.display_list.is_none() { | ||
| println!("rebuilding display list"); |
There was a problem hiding this comment.
nit: Probably debug! is wanted here.
|
-S-awaiting-review +S-needs-code-changes Reviewed 3 of 3 files at r1. components/layout/layout_thread.rs, line 873 [r1] (raw file): Maybe if there is no display list, we should build it unconditionally? Comments from the review on Reviewable.io |
01ca115 to
3455b4a
Compare
|
Addressed review comments. r? @mbrubeck |
| @@ -236,6 +236,6 @@ impl<'a> BuildDisplayList<'a> { | |||
|
|
|||
| #[inline] | |||
| fn should_process(&self) -> bool { | |||
|
I think this is breaking browserhtml. The progressbar is not redrawn. |
|
Also - PNG images show up late (the window controls in browserhtml). |
|
Would a test case help? |
|
Yeah, a test case would be useful. This sounds like another case in which we didn't reflow properly in script and counted on the hit test reflow to draw. |
|
Reviewed 2 of 2 files at r2. Comments from the review on Reviewable.io |
I think this is because an image load increments the |
3455b4a to
df27547
Compare
|
Fixed both bugs. r? @mbrubeck |
|
@bors-servo r+ Reviewed 2 of 2 files at r3. Comments from the review on Reviewable.io |
|
📌 Commit df27547 has been approved by |
layout: Skip layout traversals that obviously won't do anything. This reduces CPU usage when mousing over simple pages (example.com). More complex pages (Wikipedia) still reflow a lot due to other bugs. Additionally, this change causes Servo to stop painting the results of hit test queries. This is also a win for CPU usage. This significantly improves #9999, though there's more that can be done. I'll leave it open in case @paulrouget thinks this PR isn't enough. r? @mbrubeck <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10021) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt |
|
There are unexpected results in both test-css and test-wpt, and they are consistent across Linux and Mac: |
layout: Skip layout traversals that obviously won't do anything. This reduces CPU usage when mousing over simple pages (example.com). More complex pages (Wikipedia) still reflow a lot due to other bugs. Additionally, this change causes Servo to stop painting the results of hit test queries. This is also a win for CPU usage. This significantly improves #9999, though there's more that can be done. I'll leave it open in case @paulrouget thinks this PR isn't enough. r? @mbrubeck <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10021) <!-- Reviewable:end -->
|
💔 Test failed - android |
|
@larsbergstrom Do you have an idea as to what might be going on with |
|
@larsbergstrom ...that failure? |
|
It's failing to find |
|
@pcwalton Sorry, we are doing upgrades to the infra. I should have turned off r+ privs entirely instead of just posting on #servo - will do in the future! I'll retry once the machines are online. |
|
@bors-servo retry My bad on the earlier fail; I added a slave to Buildbot before double checking that it could complete a test successfully |
layout: Skip layout traversals that obviously won't do anything. This reduces CPU usage when mousing over simple pages (example.com). More complex pages (Wikipedia) still reflow a lot due to other bugs. Additionally, this change causes Servo to stop painting the results of hit test queries. This is also a win for CPU usage. This significantly improves #9999, though there's more that can be done. I'll leave it open in case @paulrouget thinks this PR isn't enough. r? @mbrubeck <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10021) <!-- Reviewable:end -->
|
@bors-servo retry |
|
Buildbot may fail here due to variable expansion failure fixed in servo/saltfs#261 . |
|
💣 Failed to start rebuilding: |
layout: Skip layout traversals that obviously won't do anything. This reduces CPU usage when mousing over simple pages (example.com). More complex pages (Wikipedia) still reflow a lot due to other bugs. Additionally, this change causes Servo to stop painting the results of hit test queries. This is also a win for CPU usage. This significantly improves #9999, though there's more that can be done. I'll leave it open in case @paulrouget thinks this PR isn't enough. r? @mbrubeck <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10021) <!-- Reviewable:end -->
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor |
After servo#10021, `LayoutThread::repaint` no longer forced a repaint because of the `restyle_damage` check. This patch adds the correct restyle damage and fixes servo#10163.
Fix forced repaint on image load After #10021, `LayoutThread::repaint` no longer forced a repaint because of the `restyle_damage` check. This patch adds the correct restyle damage and fixes #10163. r? @pcwalton <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10197) <!-- Reviewable:end -->
This reduces CPU usage when mousing over simple pages (example.com). More complex pages (Wikipedia) still reflow a lot due to other bugs.
Additionally, this change causes Servo to stop painting the results of hit test queries. This is also a win for CPU usage.
This significantly improves #9999, though there's more that can be done. I'll leave it open in case @paulrouget thinks this PR isn't enough.
r? @mbrubeck
This change is