[04/10] libcamera: egl: Rename createTexture2D to createInputTexture2D
diff mbox series

Message ID 20260624085849.873784-5-bryan.odonoghue@linaro.org
State New
Headers show
Series
  • libcamera: software_isp: gpu: Add go faster stripes
Related show

Commit Message

Bryan O'Donoghue June 24, 2026, 8:58 a.m. UTC
Right now this routine makes a texture from a supplied data-buffer. It
should have a more descriptive and accurate name.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 include/libcamera/internal/egl.h | 2 +-
 src/libcamera/egl.cpp            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Robert Mader June 24, 2026, 12:03 p.m. UTC | #1
IMO the naming is not really more descriptive and accurate, especially 
as in the next commit it's used in createOutputTexture2D()". So I kinda 
would have preferred to make createTexture2D private and call it from 
both createInputTexture2D() and createOutputTexture2D(). No strong 
opinion though.

On 24.06.26 10:58, Bryan O'Donoghue wrote:
> Right now this routine makes a texture from a supplied data-buffer. It
> should have a more descriptive and accurate name.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>   include/libcamera/internal/egl.h | 2 +-
>   src/libcamera/egl.cpp            | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
> index 4b0757afd..0709f9019 100644
> --- a/include/libcamera/internal/egl.h
> +++ b/include/libcamera/internal/egl.h
> @@ -107,7 +107,7 @@ public:
>   
>   	int createInputDMABufTexture2D(eGLImage &eglImage, int fd);
>   	int createOutputDMABufTexture2D(eGLImage &eglImage, int fd);
> -	void createTexture2D(eGLImage &eglImage, void *data);
> +	void createInputTexture2D(eGLImage &eglImage, void *data);
>   
>   	int attachTextureToFBO(eGLImage &eglImage);
>   
> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
> index 8d80a6d1a..2825d34d3 100644
> --- a/src/libcamera/egl.cpp
> +++ b/src/libcamera/egl.cpp
> @@ -266,7 +266,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)
>    * is useful for uploading static data like lookup tables or uniform color
>    * matrices to the GPU.
>    */
> -void eGL::createTexture2D(eGLImage &eglImage, void *data)
> +void eGL::createInputTexture2D(eGLImage &eglImage, void *data)
>   {
>   	GLenum format;
>   	GLenum type = GL_UNSIGNED_BYTE;

Patch
diff mbox series

diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
index 4b0757afd..0709f9019 100644
--- a/include/libcamera/internal/egl.h
+++ b/include/libcamera/internal/egl.h
@@ -107,7 +107,7 @@  public:
 
 	int createInputDMABufTexture2D(eGLImage &eglImage, int fd);
 	int createOutputDMABufTexture2D(eGLImage &eglImage, int fd);
-	void createTexture2D(eGLImage &eglImage, void *data);
+	void createInputTexture2D(eGLImage &eglImage, void *data);
 
 	int attachTextureToFBO(eGLImage &eglImage);
 
diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
index 8d80a6d1a..2825d34d3 100644
--- a/src/libcamera/egl.cpp
+++ b/src/libcamera/egl.cpp
@@ -266,7 +266,7 @@  int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)
  * is useful for uploading static data like lookup tables or uniform color
  * matrices to the GPU.
  */
-void eGL::createTexture2D(eGLImage &eglImage, void *data)
+void eGL::createInputTexture2D(eGLImage &eglImage, void *data)
 {
 	GLenum format;
 	GLenum type = GL_UNSIGNED_BYTE;