[PATCH 05/16] sna: use GCPtr instead of GC *
Ville Syrjälä
ville.syrjala at linux.intel.com
Fri Mar 21 22:05:31 UTC 2025
On Tue, Mar 04, 2025 at 04:57:58PM +0100, Enrico Weigelt, metux IT consult wrote:
> Xserver includes have explicit pointer types for quite all kind of structs
> (at least those used by drivers), which are used all over the Xserver.
> Thus it's much cleaner to use those everywhere.
>
> This commit also clears the road to fix a horrible nightmare of hacks just
> needed to circumvent naming clashes between Xserver and Xlib (affecting all
> DDXes that are painting on another Xserver): we can simply rename Xserver's
> own "GC" type to "GCRec" (the usual naming convention here) and so no trouble
> with Xlib's "GC" type anymore. Once this has landed, we're free to do that
> without breaking this driver.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
> ---
> src/sna/sna_accel.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
> index 89b82afa..90a61ab3 100644
> --- a/src/sna/sna_accel.c
> +++ b/src/sna/sna_accel.c
> @@ -14300,7 +14300,7 @@ static void
> sna_poly_fill_rect_stippled_n_box__imm(struct sna *sna,
> 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.
> 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
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list