mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-29 21:57:18 +00:00
LibAccelGfx+LibWeb: Implement SetClipRect and ClearClipRect commands
This commit is contained in:
parent
9e4d697d23
commit
01d938c77b
Notes:
sideshowbarker
2024-07-17 11:34:34 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 01d938c77b
Pull-request: https://github.com/SerenityOS/serenity/pull/21926
Reviewed-by: https://github.com/awesomekling
5 changed files with 32 additions and 3 deletions
|
@ -417,6 +417,16 @@ void Painter::restore()
|
|||
m_state_stack.take_last();
|
||||
}
|
||||
|
||||
void Painter::set_clip_rect(Gfx::IntRect rect)
|
||||
{
|
||||
GL::enable_scissor_test(rect);
|
||||
}
|
||||
|
||||
void Painter::clear_clip_rect()
|
||||
{
|
||||
GL::disable_scissor_test();
|
||||
}
|
||||
|
||||
void Painter::set_target_bitmap(Gfx::Bitmap& bitmap)
|
||||
{
|
||||
if (m_target_framebuffer.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue