mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #16030 - paulrouget:toggle-wr-profiler, r=glennw
Expose a method to toggle wr profiler <!-- 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/16030) <!-- Reviewable:end -->
This commit is contained in:
commit
bea126fb73
2 changed files with 9 additions and 0 deletions
|
@ -1702,6 +1702,11 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
self.shutdown_state != ShutdownState::FinishedShuttingDown
|
||||
}
|
||||
|
||||
pub fn set_webrender_profiler_enabled(&mut self, enabled: bool) {
|
||||
self.webrender.set_profiler_enabled(enabled);
|
||||
self.webrender_api.generate_frame(None);
|
||||
}
|
||||
|
||||
/// Repaints and recomposites synchronously. You must be careful when calling this, as if a
|
||||
/// paint is not scheduled the compositor will hang forever.
|
||||
///
|
||||
|
|
|
@ -242,6 +242,10 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
|
|||
self.compositor.handle_events(events)
|
||||
}
|
||||
|
||||
pub fn set_webrender_profiler_enabled(&mut self, enabled: bool) {
|
||||
self.compositor.set_webrender_profiler_enabled(enabled);
|
||||
}
|
||||
|
||||
pub fn repaint_synchronously(&mut self) {
|
||||
self.compositor.repaint_synchronously()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue