mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
Meta+Userland: Pass Gfx::Color by value
Gfx::Color is always 4 bytes (it's just a wrapper over u32) it's less work just to pass the color directly. This also updates IPCCompiler to prevent from generating Gfx::Color const &, which makes replacement easier.
This commit is contained in:
parent
f76c7f3788
commit
bbc149ebb9
28 changed files with 65 additions and 54 deletions
|
@ -1642,13 +1642,13 @@ private:
|
|||
class ShadowStyleValue final : public StyleValue {
|
||||
public:
|
||||
static NonnullRefPtr<ShadowStyleValue>
|
||||
create(Color const& color, Length const& offset_x, Length const& offset_y, Length const& blur_radius, Length const& spread_distance, ShadowPlacement placement)
|
||||
create(Color color, Length const& offset_x, Length const& offset_y, Length const& blur_radius, Length const& spread_distance, ShadowPlacement placement)
|
||||
{
|
||||
return adopt_ref(*new ShadowStyleValue(color, offset_x, offset_y, blur_radius, spread_distance, placement));
|
||||
}
|
||||
virtual ~ShadowStyleValue() override = default;
|
||||
|
||||
Color const& color() const { return m_color; }
|
||||
Color color() const { return m_color; }
|
||||
Length const& offset_x() const { return m_offset_x; }
|
||||
Length const& offset_y() const { return m_offset_y; }
|
||||
Length const& blur_radius() const { return m_blur_radius; }
|
||||
|
@ -1659,7 +1659,7 @@ public:
|
|||
virtual bool equals(StyleValue const& other) const override;
|
||||
|
||||
private:
|
||||
explicit ShadowStyleValue(Color const& color, Length const& offset_x, Length const& offset_y, Length const& blur_radius, Length const& spread_distance, ShadowPlacement placement)
|
||||
explicit ShadowStyleValue(Color color, Length const& offset_x, Length const& offset_y, Length const& blur_radius, Length const& spread_distance, ShadowPlacement placement)
|
||||
: StyleValue(Type::Shadow)
|
||||
, m_color(color)
|
||||
, m_offset_x(offset_x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue