[v1,2/7] meson: Add `egl.cpp` to sources alongside `debayer_egl.cpp`
diff mbox series

Message ID 20260129164032.1380169-2-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [v1,1/7] meson: Drop unnecessary egl, gles feature defines
Related show

Commit Message

Barnabás Pőcze Jan. 29, 2026, 4:40 p.m. UTC
There are no other users of `egl.cpp`, so simplify by adding
it the sources array at the same time.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 src/libcamera/meson.build              | 3 ---
 src/libcamera/software_isp/meson.build | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Milan Zamazal Jan. 30, 2026, 1:07 p.m. UTC | #1
Hi Barnabás,

thank you for the cleanup.

Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:

> There are no other users of `egl.cpp`, so simplify by adding
> it the sources array at the same time.

"it to the ..."?

>
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
>  src/libcamera/meson.build              | 3 ---
>  src/libcamera/software_isp/meson.build | 1 +
>  2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index c6c109a30..28ce93de6 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -75,9 +75,6 @@ libegl = dependency('egl', required : false)
>  libglesv2 = dependency('glesv2', required : false)
>  
>  if mesa_works
> -    libcamera_internal_sources += files([
> -        'egl.cpp',
> -    ])
>      gles_headless_enabled = true
>  else
>      gles_headless_enabled = false
> diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
> index c61ac7d59..a55b76b58 100644
> --- a/src/libcamera/software_isp/meson.build
> +++ b/src/libcamera/software_isp/meson.build
> @@ -19,6 +19,7 @@ libcamera_internal_sources += files([
>  if softisp_enabled and gles_headless_enabled
>      config_h.set('HAVE_DEBAYER_EGL', 1)
>      libcamera_internal_sources += files([
> +        '../egl.cpp',

Should egl.cpp be moved to this directory then?

>          'debayer_egl.cpp',
>      ])
>  endif
Laurent Pinchart Jan. 30, 2026, 2:02 p.m. UTC | #2
On Fri, Jan 30, 2026 at 02:07:20PM +0100, Milan Zamazal wrote:
> Hi Barnabás,
> 
> thank you for the cleanup.
> 
> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:
> 
> > There are no other users of `egl.cpp`, so simplify by adding
> > it the sources array at the same time.
> 
> "it to the ..."?
> 
> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> > ---
> >  src/libcamera/meson.build              | 3 ---
> >  src/libcamera/software_isp/meson.build | 1 +
> >  2 files changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> > index c6c109a30..28ce93de6 100644
> > --- a/src/libcamera/meson.build
> > +++ b/src/libcamera/meson.build
> > @@ -75,9 +75,6 @@ libegl = dependency('egl', required : false)
> >  libglesv2 = dependency('glesv2', required : false)
> >  
> >  if mesa_works
> > -    libcamera_internal_sources += files([
> > -        'egl.cpp',
> > -    ])
> >      gles_headless_enabled = true
> >  else
> >      gles_headless_enabled = false
> > diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
> > index c61ac7d59..a55b76b58 100644
> > --- a/src/libcamera/software_isp/meson.build
> > +++ b/src/libcamera/software_isp/meson.build
> > @@ -19,6 +19,7 @@ libcamera_internal_sources += files([
> >  if softisp_enabled and gles_headless_enabled
> >      config_h.set('HAVE_DEBAYER_EGL', 1)
> >      libcamera_internal_sources += files([
> > +        '../egl.cpp',
> 
> Should egl.cpp be moved to this directory then?

In the not too distant future I would like to refactor the code to
create a GPU processing class that will be available to other pipeline
handlers, independently from the soft ISP. At that point egl.cpp will
probably go to src/libcamera/gpu/. I don't mind where we store it for
the time being.

> >          'debayer_egl.cpp',
> >      ])
> >  endif
Barnabás Pőcze Feb. 5, 2026, 10:33 a.m. UTC | #3
2026. 01. 30. 15:02 keltezéssel, Laurent Pinchart írta:
> On Fri, Jan 30, 2026 at 02:07:20PM +0100, Milan Zamazal wrote:
>> Hi Barnabás,
>>
>> thank you for the cleanup.
>>
>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:
>>
>>> There are no other users of `egl.cpp`, so simplify by adding
>>> it the sources array at the same time.
>>
>> "it to the ..."?
>>
>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
>>> ---
>>>   src/libcamera/meson.build              | 3 ---
>>>   src/libcamera/software_isp/meson.build | 1 +
>>>   2 files changed, 1 insertion(+), 3 deletions(-)
>>>
>>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
>>> index c6c109a30..28ce93de6 100644
>>> --- a/src/libcamera/meson.build
>>> +++ b/src/libcamera/meson.build
>>> @@ -75,9 +75,6 @@ libegl = dependency('egl', required : false)
>>>   libglesv2 = dependency('glesv2', required : false)
>>>   
>>>   if mesa_works
>>> -    libcamera_internal_sources += files([
>>> -        'egl.cpp',
>>> -    ])
>>>       gles_headless_enabled = true
>>>   else
>>>       gles_headless_enabled = false
>>> diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
>>> index c61ac7d59..a55b76b58 100644
>>> --- a/src/libcamera/software_isp/meson.build
>>> +++ b/src/libcamera/software_isp/meson.build
>>> @@ -19,6 +19,7 @@ libcamera_internal_sources += files([
>>>   if softisp_enabled and gles_headless_enabled
>>>       config_h.set('HAVE_DEBAYER_EGL', 1)
>>>       libcamera_internal_sources += files([
>>> +        '../egl.cpp',
>>
>> Should egl.cpp be moved to this directory then?
> 
> In the not too distant future I would like to refactor the code to
> create a GPU processing class that will be available to other pipeline
> handlers, independently from the soft ISP. At that point egl.cpp will
> probably go to src/libcamera/gpu/. I don't mind where we store it for
> the time being.

I went with the simplest option, that is, not moving egl.cpp because then the header
file would also need to be moved, which brings more changes with it. Nonetheless, there is
an argument to be made for moving it: it is only used by the software_isp parts.
So I can move it if that seems best for now?


> 
>>>           'debayer_egl.cpp',
>>>       ])
>>>   endif
>
Laurent Pinchart Feb. 5, 2026, 11:38 a.m. UTC | #4
On Thu, Feb 05, 2026 at 11:33:18AM +0100, Barnabás Pőcze wrote:
> 2026. 01. 30. 15:02 keltezéssel, Laurent Pinchart írta:
> > On Fri, Jan 30, 2026 at 02:07:20PM +0100, Milan Zamazal wrote:
> >> Hi Barnabás,
> >>
> >> thank you for the cleanup.
> >>
> >> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:
> >>
> >>> There are no other users of `egl.cpp`, so simplify by adding
> >>> it the sources array at the same time.
> >>
> >> "it to the ..."?
> >>
> >>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> >>> ---
> >>>   src/libcamera/meson.build              | 3 ---
> >>>   src/libcamera/software_isp/meson.build | 1 +
> >>>   2 files changed, 1 insertion(+), 3 deletions(-)
> >>>
> >>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> >>> index c6c109a30..28ce93de6 100644
> >>> --- a/src/libcamera/meson.build
> >>> +++ b/src/libcamera/meson.build
> >>> @@ -75,9 +75,6 @@ libegl = dependency('egl', required : false)
> >>>   libglesv2 = dependency('glesv2', required : false)
> >>>   
> >>>   if mesa_works
> >>> -    libcamera_internal_sources += files([
> >>> -        'egl.cpp',
> >>> -    ])
> >>>       gles_headless_enabled = true
> >>>   else
> >>>       gles_headless_enabled = false
> >>> diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
> >>> index c61ac7d59..a55b76b58 100644
> >>> --- a/src/libcamera/software_isp/meson.build
> >>> +++ b/src/libcamera/software_isp/meson.build
> >>> @@ -19,6 +19,7 @@ libcamera_internal_sources += files([
> >>>   if softisp_enabled and gles_headless_enabled
> >>>       config_h.set('HAVE_DEBAYER_EGL', 1)
> >>>       libcamera_internal_sources += files([
> >>> +        '../egl.cpp',
> >>
> >> Should egl.cpp be moved to this directory then?
> > 
> > In the not too distant future I would like to refactor the code to
> > create a GPU processing class that will be available to other pipeline
> > handlers, independently from the soft ISP. At that point egl.cpp will
> > probably go to src/libcamera/gpu/. I don't mind where we store it for
> > the time being.
> 
> I went with the simplest option, that is, not moving egl.cpp because then the header
> file would also need to be moved, which brings more changes with it. Nonetheless, there is
> an argument to be made for moving it: it is only used by the software_isp parts.
> So I can move it if that seems best for now?

Up to you.

> >>>           'debayer_egl.cpp',
> >>>       ])
> >>>   endif

Patch
diff mbox series

diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index c6c109a30..28ce93de6 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -75,9 +75,6 @@  libegl = dependency('egl', required : false)
 libglesv2 = dependency('glesv2', required : false)
 
 if mesa_works
-    libcamera_internal_sources += files([
-        'egl.cpp',
-    ])
     gles_headless_enabled = true
 else
     gles_headless_enabled = false
diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
index c61ac7d59..a55b76b58 100644
--- a/src/libcamera/software_isp/meson.build
+++ b/src/libcamera/software_isp/meson.build
@@ -19,6 +19,7 @@  libcamera_internal_sources += files([
 if softisp_enabled and gles_headless_enabled
     config_h.set('HAVE_DEBAYER_EGL', 1)
     libcamera_internal_sources += files([
+        '../egl.cpp',
         'debayer_egl.cpp',
     ])
 endif