mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename RenderLayer -> PaintLayer
This commit is contained in:
parent
d87def0743
commit
cee3d517e8
4 changed files with 19 additions and 19 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ use gfx::display_list::{ImageDisplayItem, ImageDisplayItemClass, LineDisplayItem
|
|||
use gfx::display_list::{LineDisplayItemClass, PseudoDisplayItemClass, SidewaysLeft, SidewaysRight};
|
||||
use gfx::display_list::{SolidColorDisplayItem, SolidColorDisplayItemClass, StackingContext};
|
||||
use gfx::display_list::{TextDisplayItem, TextDisplayItemClass, Upright};
|
||||
use gfx::paint_task::RenderLayer;
|
||||
use gfx::paint_task::PaintLayer;
|
||||
use servo_msg::compositor_msg::{FixedPosition, Scrollable};
|
||||
use servo_msg::constellation_msg::{ConstellationChan, FrameRectMsg};
|
||||
use servo_net::image::holder::ImageHolder;
|
||||
|
@ -812,7 +812,7 @@ pub trait BlockFlowDisplayListBuilding {
|
|||
fn build_display_list_for_floating_block(&mut self, layout_context: &LayoutContext);
|
||||
fn create_stacking_context(&self,
|
||||
display_list: Box<DisplayList>,
|
||||
layer: Option<Arc<RenderLayer>>)
|
||||
layer: Option<Arc<PaintLayer>>)
|
||||
-> Arc<StackingContext>;
|
||||
}
|
||||
|
||||
|
@ -875,7 +875,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
let transparent = color::rgba(1.0, 1.0, 1.0, 0.0);
|
||||
let stacking_context =
|
||||
self.create_stacking_context(display_list,
|
||||
Some(Arc::new(RenderLayer::new(self.layer_id(0),
|
||||
Some(Arc::new(PaintLayer::new(self.layer_id(0),
|
||||
transparent,
|
||||
scroll_policy))));
|
||||
self.base.display_list_building_result = StackingContextResult(stacking_context)
|
||||
|
@ -897,7 +897,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
|
||||
fn create_stacking_context(&self,
|
||||
display_list: Box<DisplayList>,
|
||||
layer: Option<Arc<RenderLayer>>)
|
||||
layer: Option<Arc<PaintLayer>>)
|
||||
-> Arc<StackingContext> {
|
||||
let bounds = Rect(self.base.stacking_relative_position,
|
||||
self.base.overflow.size.to_physical(self.base.writing_mode));
|
||||
|
|
|
@ -28,7 +28,7 @@ use geom::scale_factor::ScaleFactor;
|
|||
use gfx::color;
|
||||
use gfx::display_list::{DisplayList, OpaqueNode, StackingContext};
|
||||
use gfx::font_cache_task::FontCacheTask;
|
||||
use gfx::paint_task::{mod, RenderInitMsg, RenderChan, RenderLayer};
|
||||
use gfx::paint_task::{mod, RenderInitMsg, RenderChan, PaintLayer};
|
||||
use layout_traits;
|
||||
use layout_traits::{LayoutControlMsg, LayoutTaskFactory};
|
||||
use log;
|
||||
|
@ -676,7 +676,7 @@ impl LayoutTask {
|
|||
let mut display_list = box DisplayList::new();
|
||||
flow::mut_base(layout_root.deref_mut()).display_list_building_result
|
||||
.add_to(&mut *display_list);
|
||||
let render_layer = Arc::new(RenderLayer::new(layout_root.layer_id(0),
|
||||
let paint_layer = Arc::new(PaintLayer::new(layout_root.layer_id(0),
|
||||
color,
|
||||
Scrollable));
|
||||
let origin = Rect(Point2D(Au(0), Au(0)), root_size);
|
||||
|
@ -684,7 +684,7 @@ impl LayoutTask {
|
|||
origin,
|
||||
0,
|
||||
1.0,
|
||||
Some(render_layer)));
|
||||
Some(paint_layer)));
|
||||
|
||||
rw_data.stacking_context = Some(stacking_context.clone());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue