ector: add reference point to define (0, 0) and don't repeat the same value everywhere. 11/43311/1
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 3 Apr 2015 14:33:19 +0000 (16:33 +0200)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 8 Jul 2015 02:15:19 +0000 (11:15 +0900)
Change-Id: I3b4a27e183bf90cf365c02310e3ae662a4d49cfe

src/lib/ector/cairo/ector_cairo_surface.c
src/lib/ector/software/ector_renderer_software_shape.c
src/modules/evas/engines/gl_generic/evas_engine.c

index 377fbbd..9aebc60 100644 (file)
@@ -73,6 +73,7 @@ _ector_cairo_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
 
 typedef struct _cairo_surface_t cairo_surface_t;
 
+static void (*cairo_translate)(cairo_t *cr, double tx, double ty) = NULL;
 static void (*cairo_destroy)(cairo_t *cr) = NULL;
 static cairo_surface_t *(*cairo_image_surface_create)(int format,
                                                       int width,
index 00230fe..3c2b963 100644 (file)
@@ -312,7 +312,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_prepare(Eo *obj, Ecto
 }
 
 static Eina_Bool
-_ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_Software_Shape_Data *pd, Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
+_ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED, Ector_Renderer_Software_Shape_Data *pd, Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
 {
    int x, y;
 
index 86f9889..86a2a48 100644 (file)
@@ -1969,7 +1969,7 @@ _evas_render_op_to_ector_rop(Evas_Render_Op op)
 }
 
 static void
-eng_ector_renderer_draw(void *data, void *context EINA_UNUSED, void *surface, Ector_Renderer *renderer, Eina_Array *clips, int x, int y, Eina_Bool do_async EINA_UNUSED)
+eng_ector_renderer_draw(void *data, void *context EINA_UNUSED, void *surface, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async EINA_UNUSED)
 {
    Evas_GL_Image *dst = surface;
    Evas_Engine_GL_Context *gc;
@@ -2052,12 +2052,14 @@ eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface
    if (use_cairo)
      {
         eo_do(_software_ector,
-              ector_cairo_software_surface_set(software_buffer, w, h));
+              ector_cairo_software_surface_set(software_buffer, w, h),
+              ector_surface_reference_point_set(x, y));
      }
    else
      {
         eo_do(_software_ector,
-              ector_software_surface_set(software_buffer, w, h));
+              ector_software_surface_set(software_buffer, w, h),
+              ector_surface_reference_point_set(x, y));
      }
 }