Closed
Description
Something like this:
function foo() {requestAnimationFrame(foo)}
foo()
… will prevent any window events to be received. Can't resize the window and key & mouse events are not received for example. But the UI is properly rendered and updated.
The exact code I'm using is:
<body>
<h1>Mousemove events:</h1>
<div id="moves"></div>
<h1>RAF per seconds:</h1>
<button onclick="step()">Start RAF loop</button>
<pre id="raf"></pre>
</body>
<script>
// Add a dot on mousemove
document.documentElement.addEventListener("mousemove", () => {
document.querySelector("#moves").textContent += " ."
});
// FPS counter
var count = 0;
setInterval(() => {
document.querySelector("#raf").textContent = count;
count = 0;
}, 1000);
// RAF loop
function step() {
count++;
requestAnimationFrame(step);
}
</script>
I'm not sure it's a Webrender issue. Without Webrender, some events are received, but many mousemove are missing. And the CPU spike at 120% (50% with Webrender).
If it's not WR specific, let me know, I can move this issue to servo/servo.
Metadata
Metadata
Assignees
Labels
No labels