mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -534,7 +534,7 @@ impl WebGL2RenderingContext {
|
|||
let src_origin = Point2D::new(x, y);
|
||||
let src_size = Size2D::new(width as u32, height as u32);
|
||||
let fb_size = Size2D::new(fb_width as u32, fb_height as u32);
|
||||
match pixels::clip(src_origin, src_size.to_u64(), fb_size.to_u64()) {
|
||||
match pixels::clip(src_origin, src_size.to_u32(), fb_size.to_u32()) {
|
||||
Some(rect) => rect.to_u32(),
|
||||
None => return,
|
||||
}
|
||||
|
@ -2183,7 +2183,7 @@ impl WebGL2RenderingContextMethods<crate::DomTypeHolder> for WebGL2RenderingCont
|
|||
let src_origin = Point2D::new(x, y);
|
||||
let src_size = Size2D::new(width as u32, height as u32);
|
||||
let fb_size = Size2D::new(fb_width as u32, fb_height as u32);
|
||||
if pixels::clip(src_origin, src_size.to_u64(), fb_size.to_u64()).is_none() {
|
||||
if pixels::clip(src_origin, src_size.to_u32(), fb_size.to_u32()).is_none() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue