diff mbox series

[v6,15/23] ui/gl: opengl doesn't require PIXMAN

Message ID 20231025190818.3278423-16-marcandre.lureau@redhat.com
State Handled Elsewhere
Headers show
Series Make Pixman an optional dependency | expand

Commit Message

Marc-André Lureau Oct. 25, 2023, 7:08 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

The QEMU fallback covers the requirements. We still need the flags of
header inclusion with CONFIG_PIXMAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Huth Oct. 26, 2023, 5:39 a.m. UTC | #1
On 25/10/2023 21.08, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The QEMU fallback covers the requirements. We still need the flags of
> header inclusion with CONFIG_PIXMAN.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   ui/meson.build | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ui/meson.build b/ui/meson.build
> index 3085e10a72..7c99613950 100644
> --- a/ui/meson.build
> +++ b/ui/meson.build
> @@ -60,8 +60,8 @@ endif
>   system_ss.add(opengl)
>   if opengl.found()
>     opengl_ss = ss.source_set()
> -  opengl_ss.add(gbm)
> -  opengl_ss.add(when: [opengl, pixman],
> +  opengl_ss.add(gbm, pixman)

I don't quite get the above line (sorry, meson ignorant here) ... does 
"pixman" simply get ignored here if it has not been found?

  Thomas


> +  opengl_ss.add(when: [opengl],
>                  if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
>     ui_modules += {'opengl' : opengl_ss}
>   endif
Marc-André Lureau Oct. 26, 2023, 8:09 a.m. UTC | #2
Hi

On Thu, Oct 26, 2023 at 10:44 AM Thomas Huth <thuth@redhat.com> wrote:
>
> On 25/10/2023 21.08, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > The QEMU fallback covers the requirements. We still need the flags of
> > header inclusion with CONFIG_PIXMAN.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >   ui/meson.build | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/ui/meson.build b/ui/meson.build
> > index 3085e10a72..7c99613950 100644
> > --- a/ui/meson.build
> > +++ b/ui/meson.build
> > @@ -60,8 +60,8 @@ endif
> >   system_ss.add(opengl)
> >   if opengl.found()
> >     opengl_ss = ss.source_set()
> > -  opengl_ss.add(gbm)
> > -  opengl_ss.add(when: [opengl, pixman],
> > +  opengl_ss.add(gbm, pixman)
>
> I don't quite get the above line (sorry, meson ignorant here) ... does
> "pixman" simply get ignored here if it has not been found?
>

Yes, when it is 'not_found", it's simply ignored. Essentially, this is
making pixman from required to optional to build the opengl source
set.
Thomas Huth Oct. 26, 2023, 8:45 a.m. UTC | #3
On 26/10/2023 10.09, Marc-André Lureau wrote:
> Hi
> 
> On Thu, Oct 26, 2023 at 10:44 AM Thomas Huth <thuth@redhat.com> wrote:
>>
>> On 25/10/2023 21.08, marcandre.lureau@redhat.com wrote:
>>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>
>>> The QEMU fallback covers the requirements. We still need the flags of
>>> header inclusion with CONFIG_PIXMAN.
>>>
>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> ---
>>>    ui/meson.build | 4 ++--
>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/ui/meson.build b/ui/meson.build
>>> index 3085e10a72..7c99613950 100644
>>> --- a/ui/meson.build
>>> +++ b/ui/meson.build
>>> @@ -60,8 +60,8 @@ endif
>>>    system_ss.add(opengl)
>>>    if opengl.found()
>>>      opengl_ss = ss.source_set()
>>> -  opengl_ss.add(gbm)
>>> -  opengl_ss.add(when: [opengl, pixman],
>>> +  opengl_ss.add(gbm, pixman)
>>
>> I don't quite get the above line (sorry, meson ignorant here) ... does
>> "pixman" simply get ignored here if it has not been found?
>>
> 
> Yes, when it is 'not_found", it's simply ignored. Essentially, this is
> making pixman from required to optional to build the opengl source
> set.

All right, then I think the patch is fine:

Reviewed-by: Thomas Huth <thuth@redhat.com>

But one more cosmetic question:

+  opengl_ss.add(when: [opengl],
                  if_true: files('shader.c', 'console-gl.c', 
'egl-helpers.c', 'egl-context.c'))

Do we still need the "when: [opengl]" part here? ... there is already the 
"if opengl.found()" earlier in this file, so it looks like this is not 
necessary anymore now?

  Thomas
Marc-André Lureau Oct. 30, 2023, 10:24 a.m. UTC | #4
Hi

On Thu, Oct 26, 2023 at 12:45 PM Thomas Huth <thuth@redhat.com> wrote:
>
> On 26/10/2023 10.09, Marc-André Lureau wrote:
> > Hi
> >
> > On Thu, Oct 26, 2023 at 10:44 AM Thomas Huth <thuth@redhat.com> wrote:
> >>
> >> On 25/10/2023 21.08, marcandre.lureau@redhat.com wrote:
> >>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >>>
> >>> The QEMU fallback covers the requirements. We still need the flags of
> >>> header inclusion with CONFIG_PIXMAN.
> >>>
> >>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >>> ---
> >>>    ui/meson.build | 4 ++--
> >>>    1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/ui/meson.build b/ui/meson.build
> >>> index 3085e10a72..7c99613950 100644
> >>> --- a/ui/meson.build
> >>> +++ b/ui/meson.build
> >>> @@ -60,8 +60,8 @@ endif
> >>>    system_ss.add(opengl)
> >>>    if opengl.found()
> >>>      opengl_ss = ss.source_set()
> >>> -  opengl_ss.add(gbm)
> >>> -  opengl_ss.add(when: [opengl, pixman],
> >>> +  opengl_ss.add(gbm, pixman)
> >>
> >> I don't quite get the above line (sorry, meson ignorant here) ... does
> >> "pixman" simply get ignored here if it has not been found?
> >>
> >
> > Yes, when it is 'not_found", it's simply ignored. Essentially, this is
> > making pixman from required to optional to build the opengl source
> > set.
>
> All right, then I think the patch is fine:
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
> But one more cosmetic question:
>
> +  opengl_ss.add(when: [opengl],
>                   if_true: files('shader.c', 'console-gl.c',
> 'egl-helpers.c', 'egl-context.c'))
>
> Do we still need the "when: [opengl]" part here? ... there is already the
> "if opengl.found()" earlier in this file, so it looks like this is not
> necessary anymore now?

Yes, to get the flags for those units.
diff mbox series

Patch

diff --git a/ui/meson.build b/ui/meson.build
index 3085e10a72..7c99613950 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -60,8 +60,8 @@  endif
 system_ss.add(opengl)
 if opengl.found()
   opengl_ss = ss.source_set()
-  opengl_ss.add(gbm)
-  opengl_ss.add(when: [opengl, pixman],
+  opengl_ss.add(gbm, pixman)
+  opengl_ss.add(when: [opengl],
                if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
   ui_modules += {'opengl' : opengl_ss}
 endif