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 28a7fd33c13c70df52aef65548bf6b6e5b57b39d
Author: [email protected] <[email protected]>
AuthorDate: Mon Sep 14 09:51:42 2026 -0600

    evas_ector_gl: write blocks on several lines, never on one
    
    The review pointed out a { ...; } block written on a single line in the
    gradient atlas LRU search. EFL puts the braces of a block on their own
    lines, with one statement per line, and never writes a function on one
    line.
    
    Rewrite all 8 such blocks added by this branch:
    
    - evas_ector_gl_grad_atlas.c: the LRU search in _alloc_row() and the
      texture allocation failure in _ensure_gl();
    - efl_canvas_vg_object.c: the multiplier default when none is set;
    - evas_ector_gl_span_shader.c: the "wide" and "off" EVAS_GL_SPAN_TIER
      checks and the two allocation failures in the shader source builders;
    - ector_test_grad_atlas.c: the _count_flush() test helper.
    
    Ignoring whitespace, the diff only changes line breaks and adds braces
    on their own lines. The build is clean, and ector_suite and evas_suite
    pass.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    Claude-Session: https://claude.ai/code/session_01CCD7MpBVSgcmkYFT1R9wgP
---
 src/lib/evas/canvas/efl_canvas_vg_object.c         |  5 ++++-
 .../engines/gl_generic/evas_ector_gl_grad_atlas.c  | 11 ++++++++--
 .../engines/gl_generic/evas_ector_gl_span_shader.c | 24 ++++++++++++++++++----
 src/tests/ector/suite/ector_test_grad_atlas.c      |  6 +++++-
 4 files changed, 38 insertions(+), 8 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 6061547db0..5c020280a8 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -466,7 +466,10 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
 
              had_mul = !!ENFN->context_multiplier_get(engine, context,
                                                       &pr, &pg, &pb, &pa);
-             if (!had_mul) { pr = pg = pb = pa = 255; }
+             if (!had_mul)
+               {
+                  pr = pg = pb = pa = 255;
+               }
 
 #define _VG_MUL(x, y)  (((x) * (y) + 0xff) >> 8)
              ENFN->context_multiplier_set(engine, context,
diff --git a/src/modules/evas/engines/gl_generic/evas_ector_gl_grad_atlas.c b/src/modules/evas/engines/gl_generic/evas_ector_gl_grad_atlas.c
index 710dcb0ad5..5ce26ce0bc 100644
--- a/src/modules/evas/engines/gl_generic/evas_ector_gl_grad_atlas.c
+++ b/src/modules/evas/engines/gl_generic/evas_ector_gl_grad_atlas.c
@@ -99,7 +99,11 @@ _ensure_gl(Span_Grad_Atlas *a)
 
    GLuint t = 0;
    glGenTextures(1, &t);
-   if (!t) { a->disabled = EINA_TRUE; return 0; }
+   if (!t)
+     {
+        a->disabled = EINA_TRUE;
+        return 0;
+     }
    glBindTexture(GL_TEXTURE_2D, t);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
                 SPAN_GRAD_ATLAS_W, SPAN_GRAD_ATLAS_H, 0,
@@ -179,7 +183,10 @@ _alloc_row(Span_Grad_Atlas *a)
      {
         if (a->rows[i].last_used == a->current_frame) continue; // pinned
         if ((best < 0) || (a->rows[i].last_used < best_age))
-          { best = i; best_age = a->rows[i].last_used; }
+          {
+             best = i;
+             best_age = a->rows[i].last_used;
+          }
      }
    if (best >= 0) return best;
 
diff --git a/src/modules/evas/engines/gl_generic/evas_ector_gl_span_shader.c b/src/modules/evas/engines/gl_generic/evas_ector_gl_span_shader.c
index fa3a17d318..bbbee6ea18 100644
--- a/src/modules/evas/engines/gl_generic/evas_ector_gl_span_shader.c
+++ b/src/modules/evas/engines/gl_generic/evas_ector_gl_span_shader.c
@@ -327,8 +327,16 @@ _span_tier_get(void)
    env = getenv("EVAS_GL_SPAN_TIER");
    if (env)
      {
-        if (!strcmp(env, "wide"))      { _span_tier_resolved = SPAN_TIER_WIDE; goto done; }
-        if (!strcmp(env, "off"))       { _span_tier_resolved = SPAN_TIER_OFF;  goto done; }
+        if (!strcmp(env, "wide"))
+          {
+             _span_tier_resolved = SPAN_TIER_WIDE;
+             goto done;
+          }
+        if (!strcmp(env, "off"))
+          {
+             _span_tier_resolved = SPAN_TIER_OFF;
+             goto done;
+          }
         if (!strcmp(env, "compact"))
           {
              ERR("EVAS_GL_SPAN_TIER=compact is not implemented yet "
@@ -707,7 +715,11 @@ _span_shader_parts_build(int kind, Span_Bind_Set bind, int mask, int *out_count)
 
    {
       const char **out = malloc(sizeof(*out) * (size_t)n);
-      if (!out) { *out_count = 0; return NULL; }
+      if (!out)
+        {
+           *out_count = 0;
+           return NULL;
+        }
       memcpy(out, parts, sizeof(*out) * (size_t)n);
       *out_count = n;
       return out;
@@ -743,7 +755,11 @@ _span_vs_parts_build(int kind, int mask, int *out_count)
 
    {
       const char **out = malloc(sizeof(*out) * (size_t)n);
-      if (!out) { *out_count = 0; return NULL; }
+      if (!out)
+        {
+           *out_count = 0;
+           return NULL;
+        }
       memcpy(out, parts, sizeof(*out) * (size_t)n);
       *out_count = n;
       return out;
diff --git a/src/tests/ector/suite/ector_test_grad_atlas.c b/src/tests/ector/suite/ector_test_grad_atlas.c
index a32122918a..674acc5a6f 100644
--- a/src/tests/ector/suite/ector_test_grad_atlas.c
+++ b/src/tests/ector/suite/ector_test_grad_atlas.c
@@ -215,7 +215,11 @@ EFL_END_TEST
 
 // Counts flush-callback invocations for the exhaustion test.
 static int _flush_calls = 0;
-static void _count_flush(void *data EINA_UNUSED) { _flush_calls++; }
+static void
+_count_flush(void *data EINA_UNUSED)
+{
+   _flush_calls++;
+}
 
 EFL_START_TEST(grad_atlas_no_eviction_of_rows_used_this_frame)
 {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to