On 04.06.2010, at 15:20, Corentin Chary wrote:

> Implement a threaded VNC server using the producer-consumer model.
> The main thread will push encoding jobs (a list a rectangles to update)
> in a queue, and the VNC worker thread will consume that queue and send
> framebuffer updates to the output buffer.

Hrm, does it merge the queue? So imagine the following gets put in the queue

[0,0] - [100,100]
[100,0] - [200,10]
[0,0] - [200,10]

Would that code try and merge those three queue entries? Because by adding the 
queue, you basically get rid of the automatic merging we get from the lazy 
dirty bitmap fetching.

Before we were processing each entry and checked the bitmap again, seeing a 
merged bitmap of previous actions. With this I assume you push to-be-updated 
regions into the queue and mark them as processed before they are? Or does the 
processed marking still happen in the worker? Wouldn't that be racy? Hrm.


Alex


Reply via email to