mirror of
https://github.com/servo/servo.git
synced 2025-08-30 09:38:19 +01:00
Fixes a number of race conditions and reliability issues with reftests and compositor.
The basic idea is it's safe to output an image for reftest by testing: - That the compositor doesn't have any animations active. - That the compositor is not waiting on any outstanding paint messages to arrive. - That the script tasks are "idle" and therefore won't cause reflow. - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered. - It could easily be expanded to handle pending timers etc. - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
This commit is contained in:
parent
b3b9deafa7
commit
eec3fad93d
17 changed files with 363 additions and 390 deletions
|
@ -22,7 +22,6 @@ use layers::geometry::DevicePixel;
|
|||
use layers::platform::surface::NativeGraphicsMetadata;
|
||||
use libc::{c_char, c_void};
|
||||
use msg::constellation_msg::{Key, KeyModifiers};
|
||||
use msg::compositor_msg::{ReadyState, PaintState};
|
||||
use std::ptr;
|
||||
use std_url::Url;
|
||||
use util::cursor::Cursor;
|
||||
|
@ -212,26 +211,6 @@ impl WindowMethods for Window {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_ready_state(&self, ready_state: ReadyState) {
|
||||
let browser = self.cef_browser.borrow();
|
||||
let browser = match *browser {
|
||||
None => return,
|
||||
Some(ref browser) => browser,
|
||||
};
|
||||
let is_loading = match ready_state {
|
||||
ReadyState::Blank | ReadyState::FinishedLoading => 0,
|
||||
ReadyState::Loading | ReadyState::PerformingLayout => 1,
|
||||
};
|
||||
browser.get_host()
|
||||
.get_client()
|
||||
.get_load_handler()
|
||||
.on_loading_state_change(browser.clone(), is_loading, 1, 1);
|
||||
}
|
||||
|
||||
fn set_paint_state(&self, _: PaintState) {
|
||||
// TODO(pcwalton)
|
||||
}
|
||||
|
||||
fn hidpi_factor(&self) -> ScaleFactor<ScreenPx,DevicePixel,f32> {
|
||||
let browser = self.cef_browser.borrow();
|
||||
match *browser {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue