mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
WindowServer: Calculate transparent frame occlusions
If a window frame has transparency, include these areas in the transparency rendering area so that we can render them flicker-free.
This commit is contained in:
parent
f1b5def8fd
commit
8ff34f96b6
2 changed files with 67 additions and 19 deletions
|
@ -62,6 +62,17 @@ public:
|
|||
|
||||
void start_flash_animation();
|
||||
|
||||
float opacity() const { return m_opacity; }
|
||||
|
||||
bool is_opaque() const
|
||||
{
|
||||
if (opacity() < 1.0f)
|
||||
return false;
|
||||
//if (has_alpha_channel())
|
||||
// return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void paint_notification_frame(Gfx::Painter&);
|
||||
void paint_normal_frame(Gfx::Painter&);
|
||||
|
@ -76,6 +87,7 @@ private:
|
|||
|
||||
RefPtr<Core::Timer> m_flash_timer;
|
||||
size_t m_flash_counter { 0 };
|
||||
float m_opacity { 1 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue