This is temporary solution for gl drawing.
Since the gl image is not drawn while it's free the image directly.
Just keeping the image and free when it's vector rendering is totally finished.
Change-Id: I143f9123ff0fa74036fb534f9874f80530a8a204
Eina_Rectangle fill;
unsigned int width, height;
+
+ //TIZE ONLY: backingstore. temporary solution for supporting gl drawing.
+ void *backing_store;
};
static void evas_object_vg_render(Evas_Object *eo_obj,
_evas_vg_eo_base_destructor(Eo *eo_obj, Evas_VG_Data *pd)
{
eo_unref(pd->root);
+
+ //TIZE ONLY: backingstore. temporary solution for supporting gl drawing.
+ if (pd->backing_store)
+ {
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, pd->backing_store);
+ pd->backing_store = NULL;
+ }
+
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
}
do_async);
_evas_vg_render(obj, output, context, surface, vd->root, NULL,
do_async);
+#if 0
obj->layer->evas->engine.func->ector_end(output, context, surface, do_async);
+#else
+ //TIZE ONLY: backingstore. temporary solution for supporting gl drawing.
+
+ if (vd->backing_store)
+ {
+ obj->layer->evas->engine.func->image_free(output, vd->backing_store);
+ vd->backing_store = NULL;
+ }
+ vd->backing_store = obj->layer->evas->engine.func->ector_end(output, context, surface, do_async);
+#endif
}
static void
Ector_Surface *(*ector_get) (void *data);
void (*ector_begin) (void *data, void *context, void *surface, int x, int y, Eina_Bool do_async);
void (*ector_renderer_draw) (void *data, void *context, void *surface, Ector_Renderer *r, Eina_Array *clips, Eina_Bool do_async);
- void (*ector_end) (void *data, void *context, void *surface, Eina_Bool do_async);
+ void *(*ector_end) (void *data, void *context, void *surface, Eina_Bool do_async);
};
struct _Evas_Image_Save_Func
}
}
-static void
+static void *
eng_ector_end(void *data, void *context EINA_UNUSED, void *surface EINA_UNUSED, Eina_Bool do_async EINA_UNUSED)
{
Evas_Engine_GL_Context *gl_context;
// using GL backend, you just need to turn on Evas_Map on
// the Evas_Object_VG.
evas_gl_common_image_draw(gl_context, im, 0, 0, w, h, 0, 0, w, h, 0);
-
+#if 0
evas_gl_common_image_free(im);
+#else
+ return im;
+#endif
+
+ return NULL;
}
static Evas_Func func, pfunc;
}
}
-static void
+static void *
eng_ector_end(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface EINA_UNUSED, Eina_Bool do_async)
{
if (do_async)
Evas_Thread_Command_Ector_Surface *nes;
nes = eina_mempool_malloc(_mp_command_ector_surface, sizeof (Evas_Thread_Command_Ector_Surface));
- if (!nes) return ;
+ if (!nes) return NULL;
nes->surface = NULL;
evas_common_cpu_end_opt();
}
+ return NULL;
}
//------------------------------------------------//