Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInactive pages in session history with webgl content keep running #22977
Projects
Comments
|
This can make the ML demos look worse if you look at several in a row. |
|
The compositor already checks for whether a pipeline is visible or not, so we just need to make #22986 more sensible to get this for free. |
This was referenced Mar 6, 2019
bors-servo
added a commit
that referenced
this issue
Mar 8, 2019
Make webgl behave better with session history This prevents the compositor from animating pages that are not actually visible, so pages using webgl do not needlessly impact the performance of the rest of the browser. Additionally, this fixes a problem that was alluded to in [this code](https://github.com/servo/rust-offscreen-rendering-context/blob/b5228c098b889a9806a5f93582903e192b3939ef/src/draw_buffer.rs#L282-L285), causing Servo to delete arbitrary resources when a GC occurred in content that used three.js. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22987 and fix #22977 and fix #20934 and fix #20953 and fix #20930 and fix #20950 and fix #20924 - [x] There are tests for these changes <!-- 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/23000) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Mar 8, 2019
Make webgl behave better with session history This prevents the compositor from animating pages that are not actually visible, so pages using webgl do not needlessly impact the performance of the rest of the browser. Additionally, this fixes a problem that was alluded to in [this code](https://github.com/servo/rust-offscreen-rendering-context/blob/b5228c098b889a9806a5f93582903e192b3939ef/src/draw_buffer.rs#L282-L285), causing Servo to delete arbitrary resources when a GC occurred in content that used three.js. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22987 and fix #22977 and fix #20934 and fix #20953 and fix #20930 and fix #20950 and fix #20924 - [x] There are tests for these changes <!-- 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/23000) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, if you visit https://threejs.org/examples/, choose a demo, watch it for a bit, then go backwards in history, the console output shows that the page is still executing. At minimum we should not be sending triggering rAF callbacks on pages that are not displaying to the user; possibly we should take even more drastic steps in order to conserve resources (such as automatically discarding any page with a webgl canvas when it becomes inactive).