mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Upgrade display list building for the WebRender update.
This commit is contained in:
parent
7915a7099f
commit
7ca570dd1d
3 changed files with 168 additions and 109 deletions
|
@ -24,10 +24,11 @@ use std::f32;
|
|||
use std::fmt;
|
||||
use style::computed_values::_servo_top_layer::T as InTopLayer;
|
||||
use webrender_api as wr;
|
||||
use webrender_api::units::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D};
|
||||
use webrender_api::{BorderRadius, ClipMode, ComplexClipRegion, ExternalScrollId, FilterOp};
|
||||
use webrender_api::{GlyphInstance, GradientStop, ImageKey, MixBlendMode, ScrollSensitivity};
|
||||
use webrender_api::{Shadow, StickyOffsetBounds, TransformStyle};
|
||||
use webrender_api::units::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform};
|
||||
use webrender_api::{BorderRadius, ClipId, ClipMode, CommonItemProperties, ComplexClipRegion};
|
||||
use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, GradientStop, ImageKey};
|
||||
use webrender_api::{MixBlendMode, ScrollSensitivity, Shadow, SpatialId};
|
||||
use webrender_api::{StickyOffsetBounds, TransformStyle};
|
||||
|
||||
pub use style::dom::OpaqueNode;
|
||||
|
||||
|
@ -466,6 +467,16 @@ impl BaseDisplayItem {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn empty_common_item_properties() -> CommonItemProperties {
|
||||
CommonItemProperties {
|
||||
clip_rect: LayoutRect::max_rect(),
|
||||
clip_id: ClipId::root(wr::PipelineId::dummy()),
|
||||
spatial_id: SpatialId::root_scroll_node(wr::PipelineId::dummy()),
|
||||
hit_info: None,
|
||||
is_backface_visible: false,
|
||||
}
|
||||
}
|
||||
|
||||
/// A clipping region for a display item. Currently, this can describe rectangles, rounded
|
||||
/// rectangles (for `border-radius`), or arbitrary intersections of the two. Arbitrary transforms
|
||||
/// are not supported because those are handled by the higher-level `StackingContext` abstraction.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue