summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/software_generic/evas_engine.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-08 17:29:54 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 15:43:43 +0900
commit7a8879ba8bf5d9aec15428f94222222eea6c0e2e (patch)
tree0ccf55e8242dff190ec53d27aa4ac42308dbea88 /src/modules/evas/engines/software_generic/evas_engine.c
parent85f23d96e7072f09ab73ab698047c3c172974b5e (diff)
ector: add engine-specific evas image buffer wrapper
Since Evas still relies entirely on Image_Entry and Evas_GL_Image, we will need an engine-specific wrapper object creating a Buffer around an existing cached image. Currently only SW support is implemented. GL will be more fun to do (with glReadPixels and whatnot).
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index b71399f04f..22967ad14d 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -9,6 +9,8 @@
9 9
10#include <software/Ector_Software.h> 10#include <software/Ector_Software.h>
11#include "cairo/Ector_Cairo.h" 11#include "cairo/Ector_Cairo.h"
12#include "evas_ector_buffer.eo.h"
13#include "evas_ector_software_buffer.eo.h"
12 14
13#if defined HAVE_DLSYM && ! defined _WIN32 15#if defined HAVE_DLSYM && ! defined _WIN32
14# include <dlfcn.h> /* dlopen,dlclose,etc */ 16# include <dlfcn.h> /* dlopen,dlclose,etc */
@@ -3755,6 +3757,20 @@ eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector)
3755 if (ector) eo_del(ector); 3757 if (ector) eo_del(ector);
3756} 3758}
3757 3759
3760static Ector_Buffer *
3761eng_ector_buffer_new(void *data EINA_UNUSED, Evas *e, void *engine_image)
3762{
3763 Image_Entry *ie = engine_image;
3764 Ector_Buffer *buf = NULL;
3765
3766 if (!ie) return NULL;
3767
3768 buf = eo_add(EVAS_ECTOR_SOFTWARE_BUFFER_CLASS, e,
3769 evas_ector_buffer_engine_image_set(e, ie));
3770
3771 return buf;
3772}
3773
3758static Efl_Gfx_Render_Op 3774static Efl_Gfx_Render_Op
3759_evas_render_op_to_ector_rop(Evas_Render_Op op) 3775_evas_render_op_to_ector_rop(Evas_Render_Op op)
3760{ 3776{
@@ -4166,6 +4182,7 @@ static Evas_Func func =
4166 NULL, // eng_texture_image_get 4182 NULL, // eng_texture_image_get
4167 eng_ector_create, 4183 eng_ector_create,
4168 eng_ector_destroy, 4184 eng_ector_destroy,
4185 eng_ector_buffer_new,
4169 eng_ector_begin, 4186 eng_ector_begin,
4170 eng_ector_renderer_draw, 4187 eng_ector_renderer_draw,
4171 eng_ector_end, 4188 eng_ector_end,