diff --git a/legacy/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h b/legacy/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h index b34b2c11a6..2b5c2c7b4f 100644 --- a/legacy/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h +++ b/legacy/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h @@ -11,7 +11,8 @@ struct _Evas_Engine_Info_Wayland_Shm void *dest; int rotation; - unsigned char debug : 1; + Eina_Bool destination_alpha : 1; + Eina_Bool debug : 1; } info; Evas_Engine_Render_Mode render_mode; diff --git a/legacy/evas/src/modules/engines/wayland_shm/evas_engine.c b/legacy/evas/src/modules/engines/wayland_shm/evas_engine.c index 7c55517451..17b17bfdcd 100644 --- a/legacy/evas/src/modules/engines/wayland_shm/evas_engine.c +++ b/legacy/evas/src/modules/engines/wayland_shm/evas_engine.c @@ -28,7 +28,7 @@ static Evas_Func func, pfunc; int _evas_engine_way_shm_log_dom = -1; /* local function prototypes */ -static void *_output_setup(int w, int h, int rotation, void *dest); +static void *_output_setup(int w, int h, int rotation, Eina_Bool alpha, void *dest); /* engine function prototypes */ static void *eng_info(Evas *evas __UNUSED__); @@ -48,7 +48,7 @@ static Eina_Bool eng_canvas_alpha_get(void *data, void *context __UNUSED__); /* local functions */ static void * -_output_setup(int w, int h, int rotation, void *dest) +_output_setup(int w, int h, int rotation, Eina_Bool alpha, void *dest) { Render_Engine *re = NULL; @@ -56,7 +56,7 @@ _output_setup(int w, int h, int rotation, void *dest) if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; - if (!(re->ob = evas_outbuf_setup(w, h, rotation, dest))) + if (!(re->ob = evas_outbuf_setup(w, h, rotation, alpha, dest))) { free(re); return NULL; @@ -127,7 +127,8 @@ eng_setup(Evas *evas, void *info) evas_common_tilebuf_init(); re = _output_setup(evas->output.w, evas->output.h, - in->info.rotation, in->info.dest); + in->info.rotation, in->info.destination_alpha, + in->info.dest); if (!re) return 0; re->outbuf_free = evas_outbuf_free; @@ -141,7 +142,8 @@ eng_setup(Evas *evas, void *info) if (!(re = evas->engine.data.output)) return 0; if (re->ob) re->outbuf_free(re->ob); re->ob = evas_outbuf_setup(evas->output.w, evas->output.h, - in->info.rotation, in->info.dest); + in->info.rotation, + in->info.destination_alpha, in->info.dest); if (re->tb) evas_common_tilebuf_free(re->tb); if ((re->tb = evas_common_tilebuf_new(evas->output.w, evas->output.h))) evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); diff --git a/legacy/evas/src/modules/engines/wayland_shm/evas_engine.h b/legacy/evas/src/modules/engines/wayland_shm/evas_engine.h index 878851abae..1869d16a10 100644 --- a/legacy/evas/src/modules/engines/wayland_shm/evas_engine.h +++ b/legacy/evas/src/modules/engines/wayland_shm/evas_engine.h @@ -47,12 +47,13 @@ struct _Outbuf { void *dest; RGBA_Image *buffer; + Eina_Bool destination_alpha : 1; } priv; }; void evas_outbuf_free(Outbuf *ob); void evas_outbuf_resize(Outbuf *ob, int w, int h); -Outbuf *evas_outbuf_setup(int w, int h, int rot, void *dest); +Outbuf *evas_outbuf_setup(int w, int h, int rot, Eina_Bool alpha, void *dest); RGBA_Image *evas_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); void evas_outbuf_push_updated_region(Outbuf *ob, RGBA_Image *update, int x __UNUSED__, int y, int w, int h); void evas_outbuf_free_region_for_update(Outbuf *ob, RGBA_Image *update); diff --git a/legacy/evas/src/modules/engines/wayland_shm/evas_outbuf.c b/legacy/evas/src/modules/engines/wayland_shm/evas_outbuf.c index 490a978af1..4dee9a2502 100644 --- a/legacy/evas/src/modules/engines/wayland_shm/evas_outbuf.c +++ b/legacy/evas/src/modules/engines/wayland_shm/evas_outbuf.c @@ -21,7 +21,7 @@ evas_outbuf_resize(Outbuf *ob, int w, int h) } Outbuf * -evas_outbuf_setup(int w, int h, int rot, void *dest) +evas_outbuf_setup(int w, int h, int rot, Eina_Bool alpha, void *dest) { Outbuf *ob = NULL; @@ -31,6 +31,7 @@ evas_outbuf_setup(int w, int h, int rot, void *dest) ob->h = h; ob->rotation = rot; ob->priv.dest = dest; + ob->priv.destination_alpha = alpha; ob->priv.buffer = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), @@ -56,7 +57,7 @@ evas_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *c im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); if (im) { - im->cache_entry.flags.alpha = 1; + im->cache_entry.flags.alpha = ob->priv.destination_alpha; im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h); }