This is an automated email from the git hooks/post-receive script.
git pushed a commit to reference refs/pull/114/head
in repository efl.
View the commit online.
commit 0fcde462dbf2738ea34e7ad9d29a42d0583d54da
Author: [email protected] <[email protected]>
AuthorDate: Sun Sep 13 18:32:21 2026 -0600
evas_ector_gl: name the span page through a typedef everywhere
Raster's review pointed out that Evas_Engine_GL_Generic.h used a bare
struct _Span_Page, which is unusual in EFL, where types are named
through a typedef.
The bare struct was a workaround. evas_ector_gl_span.h defined the type
as typedef struct _Span_Page { ... } Span_Page, and
Evas_Engine_GL_Generic.h cannot include that header because it needs
sw_ft_raster.h, which is only on gl_generic's include path. Repeating
the typedef there would be a redefinition, which C99 does not allow.
Split the typedef from the definition, as evas_ector_gl_grad_atlas.h
already does:
- evas_ector_gl_span_types.h, which both headers reach, declares
typedef struct _Span_Page Span_Page.
- Evas_Engine_GL_Generic.h uses Span_Page for span_page_new(),
span_page_free() and the span_page field.
- evas_ector_gl_span.h defines struct _Span_Page and includes the types
header at the top instead of the bottom, so the typedef is visible
before the definition. A leftover "(Task 3)" banner goes with the old
include.
No code change. gl_generic, gl_x11, gl_drm, wayland_egl and ector_suite
all rebuild cleanly, and ector_suite and evas_suite pass.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---
.../evas/engines/gl_common/evas_ector_gl_span_types.h | 6 ++++++
.../evas/engines/gl_generic/Evas_Engine_GL_Generic.h | 16 ++++++++--------
.../evas/engines/gl_generic/evas_ector_gl_span.h | 17 +++++++----------
3 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/src/modules/evas/engines/gl_common/evas_ector_gl_span_types.h b/src/modules/evas/engines/gl_common/evas_ector_gl_span_types.h
index ee0f3ef7a1..70d9f86601 100644
--- a/src/modules/evas/engines/gl_common/evas_ector_gl_span_types.h
+++ b/src/modules/evas/engines/gl_common/evas_ector_gl_span_types.h
@@ -4,6 +4,7 @@
// - Span_Variant enum
// - Span_Vertex_* interleaved vertex structs
// - span_vertex_size() helper
+// - Span_Page typedef
// - SPAN_PIPE_MAX_QUADS and the SPAN_FILL_TYPE_* fill type macros
//
// Deliberately has NO dependency on sw_ft_raster.h, GL headers, or any
@@ -24,6 +25,11 @@
typedef float GLfloat;
# endif
+// The span page is defined in gl_generic/evas_ector_gl_span.h. Its typedef
+// lives here so that Evas_Engine_GL_Generic.h, which cannot include that
+// header, can name the type as well.
+typedef struct _Span_Page Span_Page;
+
// ---------------------------------------------------------------------------
// Fill type of one side of a span quad, as stored in Span_Channel_Params.type
// and handed to the gradient shaders in the .w of that side's grad_def
diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index 7e70532efe..b749f0c717 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -12,10 +12,10 @@
// Span page lifecycle. Declared here rather than pulled in from
// evas_ector_gl_span.h, which needs sw_ft_raster.h - only on gl_generic's
// include path, while this header is also used by gl_x11, gl_drm and
-// wayland_egl. The definitions live in evas_ector_gl_span_shader.c.
-struct _Span_Page;
-struct _Span_Page *span_page_new(void);
-void span_page_free(struct _Span_Page *page, Eina_Bool release_tex);
+// wayland_egl. The Span_Page typedef comes from evas_ector_gl_span_types.h
+// and the definitions live in evas_ector_gl_span_shader.c.
+Span_Page *span_page_new(void);
+void span_page_free(Span_Page *page, Eina_Bool release_tex);
typedef struct _Render_Engine_GL_Generic Render_Engine_GL_Generic;
typedef struct _Render_Output_GL_Generic Render_Output_GL_Generic;
@@ -42,10 +42,10 @@ struct _Render_Engine_GL_Generic
// Shared by every collector so that a pass costs a single upload; see
// span_page_upload(). NULL until the first pass.
//
- // Only forward-declared: evas_ector_gl_span.h needs sw_ft_raster.h, which
- // is only on gl_generic's include path, and this header is also pulled in
- // by gl_x11, gl_drm and wayland_egl.
- struct _Span_Page *span_page;
+ // Only the typedef is visible here: evas_ector_gl_span.h needs
+ // sw_ft_raster.h, which is only on gl_generic's include path, and this
+ // header is also pulled in by gl_x11, gl_drm and wayland_egl.
+ Span_Page *span_page;
struct {
Evas_Object_Image_Pixels_Get_Cb get_pixels;
diff --git a/src/modules/evas/engines/gl_generic/evas_ector_gl_span.h b/src/modules/evas/engines/gl_generic/evas_ector_gl_span.h
index 4b55be62b3..14d123a08a 100644
--- a/src/modules/evas/engines/gl_generic/evas_ector_gl_span.h
+++ b/src/modules/evas/engines/gl_generic/evas_ector_gl_span.h
@@ -26,6 +26,11 @@
// themselves before including this header.
#include "sw_ft_raster.h"
+// Span_Page typedef, per-variant vertex types, SPAN_PIPE_MAX_QUADS and
+// SPAN_FILL_TYPE_*. Single source of truth shared with gl_common (no
+// sw_ft_raster.h dependency).
+#include "../gl_common/evas_ector_gl_span_types.h"
+
// ------------------------------------------------------------------
// Forward declarations for ector_software_private.h types
// ------------------------------------------------------------------
@@ -317,13 +322,13 @@ Eina_Bool span_collector_supports_composite(Efl_Gfx_Vg_Composite_Method comp_met
// more room and never shrinks. Because it is shared, a pass overwrites the
// previous pass's rows, which is why eng_ector_begin() drains queued draws
// before collecting again.
-typedef struct _Span_Page
+struct _Span_Page
{
void *evas_tex; // Evas_GL_Texture *; NULL until first upload
void *gc; // the Evas_Engine_GL_Context evas_tex belongs to
int w, h; // logical size currently allocated
uint32_t prev_hash; // combined hash of the last uploaded pass
-} Span_Page;
+};
// Allocate an empty page. No GL resource is taken until first upload.
Span_Page *span_page_new(void);
@@ -419,12 +424,4 @@ void span_debug_readback(const char *label, unsigned int tex_id,
#endif // SPAN_DEBUG_PROBES
#endif // EVAS_GL_COMMON_H
-// ------------------------------------------------------------------
-// Per-variant interleaved vertex structs (Task 3)
-// ------------------------------------------------------------------
-
-// Per-variant vertex types, SPAN_PIPE_MAX_QUADS, SPAN_FILL_TYPE_*.
-// Single source of truth shared with gl_common (no sw_ft_raster.h dependency).
-#include "../gl_common/evas_ector_gl_span_types.h"
-
#endif // EVAS_ECTOR_GL_SPAN_H_
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.