mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Change canvas/context/snapshot size from u64 -> u32 (#36827)
Replaces uses of `euclid::default::Size2D<u64>` with
`euclid::default::Size2D<u32>` for the canvas/context/snapshot.
This PR includes changes to the following components:
- canvas
- pixels
- script
- script_bindings
- shared/canvas
- shared/snapshot
Testing: https://github.com/hashcatHitman/servo/actions/runs/15426115391
(as of 892edc0048
)
Fixes: #36706
---------
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
This commit is contained in:
parent
87de9fdf8c
commit
a625420b23
14 changed files with 69 additions and 69 deletions
|
@ -154,8 +154,8 @@ impl ImageData {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub(crate) unsafe fn get_rect(&self, rect: Rect<u64>) -> Cow<[u8]> {
|
||||
pixels::rgba8_get_rect(self.as_slice(), self.get_size().to_u64(), rect)
|
||||
pub(crate) unsafe fn get_rect(&self, rect: Rect<u32>) -> Cow<[u8]> {
|
||||
pixels::rgba8_get_rect(self.as_slice(), self.get_size().to_u32(), rect)
|
||||
}
|
||||
|
||||
pub(crate) fn get_size(&self) -> Size2D<u32> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue