mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:08:11 +00:00
WindowServer+LibGUI: Send the window size along with Paint server messages.
This way GWindow doesn't need to do synchronous IPC to fetch the appropriate size for the window's backing store. This is mostly only relevant during live resize.
This commit is contained in:
parent
1effe70543
commit
ae90043424
5 changed files with 12 additions and 5 deletions
|
@ -168,9 +168,9 @@ void GWindow::event(GEvent& event)
|
|||
auto rect = paint_event.rect();
|
||||
bool created_new_backing_store = !m_backing;
|
||||
if (!m_backing) {
|
||||
// NOTE: size() may change at any time since it's synchronously retrieved from the WindowServer.
|
||||
ASSERT(GEventLoop::main().server_pid());
|
||||
Size new_backing_store_size = size();
|
||||
ASSERT(!paint_event.window_size().is_empty());
|
||||
Size new_backing_store_size = paint_event.window_size();
|
||||
size_t size_in_bytes = new_backing_store_size.area() * sizeof(RGBA32);
|
||||
void* buffer;
|
||||
int shared_buffer_id = create_shared_buffer(GEventLoop::main().server_pid(), size_in_bytes, (void**)&buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue