mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -72,8 +72,11 @@ impl OffscreenCanvas {
|
|||
)
|
||||
}
|
||||
|
||||
pub(crate) fn get_size(&self) -> Size2D<u64> {
|
||||
Size2D::new(self.Width(), self.Height())
|
||||
pub(crate) fn get_size(&self) -> Size2D<u32> {
|
||||
Size2D::new(
|
||||
self.Width().try_into().unwrap_or(u32::MAX),
|
||||
self.Height().try_into().unwrap_or(u32::MAX),
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) fn origin_is_clean(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue