1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:08:11 +00:00

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

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;
}