[RFC,v2,2/8] libcamera: egl: Remove `eGL::surface_`
diff mbox series

Message ID 20260810105942.1098192-3-barnabas.pocze@ideasonboard.com
State Superseded
Headers show
Series
  • libcamera: software_isp: debayer_egl: Remove some leaks
Related show

Commit Message

Barnabás Pőcze Aug. 10, 2026, 10:59 a.m. UTC
This member has always been unused, so remove it.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
---
 include/libcamera/internal/egl.h | 1 -
 src/libcamera/egl.cpp            | 8 --------
 2 files changed, 9 deletions(-)

Comments

Jacopo Mondi Aug. 11, 2026, 7:53 a.m. UTC | #1
Hi Barnabás

On Mon, Aug 10, 2026 at 12:59:36PM +0200, Barnabás Pőcze wrote:
> This member has always been unused, so remove it.
>
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

> ---
>  include/libcamera/internal/egl.h | 1 -
>  src/libcamera/egl.cpp            | 8 --------
>  2 files changed, 9 deletions(-)
>
> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
> index c43684808d..f8ae486a8d 100644
> --- a/include/libcamera/internal/egl.h
> +++ b/include/libcamera/internal/egl.h
> @@ -133,7 +133,6 @@ private:
>
>  	EGLDisplay display_ = EGL_NO_DISPLAY;
>  	EGLContext context_ = EGL_NO_CONTEXT;
> -	EGLSurface surface_ = EGL_NO_SURFACE;
>
>  	int compileShader(int shaderType, GLuint &shaderId, Span<const unsigned char> shaderData,
>  			  Span<const std::string> shaderEnv);
> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
> index 780b7bc2d5..900d2174df 100644
> --- a/src/libcamera/egl.cpp
> +++ b/src/libcamera/egl.cpp
> @@ -57,11 +57,6 @@ LOG_DEFINE_CATEGORY(eGL)
>   *\brief EGL context handle
>   */
>
> -/**
> - *\var eGL::surface_
> - *\brief EGL sufrace handle
> - */
> -
>  /**
>   * \brief Construct an EGL helper
>   * \param[in] display The EGL display to use
> @@ -84,9 +79,6 @@ eGL::~eGL()
>  {
>  	if (context_ != EGL_NO_CONTEXT)
>  		eglDestroyContext(display_, context_);
> -
> -	if (surface_ != EGL_NO_SURFACE)
> -		eglDestroySurface(display_, surface_);
>  }
>
>  /**
> --
> 2.55.0
>

Patch
diff mbox series

diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
index c43684808d..f8ae486a8d 100644
--- a/include/libcamera/internal/egl.h
+++ b/include/libcamera/internal/egl.h
@@ -133,7 +133,6 @@  private:
 
 	EGLDisplay display_ = EGL_NO_DISPLAY;
 	EGLContext context_ = EGL_NO_CONTEXT;
-	EGLSurface surface_ = EGL_NO_SURFACE;
 
 	int compileShader(int shaderType, GLuint &shaderId, Span<const unsigned char> shaderData,
 			  Span<const std::string> shaderEnv);
diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
index 780b7bc2d5..900d2174df 100644
--- a/src/libcamera/egl.cpp
+++ b/src/libcamera/egl.cpp
@@ -57,11 +57,6 @@  LOG_DEFINE_CATEGORY(eGL)
  *\brief EGL context handle
  */
 
-/**
- *\var eGL::surface_
- *\brief EGL sufrace handle
- */
-
 /**
  * \brief Construct an EGL helper
  * \param[in] display The EGL display to use
@@ -84,9 +79,6 @@  eGL::~eGL()
 {
 	if (context_ != EGL_NO_CONTEXT)
 		eglDestroyContext(display_, context_);
-
-	if (surface_ != EGL_NO_SURFACE)
-		eglDestroySurface(display_, surface_);
 }
 
 /**