OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:33 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Dirty areas in gui
PostPosted: Sun Sep 26, 2021 12:19 pm 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
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!!...


Top
 Profile  
 
 Post subject: Re: Dirty areas in gui
PostPosted: Sun Sep 26, 2021 12:37 pm 
Offline
Member
Member
User avatar

Joined: Thu Mar 04, 2021 7:25 am
Posts: 31
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.
Kamal123 wrote:
If clients sends dirty list every time, then server side will become slow!!...
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.

_________________
mid.net.ua


Last edited by mid on Sun Sep 26, 2021 3:49 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Dirty areas in gui
PostPosted: Sun Sep 26, 2021 1:35 pm 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
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.
Kamal123 wrote:
If clients sends dirty list every time, then server side will become slow!!...
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.


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?


Top
 Profile  
 
 Post subject: Re: Dirty areas in gui
PostPosted: Sun Sep 26, 2021 2:52 pm 
Offline
Member
Member
User avatar

Joined: Thu Mar 04, 2021 7:25 am
Posts: 31
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?
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.

_________________
mid.net.ua


Top
 Profile  
 
 Post subject: Re: Dirty areas in gui
PostPosted: Mon Sep 27, 2021 8:45 am 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
mid wrote:
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?
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.


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?


Top
 Profile  
 
 Post subject: Re: Dirty areas in gui
PostPosted: Tue Sep 28, 2021 12:08 pm 
Offline
Member
Member
User avatar

Joined: Thu Mar 04, 2021 7:25 am
Posts: 31
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?


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?

_________________
mid.net.ua


Top
 Profile  
 
 Post subject: Re: Dirty areas in gui
PostPosted: Tue Sep 28, 2021 1:08 pm 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
mid wrote:
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?


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?


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 mouse


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot] and 84 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group