Rename WindowMethods::set_paint_state()

This commit is contained in:
Tetsuharu OHZEKI 2014-12-08 13:43:46 +09:00
parent 189f40f6f8
commit 15a32247a6
5 changed files with 17 additions and 17 deletions

View file

@ -368,7 +368,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
} }
} }
self.window.set_render_state(paint_state); self.window.set_paint_state(paint_state);
} }
fn all_pipelines_in_idle_paint_state(&self) -> bool { fn all_pipelines_in_idle_paint_state(&self) -> bool {

View file

@ -91,7 +91,7 @@ pub trait WindowMethods {
/// Sets the ready state of the current page. /// Sets the ready state of the current page.
fn set_ready_state(&self, ready_state: ReadyState); fn set_ready_state(&self, ready_state: ReadyState);
/// Sets the paint state of the current page. /// Sets the paint state of the current page.
fn set_render_state(&self, paint_state: PaintState); fn set_paint_state(&self, paint_state: PaintState);
/// Returns the hidpi factor of the monitor. /// Returns the hidpi factor of the monitor.
fn hidpi_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32>; fn hidpi_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32>;

View file

@ -41,7 +41,7 @@ pub struct Window {
pub mouse_down_point: Cell<Point2D<c_int>>, pub mouse_down_point: Cell<Point2D<c_int>>,
pub ready_state: Cell<ReadyState>, pub ready_state: Cell<ReadyState>,
pub render_state: Cell<PaintState>, pub paint_state: Cell<PaintState>,
pub throbber_frame: Cell<u8>, pub throbber_frame: Cell<u8>,
} }
@ -65,7 +65,7 @@ impl Window {
mouse_down_point: Cell::new(Point2D(0 as c_int, 0)), mouse_down_point: Cell::new(Point2D(0 as c_int, 0)),
ready_state: Cell::new(Blank), ready_state: Cell::new(Blank),
render_state: Cell::new(IdlePaintState), paint_state: Cell::new(IdlePaintState),
throbber_frame: Cell::new(0), throbber_frame: Cell::new(0),
}; };
@ -181,8 +181,8 @@ impl WindowMethods for Window {
} }
/// Sets the paint state. /// Sets the paint state.
fn set_render_state(&self, paint_state: PaintState) { fn set_paint_state(&self, paint_state: PaintState) {
self.render_state.set(paint_state); self.paint_state.set(paint_state);
//FIXME: set_window_title causes crash with Android version of freeGLUT. Temporarily blocked. //FIXME: set_window_title causes crash with Android version of freeGLUT. Temporarily blocked.
//self.update_window_title() //self.update_window_title()
} }
@ -215,7 +215,7 @@ impl Window {
// glut::set_window_title(self.glut_window, format!("{:c} Performing Layout . Servo", throbber)) // glut::set_window_title(self.glut_window, format!("{:c} Performing Layout . Servo", throbber))
// } // }
// FinishedLoading => { // FinishedLoading => {
// match self.render_state { // match self.paint_state {
// PaintingPaintState => { // PaintingPaintState => {
// glut::set_window_title(self.glut_window, format!("{:c} Rendering . Servo", throbber)) // glut::set_window_title(self.glut_window, format!("{:c} Rendering . Servo", throbber))
// } // }

View file

@ -45,7 +45,7 @@ pub struct Window {
mouse_down_point: Cell<Point2D<c_int>>, mouse_down_point: Cell<Point2D<c_int>>,
ready_state: Cell<ReadyState>, ready_state: Cell<ReadyState>,
render_state: Cell<PaintState>, paint_state: Cell<PaintState>,
last_title_set_time: Cell<Timespec>, last_title_set_time: Cell<Timespec>,
} }
@ -78,7 +78,7 @@ impl Window {
mouse_down_point: Cell::new(Point2D(0 as c_int, 0)), mouse_down_point: Cell::new(Point2D(0 as c_int, 0)),
ready_state: Cell::new(Blank), ready_state: Cell::new(Blank),
render_state: Cell::new(IdlePaintState), paint_state: Cell::new(IdlePaintState),
last_title_set_time: Cell::new(Timespec::new(0, 0)), last_title_set_time: Cell::new(Timespec::new(0, 0)),
}; };
@ -160,8 +160,8 @@ impl WindowMethods for Window {
} }
/// Sets the paint state. /// Sets the paint state.
fn set_render_state(&self, paint_state: PaintState) { fn set_paint_state(&self, paint_state: PaintState) {
self.render_state.set(paint_state); self.paint_state.set(paint_state);
self.update_window_title() self.update_window_title()
} }
@ -302,7 +302,7 @@ impl Window {
self.glfw_window.set_title("Performing Layout — Servo [GLFW]") self.glfw_window.set_title("Performing Layout — Servo [GLFW]")
} }
FinishedLoading => { FinishedLoading => {
match self.render_state.get() { match self.paint_state.get() {
PaintingPaintState => { PaintingPaintState => {
self.glfw_window.set_title("Rendering — Servo [GLFW]") self.glfw_window.set_title("Rendering — Servo [GLFW]")
} }

View file

@ -66,7 +66,7 @@ pub struct Window {
mouse_pos: Cell<Point2D<int>>, mouse_pos: Cell<Point2D<int>>,
ready_state: Cell<ReadyState>, ready_state: Cell<ReadyState>,
render_state: Cell<PaintState>, paint_state: Cell<PaintState>,
key_modifiers: Cell<KeyModifiers>, key_modifiers: Cell<KeyModifiers>,
last_title_set_time: Cell<Timespec>, last_title_set_time: Cell<Timespec>,
@ -118,7 +118,7 @@ impl Window {
mouse_pos: Cell::new(Point2D(0, 0)), mouse_pos: Cell::new(Point2D(0, 0)),
ready_state: Cell::new(Blank), ready_state: Cell::new(Blank),
render_state: Cell::new(IdlePaintState), paint_state: Cell::new(IdlePaintState),
key_modifiers: Cell::new(KeyModifiers::empty()), key_modifiers: Cell::new(KeyModifiers::empty()),
last_title_set_time: Cell::new(Timespec::new(0, 0)), last_title_set_time: Cell::new(Timespec::new(0, 0)),
@ -174,8 +174,8 @@ impl WindowMethods for Window {
} }
/// Sets the paint state. /// Sets the paint state.
fn set_render_state(&self, paint_state: PaintState) { fn set_paint_state(&self, paint_state: PaintState) {
self.render_state.set(paint_state); self.paint_state.set(paint_state);
self.update_window_title() self.update_window_title()
} }
@ -233,7 +233,7 @@ impl Window {
window.set_title("Performing Layout - Servo [glutin]") window.set_title("Performing Layout - Servo [glutin]")
} }
FinishedLoading => { FinishedLoading => {
match self.render_state.get() { match self.paint_state.get() {
PaintingPaintState => { PaintingPaintState => {
window.set_title("Rendering - Servo [glutin]") window.set_title("Rendering - Servo [glutin]")
} }