mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibGfx+Userland: Rename Size::scaled_by to Size::scaled
Ignoring Size for a second, we currently have: Rect::scale_by Rect::scaled Point::scale_by Point::scaled In Size, before this patch, we have: Size::scale_by Size::scaled_by This aligns Size to use the same method name as Rect and Point. While subjectively providing API symmetry, this is mostly to allow using this method in templated helpers without caring what the exact underlying type is.
This commit is contained in:
parent
f34cc0b8e3
commit
7c4b0b0389
4 changed files with 7 additions and 7 deletions
|
@ -787,10 +787,10 @@ DecoderErrorOr<void> Decoder::prepare_referenced_frame(Gfx::Size<u32> frame_size
|
|||
// − FrameHeight <= 16 * RefFrameHeight[ refIdx ]
|
||||
if (!reference_frame.is_valid())
|
||||
return DecoderError::format(DecoderErrorCategory::Corrupted, "Attempted to use reference frame {} that has not been saved", reference_frame_index);
|
||||
auto double_frame_size = frame_size.scaled_by(2);
|
||||
auto double_frame_size = frame_size.scaled(2);
|
||||
if (double_frame_size.width() < reference_frame.size.width() || double_frame_size.height() < reference_frame.size.height())
|
||||
return DecoderError::format(DecoderErrorCategory::Corrupted, "Inter frame size is too small relative to reference frame {}", reference_frame_index);
|
||||
if (!reference_frame.size.scaled_by(16).contains(frame_size))
|
||||
if (!reference_frame.size.scaled(16).contains(frame_size))
|
||||
return DecoderError::format(DecoderErrorCategory::Corrupted, "Inter frame size is too large relative to reference frame {}", reference_frame_index);
|
||||
|
||||
// FIXME: Convert all the operations in this function to vector operations supported by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue