qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1 of 3] [UPDATE] vnc dynamic resolution


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH 1 of 3] [UPDATE] vnc dynamic resolution
Date: Mon, 08 Sep 2008 15:32:45 +0100
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Anthony Liguori wrote:

> Stefano Stabellini wrote:
>> Anthony Liguori wrote:
>>  
>>> "Red-max is the maximum red value (= 2n − 1 where n is the
>>> number of
>>> bits used for red)."
>>>
>>> Is this just overzealous checks or was a fix for a broken client?
>>>     
>>
>>
>> This code is meant to convert pixels from the vnc server internal pixel
>> format to the vnc client pixel format.
>> red_max refers to the vnc client red max, while red_max1 refers to the
>> vnc server internal red max.
>> Before we were just handling the case red_max1 = 0xff, this code should
>> be able to handle other cases as well (necessary for handling the shared
>> buffer).
>> Does this answer your question? May be with the assumption that red_max
>> = 2^n - 1 is still possible to simplify the conversion code...
>>   
> 
> Perhaps the source of my confusion is the use of red_max and red_max1. 
> Could you try some more descriptive names?  I understand what the code
> is doing now but it's very easy to confuse the two masks.
> 

I understand.
I went with red_max1 because we were already using this "notation" with
red_shift and red_shift1.
How do you suggest I should call them?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]