[PATCH xserver v2] glamor: Handle bitplane in glamor_copy_fbo_cpu

Michel Dänzer michel at daenzer.net
Thu Aug 18 09:45:38 UTC 2016


On 15/08/16 11:18 PM, walter harms wrote:
> Am 15.08.2016 11:43, schrieb Michel Dänzer:
>>
>> diff --git a/glamor/glamor_copy.c b/glamor/glamor_copy.c
>> index 3501a0d..82e040a 100644
>> --- a/glamor/glamor_copy.c
>> +++ b/glamor/glamor_copy.c
>> @@ -222,9 +222,40 @@ glamor_copy_cpu_fbo(DrawablePtr src,
>>  
>>      fbGetDrawable(src, src_bits, src_stride, src_bpp, src_xoff, src_yoff);
>>  
>> -    glamor_upload_boxes(dst_pixmap, box, nbox, src_xoff + dx, src_yoff + dy,
>> -                        dst_xoff, dst_yoff,
>> -                        (uint8_t *) src_bits, src_stride * sizeof (FbBits));
> 
> 
> my i suggest to invert the question to improve readability ?
> 
> 	if (!bitplane) {
> 	            glamor_upload_boxes(dst_pixmap, box, nbox, src_xoff + dx, src_yoff + dy,
>                             dst_xoff, dst_yoff,
>                             (uint8_t *) src_bits, src_stride * sizeof (FbBits));
>                     glamor_finish_access(src);
> 	            return TRUE;
> 	      }
> 
> btw: i hope return TRUE is intended here

Yes, it is.


> and then the rest ...

Thanks for your suggestion. I don't agree that it would improve
readability, but it did make me realize other potential to slightly
simplify the patch, see v3.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer



More information about the xorg-devel mailing list