LibGUI: Mark the first GWindow back bitmap volatile immediately

We were previously waiting until the first bitmap buffer flip happened
before marking the back buffer volatile.
This commit is contained in:
Andreas Kling 2019-12-09 21:33:39 +01:00
parent 571c4d3fb8
commit f8ec8cc255
Notes: sideshowbarker 2024-07-19 10:54:12 +09:00

View File

@ -547,6 +547,7 @@ void GWindow::flip(const Vector<Rect, 32>& dirty_rects)
if (!m_back_bitmap || m_back_bitmap->size() != m_front_bitmap->size()) {
m_back_bitmap = create_backing_bitmap(m_front_bitmap->size());
memcpy(m_back_bitmap->scanline(0), m_front_bitmap->scanline(0), m_front_bitmap->size_in_bytes());
m_back_bitmap->shared_buffer()->set_volatile();
return;
}