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

@ -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);

View file

@ -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;

View file

@ -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)]