Rename the PaintState variants.

This commit is contained in:
Ms2ger 2015-01-04 11:36:47 +01:00
parent 4d47817bae
commit 138081ba25
6 changed files with 22 additions and 23 deletions

View file

@ -23,8 +23,8 @@ use gleam::gl;
use layers::geometry::DevicePixel;
use layers::platform::surface::NativeGraphicsMetadata;
use libc::c_int;
use msg::compositor_msg::{Blank, FinishedLoading, IdlePaintState, Loading, PaintState};
use msg::compositor_msg::{PaintingPaintState, PerformingLayout, ReadyState};
use msg::compositor_msg::{Blank, FinishedLoading, Loading, PaintState};
use msg::compositor_msg::{PerformingLayout, ReadyState};
use msg::constellation_msg::{mod, LoadData};
use msg::constellation_msg::{Key, KeyModifiers, CONTROL, SHIFT};
use std::cell::{Cell, RefCell};
@ -81,7 +81,7 @@ impl Window {
mouse_down_point: Cell::new(Point2D(0 as c_int, 0)),
ready_state: Cell::new(Blank),
paint_state: Cell::new(IdlePaintState),
paint_state: Cell::new(PaintState::Idle),
last_title_set_time: Cell::new(Timespec::new(0, 0)),
};
@ -354,10 +354,10 @@ impl Window {
}
FinishedLoading => {
match self.paint_state.get() {
PaintingPaintState => {
PaintState::Painting => {
self.glfw_window.set_title("Rendering — Servo [GLFW]")
}
IdlePaintState => {
PaintState::Idle => {
self.glfw_window.set_title("Servo [GLFW]")
}
}

View file

@ -19,8 +19,8 @@ use layers::geometry::DevicePixel;
use layers::platform::surface::NativeGraphicsMetadata;
use msg::constellation_msg;
use msg::constellation_msg::{Key, CONTROL, SHIFT, ALT};
use msg::compositor_msg::{IdlePaintState, PaintState, PaintingPaintState};
use msg::compositor_msg::{FinishedLoading, Blank, Loading, PerformingLayout, ReadyState};
use msg::compositor_msg::{PaintState, FinishedLoading, Blank, Loading};
use msg::compositor_msg::{PerformingLayout, ReadyState};
use msg::constellation_msg::LoadData;
use std::cell::{Cell, RefCell};
use std::num::Float;
@ -156,7 +156,7 @@ impl Window {
mouse_pos: Cell::new(Point2D(0, 0)),
ready_state: Cell::new(Blank),
paint_state: Cell::new(IdlePaintState),
paint_state: Cell::new(PaintState::Idle),
key_modifiers: Cell::new(KeyModifiers::empty()),
last_title_set_time: Cell::new(Timespec::new(0, 0)),
@ -344,10 +344,10 @@ impl Window {
}
FinishedLoading => {
match self.paint_state.get() {
PaintingPaintState => {
PaintState::Painting => {
window.set_title("Rendering - Servo [glutin]")
}
IdlePaintState => {
PaintState::Idle => {
window.set_title("Servo [glutin]")
}
}

View file

@ -11,8 +11,7 @@ use geom::size::TypedSize2D;
use layers::geometry::DevicePixel;
use layers::platform::surface::NativeGraphicsMetadata;
use libc::c_int;
use msg::compositor_msg::{Blank, IdlePaintState};
use msg::compositor_msg::{ReadyState, PaintState};
use msg::compositor_msg::{Blank, ReadyState, PaintState};
use msg::constellation_msg::{Key, KeyModifiers};
use msg::constellation_msg::LoadData;
use std::cell::Cell;
@ -748,7 +747,7 @@ impl Window {
surf: eglwindow,
ready_state: Cell::new(Blank),
paint_state: Cell::new(IdlePaintState),
paint_state: Cell::new(PaintState::Idle),
};
Rc::new(window)