[haiku-development] Re: Reading the Mouse Cursor and Dirty Screen

  • From: looncraz <looncraz@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 29 Mar 2015 13:32:59 -0500

On 3/29/2015 13:15, Alexander G. M. Smith wrote:
Looks correct to me. I see you used your exclude region feature to cut out the test window itself, otherwise you'd see the recursive out to infinity view of the whole screen (which happens if you run the VNC client on the same machine as the server).

Yes, though the update events were still being fired for that occurrence, so I'm remedying that with a bit of a redesign.

In other words, it captures the current pixel data only when Update() is called, but updates the dirty region continuously between Update() calls?

Correct, Update() can be called at any rate, the server-side UpdateStream is updated at a fixed rate regardless, but client side region and bitmap are only updated on Update(), which is frame limited to 60hz max, but can be reduced. (I've changed things slightly since the last commit).

Sounds pretty good! The CPU and memory usage were nice and low in your demo video. How about on slower machines, where the memory bus is only a couple of hundred megabytes per second? Guess I should fire up my Pentium III and see how well it works, once I update VNCServer to use your new update system and build Haiku from your branch. - Alex

I've further reduced memory usage (by nearly half!) and CPU usage by moving drawing code fully to the server and slowing down the batch update rate for the frame buffer to ~60hz (from ~120).

I really can't speak as to how well this will work on a super-slow machine, that will really depend on the resolution and the size of the updated region along with memory bandwidth. But the same changes I'm making now should help even more there.

I will be making a few client-side changes soon, but the same code should work. I will be adding the ability to obscure a specific window, such that only the visible portion of the window is blocked from view.

If you have feature requests, please let me know!

--The loon



Other related posts: