evas: make vector graphic support multi output.
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 25 Aug 2017 17:52:14 +0000 (10:52 -0700)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 25 Aug 2017 17:52:14 +0000 (10:52 -0700)
src/lib/evas/canvas/evas_object_vg.c
src/lib/evas/include/evas_private.h
src/modules/evas/engines/software_generic/evas_engine.c

index c1a2730..c3edc9d 100644 (file)
@@ -179,12 +179,8 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
 {
    Evas_VG_Data *vd = type_private_data;
    Ector_Surface *ector = evas_ector_get(obj->layer->evas);
-   // FIXME: Set context (that should affect Ector_Surface) and
-   // then call Ector_Renderer render from bottom to top. Get the
-   // Ector_Surface that match the output from Evas engine API.
-   // It is a requirement that you can reparent an Ector_Renderer
-   // to another Ector_Surface as long as that Ector_Surface is a
-   // child of the main Ector_Surface (necessary for Evas_Map).
+
+   obj->layer->evas->engine.func->ector_output_set(engine, surface, output);
 
    if (!vd->engine_data)
      vd->engine_data = obj->layer->evas->engine.func->ector_new(engine, context, ector, surface);
index 529256a..c0cdd12 100644 (file)
@@ -1611,6 +1611,7 @@ struct _Evas_Func
    void *(*texture_image_get)            (void *engine, void *texture);
 
    Ector_Surface *(*ector_create)        (void *engine);
+   void  (*ector_output_set)             (void *engine, Ector_Surface *surface, void *output);
    void  (*ector_destroy)                (void *engine, Ector_Surface *surface);
    Ector_Buffer *(*ector_buffer_wrap)    (void *engine, Evas *e, void *engine_image);
    Ector_Buffer *(*ector_buffer_new)     (void *engine, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags);
index b7dd3c8..ade91f4 100644 (file)
@@ -4338,6 +4338,14 @@ eng_ector_create(void *engine EINA_UNUSED)
 }
 
 static void
+eng_ector_output_set(void *engine EINA_UNUSED,
+                     Ector_Surface *surface EINA_UNUSED,
+                     void *output EINA_UNUSED)
+{
+   // To be useful for GL backend only.
+}
+
+static void
 eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector)
 {
    if (ector) efl_del(ector);
@@ -4848,6 +4856,7 @@ static Evas_Func func =
      NULL, // eng_texture_image_set
      NULL, // eng_texture_image_get
      eng_ector_create,
+     eng_ector_output_set,
      eng_ector_destroy,
      eng_ector_buffer_wrap,
      eng_ector_buffer_new,