aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2019-06-04 15:21:58 -0700
committerJosh Matthews <josh@joshmatthews.net>2019-07-09 10:50:27 -0400
commit2f9c9cefdb74713593c47eec2002c5dd5416848b (patch)
tree9e0fef3243dad3fb8b97e7622e37026967688963
parent357fc0332391bb6603b29453e644d9326807afbb (diff)
downloadservo-2f9c9cefdb74713593c47eec2002c5dd5416848b.tar.gz
servo-2f9c9cefdb74713593c47eec2002c5dd5416848b.zip
WebRender units are no longer reexported.
-rw-r--r--components/canvas/canvas_data.rs2
-rw-r--r--components/canvas/webgl_mode/inprocess.rs4
-rw-r--r--components/canvas/webgl_thread.rs2
-rw-r--r--components/compositing/compositor.rs21
-rw-r--r--components/compositing/compositor_thread.rs3
-rw-r--r--components/compositing/windowing.rs7
-rw-r--r--components/embedder_traits/lib.rs2
-rw-r--r--components/geometry/lib.rs2
-rw-r--r--components/layout/display_list/border.rs4
-rw-r--r--components/layout/display_list/builder.rs11
-rw-r--r--components/layout/display_list/conversions.rs20
-rw-r--r--components/layout/display_list/items.rs10
-rw-r--r--components/layout/display_list/webrender_helpers.rs9
-rw-r--r--components/layout/flow.rs2
-rw-r--r--components/layout/fragment.rs3
-rw-r--r--components/layout/sequential.rs2
-rw-r--r--components/layout_thread/lib.rs7
-rw-r--r--components/net/image_cache.rs3
-rw-r--r--components/script/dom/screen.rs2
-rw-r--r--components/script/dom/window.rs3
-rw-r--r--components/script_traits/lib.rs5
-rw-r--r--components/script_traits/script_msg.rs2
-rw-r--r--components/style_traits/lib.rs2
-rw-r--r--components/webrender_traits/lib.rs5
24 files changed, 65 insertions, 68 deletions
diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs
index aa6539ebbb9..4a55529066c 100644
--- a/components/canvas/canvas_data.rs
+++ b/components/canvas/canvas_data.rs
@@ -941,7 +941,7 @@ impl<'a> CanvasData<'a> {
let size = self.drawtarget.get_size();
let descriptor = webrender_api::ImageDescriptor {
- size: webrender_api::DeviceIntSize::new(size.width, size.height),
+ size: webrender_api::units::DeviceIntSize::new(size.width, size.height),
stride: None,
format: webrender_api::ImageFormat::BGRA8,
offset: 0,
diff --git a/components/canvas/webgl_mode/inprocess.rs b/components/canvas/webgl_mode/inprocess.rs
index d0203f7498b..8584289b904 100644
--- a/components/canvas/webgl_mode/inprocess.rs
+++ b/components/canvas/webgl_mode/inprocess.rs
@@ -159,7 +159,7 @@ impl webrender::OutputImageHandler for OutputHandler {
fn lock(
&mut self,
id: webrender_api::PipelineId,
- ) -> Option<(u32, webrender_api::FramebufferIntSize)> {
+ ) -> Option<(u32, webrender_api::units::FramebufferIntSize)> {
// Insert a fence in the WR command queue
let gl_sync = self
.webrender_gl
@@ -172,7 +172,7 @@ impl webrender::OutputImageHandler for OutputHandler {
self.lock_channel.1.recv().unwrap().map(|(tex_id, size)| {
(
tex_id,
- webrender_api::FramebufferIntSize::new(size.width, size.height),
+ webrender_api::units::FramebufferIntSize::new(size.width, size.height),
)
})
}
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index 4b2e59dd216..8bda48d0739 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -643,7 +643,7 @@ impl<VR: WebVRRenderHandler + 'static> WebGLThread<VR> {
/// Helper function to create a `webrender_api::ImageDescriptor`.
fn image_descriptor(size: Size2D<i32>, alpha: bool) -> webrender_api::ImageDescriptor {
webrender_api::ImageDescriptor {
- size: webrender_api::DeviceIntSize::new(size.width, size.height),
+ size: webrender_api::units::DeviceIntSize::new(size.width, size.height),
stride: None,
format: webrender_api::ImageFormat::BGRA8,
offset: 0,
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index bb8f4d8f2f0..c4ee45bb8e7 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -42,10 +42,8 @@ use std::rc::Rc;
use style_traits::viewport::ViewportConstraints;
use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
use time::{now, precise_time_ns, precise_time_s};
-use webrender_api::{
- self, DeviceIntPoint, DevicePoint, FramebufferIntSize, HitTestFlags, HitTestResult,
-};
-use webrender_api::{LayoutVector2D, ScrollLocation};
+use webrender_api::{self, HitTestFlags, HitTestResult, ScrollLocation};
+use webrender_api::units::{DeviceIntPoint, DevicePoint, FramebufferIntSize, LayoutVector2D};
use webvr_traits::WebVRMainThreadHeartbeat;
#[derive(Debug, PartialEq)]
@@ -724,7 +722,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
let dppx = self.page_zoom * self.hidpi_factor();
let scaled_point = (point / dppx).to_untyped();
- let world_cursor = webrender_api::WorldPoint::from_untyped(&scaled_point);
+ let world_cursor = webrender_api::units::WorldPoint::from_untyped(&scaled_point);
self.webrender_api.hit_test(
self.webrender_document,
None,
@@ -844,8 +842,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
let cursor = TypedPoint2D::new(-1, -1); // Make sure this hits the base layer.
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
magnification: magnification,
- scroll_location: ScrollLocation::Delta(
- webrender_api::LayoutVector2D::from_untyped(&scroll_delta.to_untyped()),
+ scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped(
+ &scroll_delta.to_untyped()),
),
cursor: cursor,
event_count: 1,
@@ -933,8 +931,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
last_combined_event @ &mut None => {
*last_combined_event = Some(ScrollZoomEvent {
magnification: scroll_event.magnification,
- scroll_location: ScrollLocation::Delta(
- webrender_api::LayoutVector2D::from_untyped(&this_delta.to_untyped()),
+ scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped(
+ &this_delta.to_untyped()),
),
cursor: this_cursor,
event_count: 1,
@@ -966,15 +964,14 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
let scaled_delta = (TypedVector2D::from_untyped(&delta.to_untyped()) /
self.scale)
.to_untyped();
- let calculated_delta =
- webrender_api::LayoutVector2D::from_untyped(&scaled_delta);
+ let calculated_delta = LayoutVector2D::from_untyped(&scaled_delta);
ScrollLocation::Delta(calculated_delta)
},
// Leave ScrollLocation unchanged if it is Start or End location.
sl @ ScrollLocation::Start | sl @ ScrollLocation::End => sl,
};
let cursor = (combined_event.cursor.to_f32() / self.scale).to_untyped();
- let cursor = webrender_api::WorldPoint::from_untyped(&cursor);
+ let cursor = webrender_api::units::WorldPoint::from_untyped(&cursor);
let mut txn = webrender_api::Transaction::new();
txn.scroll(scroll_location, cursor);
if combined_event.magnification != 1.0 {
diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs
index 8ef56c813c3..ad318368b69 100644
--- a/components/compositing/compositor_thread.rs
+++ b/components/compositing/compositor_thread.rs
@@ -17,7 +17,8 @@ use profile_traits::time;
use script_traits::{AnimationState, ConstellationMsg, EventResult};
use std::fmt::{Debug, Error, Formatter};
use style_traits::viewport::ViewportConstraints;
-use webrender_api::{self, DeviceIntPoint, DeviceIntSize};
+use webrender_api::units::{DeviceIntPoint, DeviceIntSize};
+use webrender_api;
use webvr_traits::WebVRMainThreadHeartbeat;
/// Sends messages to the compositor.
diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs
index 91d954a281a..64607668f27 100644
--- a/components/compositing/windowing.rs
+++ b/components/compositing/windowing.rs
@@ -19,10 +19,9 @@ use std::fmt::{Debug, Error, Formatter};
use std::rc::Rc;
use std::time::Duration;
use style_traits::DevicePixel;
-use webrender_api::{
- DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint, FramebufferIntRect,
- FramebufferIntSize, ScrollLocation,
-};
+use webrender_api::ScrollLocation;
+use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint};
+use webrender_api::units::{FramebufferIntRect, FramebufferIntSize};
use webvr::VRServiceManager;
use webvr_traits::WebVRMainThreadHeartbeat;
diff --git a/components/embedder_traits/lib.rs b/components/embedder_traits/lib.rs
index ac427c42995..7622f0e5822 100644
--- a/components/embedder_traits/lib.rs
+++ b/components/embedder_traits/lib.rs
@@ -19,7 +19,7 @@ use keyboard_types::KeyboardEvent;
use msg::constellation_msg::{InputMethodType, PipelineId, TopLevelBrowsingContextId};
use servo_url::ServoUrl;
use std::fmt::{Debug, Error, Formatter};
-use webrender_api::{DeviceIntPoint, DeviceIntSize};
+use webrender_api::units::{DeviceIntPoint, DeviceIntSize};
/// A cursor for the window. This is different from a CSS cursor (see
/// `CursorKind`) in that it has no `Auto` value.
diff --git a/components/geometry/lib.rs b/components/geometry/lib.rs
index 45d423f0ab5..155551ee3d9 100644
--- a/components/geometry/lib.rs
+++ b/components/geometry/lib.rs
@@ -8,7 +8,7 @@ extern crate malloc_size_of_derive;
use app_units::{Au, MAX_AU, MIN_AU};
use euclid::{Length, Point2D, Rect, Size2D};
use std::f32;
-use webrender_api::{FramebufferPixel, LayoutPoint, LayoutRect, LayoutSize};
+use webrender_api::units::{FramebufferPixel, LayoutPoint, LayoutRect, LayoutSize};
// Units for use with euclid::length and euclid::scale_factor.
diff --git a/components/layout/display_list/border.rs b/components/layout/display_list/border.rs
index 848386cb630..fff18fcf6c0 100644
--- a/components/layout/display_list/border.rs
+++ b/components/layout/display_list/border.rs
@@ -12,8 +12,8 @@ use style::values::computed::{BorderCornerRadius, BorderImageWidth};
use style::values::computed::{BorderImageSideWidth, NonNegativeLengthOrNumber};
use style::values::generics::rect::Rect as StyleRect;
use style::values::generics::NonNegative;
-use webrender_api::{BorderRadius, BorderSide, BorderStyle, ColorF};
-use webrender_api::{LayoutSideOffsets, LayoutSize, NormalBorder};
+use webrender_api::units::{LayoutSideOffsets, LayoutSize};
+use webrender_api::{BorderRadius, BorderSide, BorderStyle, ColorF, NormalBorder};
/// Computes a border radius size against the containing size.
///
diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs
index 8d32ec01520..1653afbc198 100644
--- a/components/layout/display_list/builder.rs
+++ b/components/layout/display_list/builder.rs
@@ -64,12 +64,11 @@ use style::values::generics::image::{GradientKind, PaintWorklet};
use style::values::specified::ui::CursorKind;
use style::values::{Either, RGBA};
use style_traits::ToCss;
-use webrender_api::{
- self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF, ColorU,
- ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LayoutRect, LayoutSize,
- LayoutTransform, LayoutVector2D, LineStyle, NinePatchBorder, NinePatchBorderSource,
- NormalBorder, ScrollSensitivity, StickyOffsetBounds,
-};
+use webrender_api::units::{LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D};
+use webrender_api::{ColorU, ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LineStyle};
+use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder};
+use webrender_api::{ScrollSensitivity, StickyOffsetBounds};
+use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF};
static THREAD_TINT_COLORS: [ColorF; 8] = [
ColorF {
diff --git a/components/layout/display_list/conversions.rs b/components/layout/display_list/conversions.rs
index f541ef581ac..4624b5f8dd0 100644
--- a/components/layout/display_list/conversions.rs
+++ b/components/layout/display_list/conversions.rs
@@ -114,23 +114,23 @@ impl ToLayout for RGBA {
}
impl ToLayout for Point2D<Au> {
- type Type = wr::LayoutPoint;
+ type Type = wr::units::LayoutPoint;
fn to_layout(&self) -> Self::Type {
- wr::LayoutPoint::new(self.x.to_f32_px(), self.y.to_f32_px())
+ wr::units::LayoutPoint::new(self.x.to_f32_px(), self.y.to_f32_px())
}
}
impl ToLayout for Rect<Au> {
- type Type = wr::LayoutRect;
+ type Type = wr::units::LayoutRect;
fn to_layout(&self) -> Self::Type {
- wr::LayoutRect::new(self.origin.to_layout(), self.size.to_layout())
+ wr::units::LayoutRect::new(self.origin.to_layout(), self.size.to_layout())
}
}
impl ToLayout for SideOffsets2D<Au> {
- type Type = wr::LayoutSideOffsets;
+ type Type = wr::units::LayoutSideOffsets;
fn to_layout(&self) -> Self::Type {
- wr::LayoutSideOffsets::new(
+ wr::units::LayoutSideOffsets::new(
self.top.to_f32_px(),
self.right.to_f32_px(),
self.bottom.to_f32_px(),
@@ -140,16 +140,16 @@ impl ToLayout for SideOffsets2D<Au> {
}
impl ToLayout for Size2D<Au> {
- type Type = wr::LayoutSize;
+ type Type = wr::units::LayoutSize;
fn to_layout(&self) -> Self::Type {
- wr::LayoutSize::new(self.width.to_f32_px(), self.height.to_f32_px())
+ wr::units::LayoutSize::new(self.width.to_f32_px(), self.height.to_f32_px())
}
}
impl ToLayout for Vector2D<Au> {
- type Type = wr::LayoutVector2D;
+ type Type = wr::units::LayoutVector2D;
fn to_layout(&self) -> Self::Type {
- wr::LayoutVector2D::new(self.x.to_f32_px(), self.y.to_f32_px())
+ wr::units::LayoutVector2D::new(self.x.to_f32_px(), self.y.to_f32_px())
}
}
diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs
index 10d3b81a8d8..6dee68f85df 100644
--- a/components/layout/display_list/items.rs
+++ b/components/layout/display_list/items.rs
@@ -24,12 +24,10 @@ use std::f32;
use std::fmt;
use style::computed_values::_servo_top_layer::T as InTopLayer;
use webrender_api as wr;
-use webrender_api::{BorderRadius, ClipMode};
-use webrender_api::{ComplexClipRegion, ExternalScrollId, FilterOp};
-use webrender_api::{GlyphInstance, GradientStop, ImageKey, LayoutPoint};
-use webrender_api::{LayoutRect, LayoutSize, LayoutTransform};
-use webrender_api::{MixBlendMode, ScrollSensitivity, Shadow};
-use webrender_api::{StickyOffsetBounds, TransformStyle};
+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};
pub use style::dom::OpaqueNode;
diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs
index 099a1d1807a..e9c8b8d81b3 100644
--- a/components/layout/display_list/webrender_helpers.rs
+++ b/components/layout/display_list/webrender_helpers.rs
@@ -10,10 +10,9 @@
use crate::display_list::items::{ClipScrollNode, ClipScrollNodeType};
use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType};
use msg::constellation_msg::PipelineId;
-use webrender_api::{
- self, ClipId, DisplayListBuilder, RasterSpace, ReferenceFrameKind, SpaceAndClipInfo, SpatialId,
-};
-use webrender_api::{LayoutPoint, PropertyBinding, SpecificDisplayItem};
+use webrender_api::units::LayoutPoint;
+use webrender_api::{self, ClipId, DisplayListBuilder, RasterSpace, ReferenceFrameKind};
+use webrender_api::{SpaceAndClipInfo, SpatialId, SpecificDisplayItem};
pub trait WebRenderDisplayListConverter {
fn convert_to_webrender(&self, pipeline_id: PipelineId) -> DisplayListBuilder;
@@ -306,7 +305,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
sticky_data.margins,
sticky_data.vertical_offset_bounds,
sticky_data.horizontal_offset_bounds,
- webrender_api::LayoutVector2D::zero(),
+ webrender_api::units::LayoutVector2D::zero(),
);
state.spatial_ids[item.node_index.to_index()] = Some(id);
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index bcc38252b9b..d7ab73cd8d3 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -65,7 +65,7 @@ use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::LengthPercentageOrAuto;
-use webrender_api::LayoutTransform;
+use webrender_api::units::LayoutTransform;
/// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field
/// is of type `BaseFlow` or some type that also implements this trait.
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 72029fb2484..aa8a8605642 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -65,7 +65,8 @@ use style::values::computed::{LengthPercentage, LengthPercentageOrAuto, Size, Ve
use style::values::generics::box_::{Perspective, VerticalAlignKeyword};
use style::values::generics::transform;
use style::Zero;
-use webrender_api::{self, LayoutTransform};
+use webrender_api::units::LayoutTransform;
+use webrender_api;
// From gfxFontConstants.h in Firefox.
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;
diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs
index a1fe086d79f..dfa8fddd82c 100644
--- a/components/layout/sequential.rs
+++ b/components/layout/sequential.rs
@@ -17,7 +17,7 @@ use app_units::Au;
use euclid::{Point2D, Vector2D};
use servo_config::opts;
use style::servo::restyle_damage::ServoRestyleDamage;
-use webrender_api::LayoutPoint;
+use webrender_api::units::LayoutPoint;
pub fn resolve_generated_content(root: &mut dyn Flow, layout_context: &LayoutContext) {
ResolveGeneratedContent::new(&layout_context).traverse(root, 0);
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index 3d192f6bbe6..bbd3c238b5b 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -833,7 +833,7 @@ impl LayoutThread {
let point = Point2D::new(-state.scroll_offset.x, -state.scroll_offset.y);
let mut txn = webrender_api::Transaction::new();
txn.scroll_node_with_id(
- webrender_api::LayoutPoint::from_untyped(&point),
+ webrender_api::units::LayoutPoint::from_untyped(&point),
state.scroll_id,
webrender_api::ScrollClamping::ToContentBounds,
);
@@ -1247,7 +1247,7 @@ impl LayoutThread {
epoch.next();
self.epoch.set(epoch);
- let viewport_size = webrender_api::LayoutSize::from_untyped(&viewport_size);
+ let viewport_size = webrender_api::units::LayoutSize::from_untyped(&viewport_size);
// Observe notifications about rendered frames if needed right before
// sending the display list to WebRender in order to set time related
@@ -1669,7 +1669,8 @@ impl LayoutThread {
// particular pipeline, so we need to tell WebRender about that.
flags.insert(webrender_api::HitTestFlags::POINT_RELATIVE_TO_PIPELINE_VIEWPORT);
- let client_point = webrender_api::WorldPoint::from_untyped(&client_point);
+ let client_point =
+ webrender_api::units::WorldPoint::from_untyped(&client_point);
let results = self.webrender_api.hit_test(
self.webrender_document,
Some(self.id.to_webrender()),
diff --git a/components/net/image_cache.rs b/components/net/image_cache.rs
index e610be15412..bfa87fc0687 100644
--- a/components/net/image_cache.rs
+++ b/components/net/image_cache.rs
@@ -17,6 +17,7 @@ use std::io;
use std::mem;
use std::sync::{Arc, Mutex};
use std::thread;
+use webrender_api::units::DeviceIntSize;
///
/// TODO(gw): Remaining work on image cache:
@@ -72,7 +73,7 @@ fn set_webrender_image_key(webrender_api: &webrender_api::RenderApi, image: &mut
},
};
let descriptor = webrender_api::ImageDescriptor {
- size: webrender_api::DeviceIntSize::new(image.width as i32, image.height as i32),
+ size: DeviceIntSize::new(image.width as i32, image.height as i32),
stride: None,
format: webrender_api::ImageFormat::BGRA8,
offset: 0,
diff --git a/components/script/dom/screen.rs b/components/script/dom/screen.rs
index a7cf8160114..ff90224d53a 100644
--- a/components/script/dom/screen.rs
+++ b/components/script/dom/screen.rs
@@ -16,7 +16,7 @@ use euclid::TypedSize2D;
use profile_traits::ipc;
use script_traits::ScriptMsg;
use style_traits::CSSPixel;
-use webrender_api::DeviceIntSize;
+use webrender_api::units::DeviceIntSize;
#[dom_struct]
pub struct Screen {
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 8ca1e324511..524d44ffba2 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -132,7 +132,8 @@ use style::str::HTML_SPACE_CHARACTERS;
use style::stylesheets::CssRuleType;
use style_traits::{CSSPixel, DevicePixel, ParsingMode};
use url::Position;
-use webrender_api::{DeviceIntPoint, DeviceIntSize, DocumentId, ExternalScrollId, RenderApiSender};
+use webrender_api::units::{DeviceIntPoint, DeviceIntSize};
+use webrender_api::{DocumentId, ExternalScrollId, RenderApiSender};
use webvr_traits::WebVRMsg;
/// Current state of the window object
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 4b87a104a4d..4ed3f4f5d75 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -58,9 +58,8 @@ use std::sync::Arc;
use std::time::Duration;
use style_traits::CSSPixel;
use style_traits::SpeculativePainter;
-use webrender_api::{
- DeviceIntSize, DevicePixel, DocumentId, ExternalScrollId, ImageKey, RenderApiSender,
-};
+use webrender_api::units::{DeviceIntSize, DevicePixel};
+use webrender_api::{DocumentId, ExternalScrollId, ImageKey, RenderApiSender};
use webvr_traits::{WebVREvent, WebVRMsg};
pub use crate::script_msg::{
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs
index 6f11e2356df..4f7e45718e7 100644
--- a/components/script_traits/script_msg.rs
+++ b/components/script_traits/script_msg.rs
@@ -28,7 +28,7 @@ use servo_url::ServoUrl;
use std::fmt;
use style_traits::viewport::ViewportConstraints;
use style_traits::CSSPixel;
-use webrender_api::{DeviceIntPoint, DeviceIntSize};
+use webrender_api::units::{DeviceIntPoint, DeviceIntSize};
/// A particular iframe's size, associated with a browsing context.
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs
index 4e89f6fdf67..b2dcc8431cb 100644
--- a/components/style_traits/lib.rs
+++ b/components/style_traits/lib.rs
@@ -36,7 +36,7 @@ extern crate to_shmem_derive;
#[cfg(feature = "servo")]
extern crate webrender_api;
#[cfg(feature = "servo")]
-pub use webrender_api::DevicePixel;
+pub use webrender_api::units::DevicePixel;
use cssparser::{CowRcStr, Token};
use selectors::parser::SelectorParseErrorKind;
diff --git a/components/webrender_traits/lib.rs b/components/webrender_traits/lib.rs
index 40d9f0956c3..60492121663 100644
--- a/components/webrender_traits/lib.rs
+++ b/components/webrender_traits/lib.rs
@@ -7,6 +7,7 @@
use euclid::Size2D;
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
+use webrender_api::units::TexelRect;
/// This trait is used as a bridge between the different GL clients
/// in Servo that handles WebRender ExternalImages and the WebRender
@@ -117,14 +118,14 @@ impl webrender::ExternalImageHandler for WebrenderExternalImageHandlers {
let (texture_id, size) = self.webgl_handler.as_mut().unwrap().lock(key.0);
(
texture_id,
- webrender_api::TexelRect::new(0.0, size.height as f32, size.width as f32, 0.0),
+ TexelRect::new(0.0, size.height as f32, size.width as f32, 0.0),
)
},
WebrenderImageHandlerType::Media => {
let (texture_id, size) = self.media_handler.as_mut().unwrap().lock(key.0);
(
texture_id,
- webrender_api::TexelRect::new(0.0, 0.0, size.width as f32, size.height as f32),
+ TexelRect::new(0.0, 0.0, size.width as f32, size.height as f32),
)
},
};