Hi, In compositing window manager, how clients tells the window manager for each dirty areas to repaint? Does it sends a list of rectangles to server? Or server detects dirty areas by pixel comparison of previous rendered image and currently rendering image?
How do live games updates each dirty areas? If clients sends dirty list every time, then server side will become slow!!...
Dirty areas in gui
Re: Dirty areas in gui
In my design, clients only handle the main content and respond to events, analogous to HTML & JavaScript in a web page. The server is what handles all of the drawing and layouting. In the case clients absolutely need to draw manually, they send drawing commands to the server or, in the worst case, send one "update entire window" command when needed.
Usually games redraw the entire screen each frame anyway (and they must if using perspective 3D) so this is only a problem if you're considering very old hardware. EDIT: Or huge framebuffers.Kamal123 wrote:If clients sends dirty list every time, then server side will become slow!!...
Last edited by mid on Sun Sep 26, 2021 3:49 pm, edited 1 time in total.
Re: Dirty areas in gui
Thanks for your reply, what happens if two or more clients are sending dirty area update message to the server at same time? Server can't handle two messages at same time. How do you solve that problem?mid wrote:In my design, clients only handle the main content and respond to events, analogous to HTML & JavaScript in a web page. The server is what handles all of the drawing and layouting. In the case clients absolutely need to draw manually, they send drawing commands to the server or, in the worst case, send one "update entire window" command when needed.Usually games redraw the entire screen each frame anyway (and they must if using perspective 3D) so this is only a problem if you're considering very old hardware.Kamal123 wrote:If clients sends dirty list every time, then server side will become slow!!...
Re: Dirty areas in gui
Well, the simple answer is that it can't be at the same time. Either you use a synchronous model where the first task to run will send the message first, and thus interrupt the server first, or you use an asynchronous model where the server will have to process the messages serially.Kamal123 wrote:Thanks for your reply, what happens if two or more clients are sending dirty area update message to the server at same time? Server can't handle two messages at same time. How do you solve that problem?
Re: Dirty areas in gui
Hi, thank you, I have implemented a model in which some clients tell the server to draw the window in every frames and second model is that some window which don't require live updates will send dirty rectangles to the server, for specific areas to be updated. Suppose I have a 2d game running, which requires live updates, then it will tell the server to set the live update bit and render the window in every frames, for which my mouse cursor movement become slow. How do you fix mouse movement speed, even when the whole screen is updating? I use dirty areas for mouse movement, like old position gets repainted. How do you make mouse movements smooth , while whole screen is updating?mid wrote:Well, the simple answer is that it can't be at the same time. Either you use a synchronous model where the first task to run will send the message first, and thus interrupt the server first, or you use an asynchronous model where the server will have to process the messages serially.Kamal123 wrote:Thanks for your reply, what happens if two or more clients are sending dirty area update message to the server at same time? Server can't handle two messages at same time. How do you solve that problem?
Re: Dirty areas in gui
I can't really help you here, since we're delving into implementation details. Does it (the mouse) become slow overall or only when in front of the game?Kamal123 wrote:Hi, thank you, I have implemented a model in which some clients tell the server to draw the window in every frames and second model is that some window which don't require live updates will send dirty rectangles to the server, for specific areas to be updated. Suppose I have a 2d game running, which requires live updates, then it will tell the server to set the live update bit and render the window in every frames, for which my mouse cursor movement become slow. How do you fix mouse movement speed, even when the whole screen is updating? I use dirty areas for mouse movement, like old position gets repainted. How do you make mouse movements smooth , while whole screen is updating?
Re: Dirty areas in gui
Only in front of games where screen update is occurring at every frame. But for normal windows, movement of cursor is smooth. I use ps/2 mousemid wrote:I can't really help you here, since we're delving into implementation details. Does it (the mouse) become slow overall or only when in front of the game?Kamal123 wrote:Hi, thank you, I have implemented a model in which some clients tell the server to draw the window in every frames and second model is that some window which don't require live updates will send dirty rectangles to the server, for specific areas to be updated. Suppose I have a 2d game running, which requires live updates, then it will tell the server to set the live update bit and render the window in every frames, for which my mouse cursor movement become slow. How do you fix mouse movement speed, even when the whole screen is updating? I use dirty areas for mouse movement, like old position gets repainted. How do you make mouse movements smooth , while whole screen is updating?