Rename RenderLayer -> PaintLayer

This commit is contained in:
Tetsuharu OHZEKI 2014-12-08 03:53:10 +09:00
parent d87def0743
commit cee3d517e8
4 changed files with 19 additions and 19 deletions

View file

@ -24,7 +24,7 @@ use azure::azure::AzFloat;
use collections::dlist::{mod, DList};
use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D};
use libc::uintptr_t;
use paint_task::RenderLayer;
use paint_task::PaintLayer;
use script_traits::UntrustedNodeAddress;
use servo_msg::compositor_msg::LayerId;
use servo_net::image::base::Image;
@ -138,7 +138,7 @@ pub struct StackingContext {
/// The display items that make up this stacking context.
pub display_list: Box<DisplayList>,
/// The layer for this stacking context, if there is one.
pub layer: Option<Arc<RenderLayer>>,
pub layer: Option<Arc<PaintLayer>>,
/// The position and size of this stacking context.
pub bounds: Rect<Au>,
/// The clipping rect for this stacking context, in the coordinate system of the *parent*
@ -160,7 +160,7 @@ impl StackingContext {
bounds: Rect<Au>,
z_index: i32,
opacity: AzFloat,
layer: Option<Arc<RenderLayer>>)
layer: Option<Arc<PaintLayer>>)
-> StackingContext {
StackingContext {
display_list: display_list,

View file

@ -40,7 +40,7 @@ use sync::Arc;
/// Information about a hardware graphics layer that layout sends to the painting task.
#[deriving(Clone)]
pub struct RenderLayer {
pub struct PaintLayer {
/// A per-pipeline ID describing this layer that should be stable across reflows.
pub id: LayerId,
/// The color of the background in this layer. Used for unrendered content.
@ -49,10 +49,10 @@ pub struct RenderLayer {
pub scroll_policy: ScrollPolicy,
}
impl RenderLayer {
/// Creates a new `RenderLayer`.
pub fn new(id: LayerId, background_color: Color, scroll_policy: ScrollPolicy) -> RenderLayer {
RenderLayer {
impl PaintLayer {
/// Creates a new `PaintLayer`.
pub fn new(id: LayerId, background_color: Color, scroll_policy: ScrollPolicy) -> PaintLayer {
PaintLayer {
id: id,
background_color: background_color,
scroll_policy: scroll_policy,
@ -147,16 +147,16 @@ fn initialize_layers<C>(compositor: &mut C,
let page_position = stacking_context.bounds.origin + *page_position;
match stacking_context.layer {
None => {}
Some(ref render_layer) => {
Some(ref paint_layer) => {
metadata.push(LayerMetadata {
id: render_layer.id,
id: paint_layer.id,
position:
Rect(Point2D(page_position.x.to_nearest_px() as uint,
page_position.y.to_nearest_px() as uint),
Size2D(stacking_context.bounds.size.width.to_nearest_px() as uint,
stacking_context.bounds.size.height.to_nearest_px() as uint)),
background_color: render_layer.background_color,
scroll_policy: render_layer.scroll_policy,
background_color: paint_layer.background_color,
scroll_policy: paint_layer.scroll_policy,
})
}
}