LibAccelGfx: Update scissor test after switching between painters

Since scissor clip rect is a part of OpenGL global state we need to
update it after switching between painters.
This commit is contained in:
Aliaksandr Kalenik 2023-12-05 10:27:03 +01:00 committed by Andreas Kling
parent 72f5461af4
commit a88807e5b3
Notes: sideshowbarker 2024-07-17 11:30:05 +09:00

View File

@ -604,6 +604,7 @@ void Painter::bind_target_canvas()
{
m_target_canvas->bind();
GL::set_viewport({ 0, 0, m_target_canvas->size().width(), m_target_canvas->size().height() });
GL::enable_scissor_test(state().clip_rect);
}
void Painter::set_target_canvas(NonnullRefPtr<Canvas> canvas)