On 2/10/12 11:15 AM, Pierre Ossman wrote:
>> You mean this code?
>>
>>     if (ig->willTransform()) {
>>       ig->translatePixels(pixels, &solidColor, 1);
>>       pixels = (PIXEL_T *)&solidColor;
>>     }
>>
>> I don't follow.  As you can see, it changes the value of the "pixels"
>> pointer so that it points at the local "solidColor" variable and no
>> longer at the framebuffer, so the framebuffer is not modified.  I can't
>> see any other place in the code where the framebuffer was being modified.
> 
> But ig->willTransform() can return false, which is even the common case.

OK, so then why couldn't we just do:

    if (ig->willTransform())
      ig->translatePixels(pixels, &solidColor, 1);
    else
      solidColor = pixels[0];
    pixels = (PIXEL_T *)&solidColor;

or even just take out the ig->willTransform() test altogether, since
translatePixels() should have negligible overhead on just one pixel?
That's a much less potentially disruptive change.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to