mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
Refactor GUI rendering model to be two-phased.
Instead of clients painting whenever they feel like it, we now ask that they paint in response to a paint message. After finishing painting, clients notify the WindowServer about the rect(s) they painted into and then flush eventually happens, etc. This stuff leaves us with a lot of badly named things. Need to fix that.
This commit is contained in:
@@ -18,18 +18,16 @@ GraphicsBitmap::GraphicsBitmap(Process& process, const Size& size)
|
||||
, m_pitch(size.width() * sizeof(RGBA32))
|
||||
, m_client_process(&process)
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
size_t size_in_bytes = size.width() * size.height() * sizeof(RGBA32);
|
||||
auto vmo = VMObject::create_anonymous(size_in_bytes);
|
||||
m_client_region = process.allocate_region_with_vmo(LinearAddress(), size_in_bytes, vmo.copyRef(), 0, "GraphicsBitmap (client)", true, true);
|
||||
m_client_region->set_shared(true);
|
||||
m_client_region->commit();
|
||||
auto& server = WSEventLoop::the().server_process();
|
||||
m_server_region = server.allocate_region_with_vmo(LinearAddress(), size_in_bytes, move(vmo), 0, "GraphicsBitmap (server)", true, false);
|
||||
m_server_region->set_shared(true);
|
||||
|
||||
{
|
||||
auto& server = WSEventLoop::the().server_process();
|
||||
InterruptDisabler disabler;
|
||||
m_server_region = server.allocate_region_with_vmo(LinearAddress(), size_in_bytes, move(vmo), 0, "GraphicsBitmap (server)", true, false);
|
||||
m_server_region->set_shared(true);
|
||||
}
|
||||
m_data = (RGBA32*)m_server_region->laddr().as_ptr();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user