diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-06-21 07:47:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-21 07:47:53 -0700 |
commit | 819a40bfb0fd2e1f4832fa3d773c266e9179ae21 (patch) | |
tree | 83a23e0cd545b7a98c2fbc842d84a37ee2a528f8 /components/script/mem.rs | |
parent | 7a80192a820848f5ac04b9f4ffe2e860476579ba (diff) | |
parent | cbeb181c61d973d9426adbcac39d73b4700ce464 (diff) | |
download | servo-819a40bfb0fd2e1f4832fa3d773c266e9179ae21.tar.gz servo-819a40bfb0fd2e1f4832fa3d773c266e9179ae21.zip |
Auto merge of #17398 - glennw:opt-composite, r=jdm
Improve decisions in compositor over when to draw a frame.
This patch fixes a couple of issues in the compositor:
1) Remove the delayed composition code. Previously, this would schedule
a composite for 12ms in the future. This doesn't really make any sense
with WR. There's no point in doing a composite unless WR has provided
a new frame to be drawn. This fixes issues in several benchmarks where
we were doing multiple composite / renders per rAF, which is a waste
of CPU time. This *does* make the framerate slower in some cases (such
as a slow rAF callback) but it's more correct - otherwise we were just
compositing the same frame multiple times for no real benefit.
2) Inform the window of the current animation state of the compositor.
Specifically, if an animation (or rAF) is currently active, the
window system switches to use event polling, and does not block on
the OS-level event loop. In the case of active animation, we just
assume that we want to be running as the vsync interval and not
blocking. This means the compositor thread only sleeps on vsync
during animation, which reduces OS scheduling and results in much
smoother animation.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17398)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/mem.rs')
0 files changed, 0 insertions, 0 deletions