Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

the difference among copyXXX,cacheXXX and changeXXX

Post Reply
zonesowhat
8
8
Posts: 20
Joined: 2014-04-12 07:44

the difference among copyXXX,cacheXXX and changeXXX

Post by zonesowhat »

In the source code of Ultra VNC ,there exist three kinds of identifier:copyXXX(or copied_XXX somewhere),cacheXXX(or cached_XXX somewhere) and changeXXX(or changed_XXX somewhere).Those identifiers are used to identify buffers ,regions of desktop and may be others more.
I just can not distinguish them .

Code: Select all

// Get the changed/copied regions
		virtual const Region2D& get_changed_region() const {return changed;};
		virtual const Region2D& get_cached_region() const {return cached;};
		virtual const Region2D& get_copied_region() const {return copied;};
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: the difference among copyXXX,cacheXXX and changeXXX

Post by Rudi De Vos »

copy: copyrect ( server option)
If you move a window (0,0) (rect 50x50) to (100,50)
1) you tell the viewer to move his pixels (50x50) from position (0,0) to (100,50)
2) you ignore all updates in src+dest position
3) Next run you need to check for artifacts, bad or missing updates
The copyregion keep track of the region taht need to be scanned the next run

cache: It's a good old style unix copy under we use. ( server option)
1) You want to update rect (0,0)
2) you copy the orig data to a cache buffer
3) you update the pixels
Like before, this sometimes generate artifacts, so next run you need to check for mistakes

changed:
The hook or driver give hints about the positions that changed.
check_region
The check region is scanned for changes and the rsult is the changed_region
THis is the collection of rects with updates that need to be send to the viewer.

cache and copyrect are 2 simple methods to limit the data transfer between server and viewer.
It use some extra memeory and the server cpu need to work a little harder to verify next run.
Both can be enabled via the server options.
zonesowhat
8
8
Posts: 20
Joined: 2014-04-12 07:44

Re: the difference among copyXXX,cacheXXX and changeXXX

Post by zonesowhat »

Rudi De Vos wrote:copy: copyrect ( server option)
If you move a window (0,0) (rect 50x50) to (100,50)
1) you tell the viewer to move his pixels (50x50) from position (0,0) to (100,50)
2) you ignore all updates in src+dest position
3) Next run you need to check for artifacts, bad or missing updates
The copyregion keep track of the region taht need to be scanned the next run

cache: It's a good old style unix copy under we use. ( server option)
1) You want to update rect (0,0)
2) you copy the orig data to a cache buffer
3) you update the pixels
Like before, this sometimes generate artifacts, so next run you need to check for mistakes

changed:
The hook or driver give hints about the positions that changed.
check_region
The check region is scanned for changes and the rsult is the changed_region
THis is the collection of rects with updates that need to be send to the viewer.

cache and copyrect are 2 simple methods to limit the data transfer between server and viewer.
It use some extra memeory and the server cpu need to work a little harder to verify next run.
Both can be enabled via the server options.
Thanks for your detailed reply all the same!Although I can not understand it well in a short time .
zonesowhat
8
8
Posts: 20
Joined: 2014-04-12 07:44

Re: the difference among copyXXX,cacheXXX and changeXXX

Post by zonesowhat »

Then what is the copyrect on earth when recorded and sended?Is it a rect of (50x50) ,(100,50) or (50+100,50+50)?
The same question for others two.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6863
Joined: 2004-04-23 10:21
Contact:

Re: the difference among copyXXX,cacheXXX and changeXXX

Post by Rudi De Vos »

try it again.
There are 3 ways the server can send data to the viewer

1) rect of pixels:
you send position ( 20,20) and size (75x75) + data[5625pixels]
2) copyrect: a copyrect happen when you move a window on the screen
you send src (20,20), dest (90,150), size ( 89x45)
The viewer moves the pixels on his own screen from rect (20,20,109,45) to (90,150,179,195)
3) cache protocol : when you minimize/restore a window
The cache protocol try to reuse the old pixels
minimize -> save pixels
restore -> use save pixels
Both 2 and 3 is used for low bandwidth
zonesowhat
8
8
Posts: 20
Joined: 2014-04-12 07:44

Re: the difference among copyXXX,cacheXXX and changeXXX

Post by zonesowhat »

Many thanks!It cannot be more detailed!
Post Reply