This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch v-1.26.0
in repository efl.

View the commit online.

commit cb591075af3a7f698dbc6918e6c8125a2a341879
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Wed May 4 18:12:24 2022 +0100

    evas - png loader - work around libpng arm bug where rgb > a on decode
    
    on arm when a is 0 ... per pixel rgb can be > 0 which violates premul
    rgb leading to junk rendering. this now is worked around in the png
    loader and forces rgb to 0 when a is 0 per pixel.
    
    @fix
---
 .../evas/image_loaders/png/evas_image_load_png.c   | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c
index 9e5073cc5b..7180e0ce22 100644
--- a/src/modules/evas/image_loaders/png/evas_image_load_png.c
+++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c
@@ -596,6 +596,17 @@ evas_image_load_file_head_with_data_png(void *loader_data,
      }
    free(pixels2);
 
+   if ((epi.hasa) && (pack_offset == sizeof(DATA32)))
+     {
+        DATA32 *dst_ptr = (DATA32 *) surface;
+        int total = w * h;
+
+        for (i = 0; i < total; i++)
+          {
+             if (A_VAL(dst_ptr) == 0) *dst_ptr = 0;
+             dst_ptr++;
+          }
+     }
    prop->info.premul = EINA_TRUE;
 
    *error = EVAS_LOAD_ERROR_NONE;
@@ -882,6 +893,17 @@ evas_image_load_file_data_png(void *loader_data,
           }
      }
 
+   if ((epi.hasa) && (pack_offset == sizeof(DATA32)))
+     {
+        DATA32 *dst_ptr = (DATA32 *) surface;
+        int total = w * h;
+
+        for (i = 0; i < total; i++)
+          {
+             if (A_VAL(dst_ptr) == 0) *dst_ptr = 0;
+             dst_ptr++;
+          }
+     }
    prop->info.premul = EINA_TRUE;
 
    *error = EVAS_LOAD_ERROR_NONE;

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

Reply via email to