1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:17:46 +00:00

Meta+Userland: Pass Gfx::IntSize by value

Just two ints like Gfx::IntPoint.
This commit is contained in:
MacDue 2022-12-06 21:35:32 +00:00 committed by Andreas Kling
parent e011eafd37
commit 27fae78335
63 changed files with 142 additions and 142 deletions

View file

@ -345,7 +345,7 @@ void BrowsingContext::set_viewport_rect(Gfx::IntRect const& rect)
HTML::main_thread_event_loop().schedule();
}
void BrowsingContext::set_size(Gfx::IntSize const& size)
void BrowsingContext::set_size(Gfx::IntSize size)
{
if (m_size == size)
return;

View file

@ -134,8 +134,8 @@ public:
Page* page() { return m_page; }
Page const* page() const { return m_page; }
Gfx::IntSize const& size() const { return m_size; }
void set_size(Gfx::IntSize const&);
Gfx::IntSize size() const { return m_size; }
void set_size(Gfx::IntSize);
void set_needs_display();
void set_needs_display(Gfx::IntRect const&);

View file

@ -82,8 +82,8 @@ public:
Gfx::IntPoint window_position() const { return m_window_position; }
void set_window_position(Gfx::IntPoint position) { m_window_position = position; }
Gfx::IntSize const& window_size() const { return m_window_size; }
void set_window_size(Gfx::IntSize const& size) { m_window_size = size; }
Gfx::IntSize window_size() const { return m_window_size; }
void set_window_size(Gfx::IntSize size) { m_window_size = size; }
void did_request_alert(DeprecatedString const& message);
void alert_closed();
@ -146,7 +146,7 @@ public:
virtual void page_did_request_navigate_back() { }
virtual void page_did_request_navigate_forward() { }
virtual void page_did_request_refresh() { }
virtual Gfx::IntSize page_did_request_resize_window(Gfx::IntSize const&) { return {}; }
virtual Gfx::IntSize page_did_request_resize_window(Gfx::IntSize) { return {}; }
virtual Gfx::IntPoint page_did_request_reposition_window(Gfx::IntPoint) { return {}; }
virtual void page_did_request_restore_window() { }
virtual Gfx::IntRect page_did_request_maximize_window() { return {}; }

View file

@ -209,7 +209,7 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& re
}
}
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize const& corners_size)
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize corners_size)
{
auto allocate_mask_bitmap = [&]() -> RefPtr<Gfx::Bitmap> {
auto bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, corners_size);

View file

@ -71,7 +71,7 @@ struct BordersData {
CSS::BorderData left;
};
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize const& corners_size);
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize corners_size);
void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& rect, BorderRadiiData const& border_radii_data, BordersData const& borders_data);
void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiiData const& border_radii_data, BordersData const&);

View file

@ -20,12 +20,12 @@ static float normalized_gradient_angle_radians(float gradient_angle)
return real_angle * (AK::Pi<float> / 180);
}
static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float sin_angle, float cos_angle)
static float calulate_gradient_length(Gfx::IntSize gradient_size, float sin_angle, float cos_angle)
{
return AK::fabs(gradient_size.height() * sin_angle) + AK::fabs(gradient_size.width() * cos_angle);
}
static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float gradient_angle)
static float calulate_gradient_length(Gfx::IntSize gradient_size, float gradient_angle)
{
float angle = normalized_gradient_angle_radians(gradient_angle);
float sin_angle, cos_angle;