summaryrefslogtreecommitdiff
path: root/SharedGraphics/GraphicsBitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SharedGraphics/GraphicsBitmap.cpp')
-rw-r--r--SharedGraphics/GraphicsBitmap.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/SharedGraphics/GraphicsBitmap.cpp b/SharedGraphics/GraphicsBitmap.cpp
index c90c3aef46..c6a1177ba8 100644
--- a/SharedGraphics/GraphicsBitmap.cpp
+++ b/SharedGraphics/GraphicsBitmap.cpp
@@ -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