[PATCH 05/16] sna: use GCPtr instead of GC *

Enrico Weigelt, metux IT consult lkml at metux.net
Wed Apr 9 14:48:05 UTC 2025


On 21.03.25 23:05, Ville Syrjälä wrote:

>>   				       struct kgem_bo *bo,
>>   				       uint32_t br00, uint32_t br13,
>> -				       const GC *gc,
>> +				       const GCPtr gc,
>
> These two are not the same. One is a non-const pointer to a
> const GC, the other is a const pointer to a non-const GC.

Feel free to change it as you wish - we just need to change to GCPtr in
order to rename GC to GCRec, in order to get rid of some really ugly
hacks in Xnest (because Xlib also an entirely different type named "GC")

https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1393




>
>>   				       const BoxRec *box,
>>   				       const DDXPointRec *origin)
>>   {
>> @@ -14412,7 +14412,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
>>   				  struct kgem_bo *bo,
>>   				  struct kgem_bo **tile,
>>   				  uint32_t br00, uint32_t br13,
>> -				  const GC *gc,
>> +				  const GCPtr gc,
>>   				  const BoxRec *box,
>>   				  const DDXPointRec *origin)
>>   {
>> --
>> 2.39.5
>

--
---
All racism is bad. All lives matter.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287



More information about the Intel-gfx mailing list