mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
This commit is contained in:
parent
2ff7cb5a37
commit
3d57c22e9c
133 changed files with 686 additions and 596 deletions
|
@ -26,7 +26,7 @@ compositing = {path = "../compositing"}
|
|||
crossbeam-channel = "0.3"
|
||||
debugger = {path = "../debugger"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
embedder_traits = { path = "../embedder_traits" }
|
||||
gfx = {path = "../gfx"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::pipeline::Pipeline;
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use msg::constellation_msg::{
|
||||
BrowsingContextGroupId, BrowsingContextId, PipelineId, TopLevelBrowsingContextId,
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ pub struct BrowsingContext {
|
|||
pub top_level_id: TopLevelBrowsingContextId,
|
||||
|
||||
/// The size of the frame.
|
||||
pub size: TypedSize2D<f32, CSSPixel>,
|
||||
pub size: Size2D<f32, CSSPixel>,
|
||||
|
||||
/// Whether this browsing context is in private browsing mode.
|
||||
pub is_private: bool,
|
||||
|
@ -76,7 +76,7 @@ impl BrowsingContext {
|
|||
top_level_id: TopLevelBrowsingContextId,
|
||||
pipeline_id: PipelineId,
|
||||
parent_pipeline_id: Option<PipelineId>,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
is_private: bool,
|
||||
is_visible: bool,
|
||||
) -> BrowsingContext {
|
||||
|
|
|
@ -113,7 +113,7 @@ use compositing::SendableFrameTree;
|
|||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
||||
use embedder_traits::{Cursor, EmbedderMsg, EmbedderProxy};
|
||||
use euclid::{Size2D, TypedScale, TypedSize2D};
|
||||
use euclid::{default::Size2D as UntypedSize2D, Scale, Size2D};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
|
@ -644,7 +644,7 @@ where
|
|||
/// Create a new constellation thread.
|
||||
pub fn start(
|
||||
state: InitialConstellationState,
|
||||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
device_pixels_per_px: Option<f32>,
|
||||
random_pipeline_closure_probability: Option<f32>,
|
||||
random_pipeline_closure_seed: Option<usize>,
|
||||
|
@ -738,8 +738,8 @@ where
|
|||
time_profiler_chan: state.time_profiler_chan,
|
||||
mem_profiler_chan: state.mem_profiler_chan,
|
||||
window_size: WindowSizeData {
|
||||
initial_viewport: initial_window_size.to_f32() * TypedScale::new(1.0),
|
||||
device_pixel_ratio: TypedScale::new(device_pixels_per_px.unwrap_or(1.0)),
|
||||
initial_viewport: initial_window_size.to_f32() * Scale::new(1.0),
|
||||
device_pixel_ratio: Scale::new(device_pixels_per_px.unwrap_or(1.0)),
|
||||
},
|
||||
phantom: PhantomData,
|
||||
webdriver: WebDriverData::new(),
|
||||
|
@ -903,7 +903,7 @@ where
|
|||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
parent_pipeline_id: Option<PipelineId>,
|
||||
opener: Option<BrowsingContextId>,
|
||||
initial_window_size: TypedSize2D<f32, CSSPixel>,
|
||||
initial_window_size: Size2D<f32, CSSPixel>,
|
||||
// TODO: we have to provide ownership of the LoadData
|
||||
// here, because it will be send on an ipc channel,
|
||||
// and ipc channels take onership of their data.
|
||||
|
@ -1078,7 +1078,7 @@ where
|
|||
top_level_id: TopLevelBrowsingContextId,
|
||||
pipeline_id: PipelineId,
|
||||
parent_pipeline_id: Option<PipelineId>,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
is_private: bool,
|
||||
is_visible: bool,
|
||||
) {
|
||||
|
@ -3341,7 +3341,7 @@ where
|
|||
|
||||
fn handle_create_canvas_paint_thread_msg(
|
||||
&mut self,
|
||||
size: Size2D<u64>,
|
||||
size: UntypedSize2D<u64>,
|
||||
response_sender: IpcSender<(IpcSender<CanvasMsg>, CanvasId)>,
|
||||
) {
|
||||
let webrender_api = self.webrender_api_sender.clone();
|
||||
|
@ -4015,7 +4015,7 @@ where
|
|||
// If the rectangle for this pipeline is zero sized, it will
|
||||
// never be painted. In this case, don't query the layout
|
||||
// thread as it won't contribute to the final output image.
|
||||
if browsing_context.size == TypedSize2D::zero() {
|
||||
if browsing_context.size == Size2D::zero() {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use compositing::CompositionPipeline;
|
|||
use compositing::CompositorProxy;
|
||||
use crossbeam_channel::Sender;
|
||||
use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg};
|
||||
use euclid::{TypedScale, TypedSize2D};
|
||||
use euclid::{Scale, Size2D};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -158,10 +158,10 @@ pub struct InitialPipelineState {
|
|||
pub mem_profiler_chan: profile_mem::ProfilerChan,
|
||||
|
||||
/// Information about the initial window size.
|
||||
pub window_size: TypedSize2D<f32, CSSPixel>,
|
||||
pub window_size: Size2D<f32, CSSPixel>,
|
||||
|
||||
/// Information about the device pixel ratio.
|
||||
pub device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
pub device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
|
||||
/// The event loop to run in, if applicable.
|
||||
pub event_loop: Option<Rc<EventLoop>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue