summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-17 18:04:06 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 15:43:44 +0900
commitdc4790e08ba8bd239e499227881ba8b7c95c127e (patch)
tree31ddc62791570ebffb26c686188378dff5f0947c /src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
parenteda13b729851605615032a4af400de9b820e2d63 (diff)
Ector GL: Add skeletton for Evas.Ector.GL.Image.Buffer
This is an ector buffer backed by an existing Evas_GL_Image
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/software_generic/evas_ector_software_buffer.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c b/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
index 44ebf8fbd3..22efa05329 100644
--- a/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
+++ b/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
@@ -15,7 +15,7 @@
15typedef struct { 15typedef struct {
16 Ector_Software_Buffer_Base_Data *base; 16 Ector_Software_Buffer_Base_Data *base;
17 Evas *evas; 17 Evas *evas;
18 Image_Entry *ie; 18 Image_Entry *image;
19} Evas_Ector_Software_Buffer_Data; 19} Evas_Ector_Software_Buffer_Data;
20 20
21#define ENFN e->engine.func 21#define ENFN e->engine.func
@@ -44,8 +44,8 @@ _evas_ector_software_buffer_evas_ector_buffer_engine_image_set(Eo *obj, Evas_Ect
44 } 44 }
45 45
46 pd->evas = eo_xref(evas, obj); 46 pd->evas = eo_xref(evas, obj);
47 pd->ie = ENFN->image_ref(ENDT, ie); 47 pd->image = ENFN->image_ref(ENDT, ie);
48 if (!pd->ie) return; 48 if (!pd->image) return;
49 49
50 eo_do(obj, ector_buffer_pixels_set(im->image.data, 50 eo_do(obj, ector_buffer_pixels_set(im->image.data,
51 im->cache_entry.w, im->cache_entry.h, 0, 51 im->cache_entry.w, im->cache_entry.h, 0,
@@ -59,7 +59,7 @@ _evas_ector_software_buffer_evas_ector_buffer_engine_image_get(Eo *obj EINA_UNUS
59 Evas **evas, void **image) 59 Evas **evas, void **image)
60{ 60{
61 if (evas) *evas = pd->evas; 61 if (evas) *evas = pd->evas;
62 if (image) *image = pd->ie; 62 if (image) *image = pd->image;
63} 63}
64 64
65EOLIAN static Eo * 65EOLIAN static Eo *
@@ -73,11 +73,8 @@ _evas_ector_software_buffer_eo_base_constructor(Eo *obj, Evas_Ector_Software_Buf
73EOLIAN static Eo * 73EOLIAN static Eo *
74_evas_ector_software_buffer_eo_base_finalize(Eo *obj, Evas_Ector_Software_Buffer_Data *pd) 74_evas_ector_software_buffer_eo_base_finalize(Eo *obj, Evas_Ector_Software_Buffer_Data *pd)
75{ 75{
76 if (!pd->ie) 76 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->base, NULL);
77 { 77 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->image, NULL);
78 CRI("engine_image must be set at construction time only");
79 return NULL;
80 }
81 pd->base->generic->immutable = EINA_TRUE; 78 pd->base->generic->immutable = EINA_TRUE;
82 return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize()); 79 return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
83} 80}
@@ -88,7 +85,7 @@ _evas_ector_software_buffer_eo_base_destructor(Eo *obj, Evas_Ector_Software_Buff
88 Evas_Public_Data *e = eo_data_scope_get(pd->evas, EVAS_CANVAS_CLASS); 85 Evas_Public_Data *e = eo_data_scope_get(pd->evas, EVAS_CANVAS_CLASS);
89 86
90 eo_data_xunref(obj, pd->base, obj); 87 eo_data_xunref(obj, pd->base, obj);
91 ENFN->image_free(ENDT, pd->ie); 88 ENFN->image_free(ENDT, pd->image);
92 eo_xunref(pd->evas, obj); 89 eo_xunref(pd->evas, obj);
93 eo_do_super(obj, MY_CLASS, eo_destructor()); 90 eo_do_super(obj, MY_CLASS, eo_destructor());
94} 91}