mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Rename the PaintState variants.
This commit is contained in:
parent
4d47817bae
commit
138081ba25
6 changed files with 22 additions and 23 deletions
|
@ -29,8 +29,8 @@ use png;
|
|||
use gleam::gl::types::{GLint, GLsizei};
|
||||
use gleam::gl;
|
||||
use script_traits::{ViewportMsg, ScriptControlChan};
|
||||
use servo_msg::compositor_msg::{Blank, Epoch, FinishedLoading, IdlePaintState, LayerId};
|
||||
use servo_msg::compositor_msg::{ReadyState, PaintState, PaintingPaintState, Scrollable};
|
||||
use servo_msg::compositor_msg::{Blank, Epoch, FinishedLoading, LayerId};
|
||||
use servo_msg::compositor_msg::{ReadyState, PaintState, Scrollable};
|
||||
use servo_msg::constellation_msg::{mod, ConstellationChan};
|
||||
use servo_msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use servo_msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData};
|
||||
|
@ -411,7 +411,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
if self.ready_states.len() == 0 {
|
||||
return false;
|
||||
}
|
||||
return self.paint_states.values().all(|&value| value == IdlePaintState);
|
||||
return self.paint_states.values().all(|&value| value == PaintState::Idle);
|
||||
}
|
||||
|
||||
fn has_paint_msg_tracking(&self) -> bool {
|
||||
|
@ -505,7 +505,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
-> Rc<Layer<CompositorData>> {
|
||||
// Initialize the ReadyState and PaintState for this pipeline.
|
||||
self.ready_states.insert(frame_tree.pipeline.id, Blank);
|
||||
self.paint_states.insert(frame_tree.pipeline.id, PaintingPaintState);
|
||||
self.paint_states.insert(frame_tree.pipeline.id, PaintState::Painting);
|
||||
|
||||
let root_layer = self.create_root_layer_for_pipeline_and_rect(&frame_tree.pipeline,
|
||||
frame_rect);
|
||||
|
|
|
@ -21,8 +21,8 @@ use layers::platform::surface::{NativeSurface, NativeSurfaceMethods};
|
|||
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
|
||||
use layers;
|
||||
use native::task::NativeTaskBuilder;
|
||||
use servo_msg::compositor_msg::{Epoch, IdlePaintState, LayerId};
|
||||
use servo_msg::compositor_msg::{LayerMetadata, PaintListener, PaintingPaintState, ScrollPolicy};
|
||||
use servo_msg::compositor_msg::{Epoch, PaintState, LayerId};
|
||||
use servo_msg::compositor_msg::{LayerMetadata, PaintListener, ScrollPolicy};
|
||||
use servo_msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use servo_msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
|
||||
use servo_msg::constellation_msg::PipelineExitType;
|
||||
|
@ -260,7 +260,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
|
|||
}
|
||||
|
||||
let mut replies = Vec::new();
|
||||
self.compositor.set_paint_state(self.id, PaintingPaintState);
|
||||
self.compositor.set_paint_state(self.id, PaintState::Painting);
|
||||
for PaintRequest { buffer_requests, scale, layer_id, epoch }
|
||||
in requests.into_iter() {
|
||||
if self.epoch == epoch {
|
||||
|
@ -270,7 +270,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
|
|||
}
|
||||
}
|
||||
|
||||
self.compositor.set_paint_state(self.id, IdlePaintState);
|
||||
self.compositor.set_paint_state(self.id, PaintState::Idle);
|
||||
|
||||
for reply in replies.iter() {
|
||||
let &(_, ref buffer_set) = reply;
|
||||
|
|
|
@ -16,8 +16,8 @@ use constellation_msg::PipelineId;
|
|||
/// The status of the painter.
|
||||
#[deriving(PartialEq, Clone)]
|
||||
pub enum PaintState {
|
||||
IdlePaintState,
|
||||
PaintingPaintState,
|
||||
Idle,
|
||||
Painting,
|
||||
}
|
||||
|
||||
#[deriving(Eq, Ord, PartialEq, PartialOrd, Clone, Show)]
|
||||
|
|
|
@ -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]")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue