mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Try to use
WebRender types more
The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
This commit is contained in:
parent
1543912589
commit
3230162fd0
39 changed files with 330 additions and 327 deletions
|
@ -258,7 +258,7 @@ impl DisplayItem {
|
|||
let stacking_context = &item.stacking_context;
|
||||
debug_assert_eq!(stacking_context.context_type, StackingContextType::Real);
|
||||
|
||||
//let mut info = webrender_api::LayoutPrimitiveInfo::new(stacking_context.bounds);
|
||||
//let mut info = LayoutPrimitiveInfo::new(stacking_context.bounds);
|
||||
let mut bounds = stacking_context.bounds;
|
||||
let spatial_id =
|
||||
if let Some(frame_index) = stacking_context.established_reference_frame {
|
||||
|
|
|
@ -64,8 +64,8 @@ use style::values::computed::counters::ContentItem;
|
|||
use style::values::computed::{Length, Size, VerticalAlign};
|
||||
use style::values::generics::box_::{Perspective, VerticalAlignKeyword};
|
||||
use style::values::generics::transform;
|
||||
use webrender_api;
|
||||
use webrender_api::units::LayoutTransform;
|
||||
use webrender_api::{self, ImageKey};
|
||||
|
||||
// From gfxFontConstants.h in Firefox.
|
||||
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;
|
||||
|
@ -336,9 +336,9 @@ impl InlineAbsoluteFragmentInfo {
|
|||
|
||||
#[derive(Clone)]
|
||||
pub enum CanvasFragmentSource {
|
||||
WebGL(webrender_api::ImageKey),
|
||||
WebGL(ImageKey),
|
||||
Image(Option<Arc<Mutex<IpcSender<CanvasMsg>>>>),
|
||||
WebGPU(webrender_api::ImageKey),
|
||||
WebGPU(ImageKey),
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -20,7 +20,7 @@ use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
|||
use servo_config::opts;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use webrender_api::units::LayoutPoint;
|
||||
use webrender_api::PropertyBinding;
|
||||
use webrender_api::{ColorF, PropertyBinding, RectangleDisplayItem};
|
||||
|
||||
pub fn resolve_generated_content(root: &mut dyn Flow, layout_context: &LayoutContext) {
|
||||
ResolveGeneratedContent::new(&layout_context).traverse(root, 0);
|
||||
|
@ -75,7 +75,7 @@ pub fn reflow(root: &mut dyn Flow, layout_context: &LayoutContext, relayout_mode
|
|||
pub fn build_display_list_for_subtree<'a>(
|
||||
flow_root: &mut dyn Flow,
|
||||
layout_context: &'a LayoutContext,
|
||||
background_color: webrender_api::ColorF,
|
||||
background_color: ColorF,
|
||||
client_size: Size2D<Au>,
|
||||
) -> DisplayListBuildState<'a> {
|
||||
let mut state = StackingContextCollectionState::new(layout_context.id);
|
||||
|
@ -94,7 +94,7 @@ pub fn build_display_list_for_subtree<'a>(
|
|||
);
|
||||
state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new(
|
||||
base,
|
||||
webrender_api::RectangleDisplayItem {
|
||||
RectangleDisplayItem {
|
||||
color: PropertyBinding::Value(background_color),
|
||||
common: items::empty_common_item_properties(),
|
||||
bounds: bounds.to_layout(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue