mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Initial move of canvas/context/snapshot size from u64 -> u32
Changed the two instances of `euclid::default::Size2D<u64>` in `servo/components/script/canvas_context.rs` and `servo/components/shared/snapshot/lib.rs` that were outlined as the bare minimum in "Make canvas/context/snapshot size be u32 everywhere" to `euclid::default::Size2D<u32>`. Every other change made in this commit is either: - of similar nature, and is the minimum that would allow compilation - resolving lints triggered by the former More might be needed to complete the issue, but I feel like this is a good starting point. This commit includes changes to the following components: - canvas - pixels - script - shared/canvas - shared/snapshot Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
This commit is contained in:
parent
c94605b13e
commit
326a2e9ab6
14 changed files with 53 additions and 53 deletions
|
@ -129,10 +129,7 @@ impl XRWebGLLayer {
|
|||
HTMLCanvasElementOrOffscreenCanvas::HTMLCanvasElement(canvas) => canvas.get_size(),
|
||||
HTMLCanvasElementOrOffscreenCanvas::OffscreenCanvas(canvas) => {
|
||||
let size = canvas.get_size();
|
||||
Size2D::new(
|
||||
size.width.try_into().unwrap_or(0),
|
||||
size.height.try_into().unwrap_or(0),
|
||||
)
|
||||
Size2D::new(size.width, size.height)
|
||||
},
|
||||
};
|
||||
Size2D::from_untyped(size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue