summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2013-01-08 03:49:49 +0000
committerCarsten Haitzler <raster@rasterman.com>2013-01-08 03:49:49 +0000
commit478de3ec7674b0bc5be2e0531a0ee9fea79069ba (patch)
tree9251d41d4e9402cb3294fb86e1d7bfa427ebb822 /src
parent240c0637fba595711b3ce558dcbc8af10ad6fdd0 (diff)
small change - not worth chglogging... make evas gl x11 header not
need xlib.h anymore... :) SVN revision: 82378
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_render.c24
-rw-r--r--src/lib/evas/include/evas_private.h40
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c2
-rw-r--r--src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h24
4 files changed, 76 insertions, 14 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index bed97c5b26..a5b5e8fdc9 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -58,6 +58,8 @@ struct _Render_Updates
58 58
59static Eina_Bool 59static Eina_Bool
60evas_render_updates_internal(Evas *eo_e, unsigned char make_updates, unsigned char do_draw, Evas_Render_Done_Cb done_func, void *done_data, Evas_Event_Cb updates_func, void *updates_data, Eina_Bool do_async); 60evas_render_updates_internal(Evas *eo_e, unsigned char make_updates, unsigned char do_draw, Evas_Render_Done_Cb done_func, void *done_data, Evas_Event_Cb updates_func, void *updates_data, Eina_Bool do_async);
61static void
62_evas_render_mode_eval(Evas_Public_Data *e);
61 63
62EAPI void 64EAPI void
63evas_damage_rectangle_add(Evas *eo_e, int x, int y, int w, int h) 65evas_damage_rectangle_add(Evas *eo_e, int x, int y, int w, int h)
@@ -1551,6 +1553,7 @@ evas_render_updates_internal(Evas *eo_e,
1551 { 1553 {
1552 unsigned int offset = 0; 1554 unsigned int offset = 0;
1553 1555
1556 _evas_render_mode_eval(e);
1554 while ((surface = 1557 while ((surface =
1555 e->engine.func->output_redraws_next_update_get 1558 e->engine.func->output_redraws_next_update_get
1556 (e->engine.data.output, 1559 (e->engine.data.output,
@@ -2120,4 +2123,25 @@ evas_render_object_recalc(Evas_Object *eo_obj)
2120 } 2123 }
2121} 2124}
2122 2125
2126static void
2127_evas_render_mode_eval(Evas_Public_Data *e) // eo
2128{
2129 Evas_Opset opset;
2130 int i;
2131
2132 if (!e->engine.func) return;
2133 if (!e->engine.func->opset_eval) return;
2134
2135 // XXX1: walk thru active objects - figure out render ops
2136 for (i = 0; i < e->active_objects.count; ++i)
2137 {
2138 Evas_Object_Protected_Data *obj = eina_array_data_get(&e->active_objects, i); // eo
2139 Evas_Object *eo_obj; // eo
2140
2141 if (!obj) continue;
2142 eo_obj = obj->object; // eo
2143 }
2144 e->engine.func->opset_eval(e->engine.data.output, &opset);
2145}
2146
2123/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ 2147/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 876401dc42..188feda60b 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -34,6 +34,7 @@ typedef struct _Evas_Font_Description Evas_Font_Description;
34typedef struct _Evas_Data_Node Evas_Data_Node; 34typedef struct _Evas_Data_Node Evas_Data_Node;
35typedef struct _Evas_Func_Node Evas_Func_Node; 35typedef struct _Evas_Func_Node Evas_Func_Node;
36typedef RGBA_Image_Loadopts Evas_Image_Load_Opts; 36typedef RGBA_Image_Loadopts Evas_Image_Load_Opts;
37typedef struct _Evas_Opset Evas_Opset;
37typedef struct _Evas_Func Evas_Func; 38typedef struct _Evas_Func Evas_Func;
38typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func; 39typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func;
39typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func; 40typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func;
@@ -753,6 +754,42 @@ struct _Evas_Object_Func
753 int (*get_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); 754 int (*get_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
754 755
755 int (*can_map) (Evas_Object *obj); 756 int (*can_map) (Evas_Object *obj);
757
758 int (*opset_get) (Evas_Object *obj);
759};
760
761typedef enum _Evas_Optype
762{
763 EVAS_OP_FILL_COLOR,
764 EVAS_OP_BLEND_COLOR,
765 EVAS_OP_COPY_PIXELS,
766 EVAS_OP_BLEND_PIXELS,
767 EVAS_OP_BLEND_ALPHA_MUL_PIXELS,
768 EVAS_OP_BLEND_COLOR_MUL_PIXELS,
769 EVAS_OP_SCALE_NEAREST_COPY_PIXELS,
770 EVAS_OP_BLEND_NEAREST_COPY_PIXELS,
771 EVAS_OP_SCALE_NEAREST_COPY_ALPHA_MUL_PIXELS,
772 EVAS_OP_BLEND_NEAREST_COPY_COLOR_MUL_PIXELS,
773 EVAS_OP_SCALE_SMOOTH_COPY_PIXELS,
774 EVAS_OP_BLEND_SMOOTH_COPY_PIXELS,
775 EVAS_OP_SCALE_SMOOTH_COPY_ALPHA_MUL_PIXELS,
776 EVAS_OP_BLEND_SMOOTH_COPY_COLOR_MUL_PIXELS,
777 EVAS_OP_BLEND_COLOR_ALPHA_MASK,
778 EVAS_OP_MAP_COPY_PIXELS,
779 EVAS_OP_MAP_BLEND_PIXELS,
780 EVAS_OP_MAP_COPY_ALPHA_MUL_PIXELS,
781 EVAS_OP_MAP_BLEND_COLOR_MUL_PIXELS,
782 EVAS_OP_MAP_90MUL_COPY_PIXELS,
783 EVAS_OP_MAP_90MUL_BLEND_PIXELS,
784 EVAS_OP_MAP_90MUL_COPY_ALPHA_MUL_PIXELS,
785 EVAS_OP_MAP_90MUL_BLEND_COLOR_MUL_PIXELS,
786 EVAS_OP_COUNT // marker for last one
787 // XXX: line? poly? or just made up of strips of the above?
788} Evas_Optype;
789
790struct _Evas_Opset
791{
792 Eina_Bool ops[EVAS_OP_COUNT];
756}; 793};
757 794
758struct _Evas_Func 795struct _Evas_Func
@@ -899,6 +936,9 @@ struct _Evas_Func
899 936
900 /* max size query */ 937 /* max size query */
901 void (*image_max_size_get) (void *data, int *maxw, int *maxh); 938 void (*image_max_size_get) (void *data, int *maxw, int *maxh);
939
940 /* pre-seed the engine with the kind of ops it will need */
941 void (*opset_eval) (void *data, Evas_Opset *ops);
902}; 942};
903 943
904struct _Evas_Image_Load_Func 944struct _Evas_Image_Load_Func
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 5c71b6cbde..bdb34f4127 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -3438,7 +3438,7 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
3438 evas_output_size_set(ee->evas, w, h); 3438 evas_output_size_set(ee->evas, w, h);
3439 evas_output_viewport_set(ee->evas, 0, 0, w, h); 3439 evas_output_viewport_set(ee->evas, 0, 0, w, h);
3440 3440
3441 if (parent == 0) parent = DefaultRootWindow(ecore_x_display_get()); 3441 if (parent == 0) parent = ecore_x_window_root_first_get();
3442 edata->win_root = parent; 3442 edata->win_root = parent;
3443 3443
3444 if (edata->win_root != 0) 3444 if (edata->win_root != 0)
diff --git a/src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h b/src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h
index aceb2ff8ae..04e1c4c82d 100644
--- a/src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h
+++ b/src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h
@@ -1,8 +1,6 @@
1#ifndef _EVAS_ENGINE_GL_X11_H 1#ifndef _EVAS_ENGINE_GL_X11_H
2#define _EVAS_ENGINE_GL_X11_H 2#define _EVAS_ENGINE_GL_X11_H
3 3
4#include <X11/Xlib.h>
5
6typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11; 4typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11;
7 5
8/* have this feature */ 6/* have this feature */
@@ -25,21 +23,21 @@ struct _Evas_Engine_Info_GL_X11
25 23
26 /* engine specific data & parameters it needs to set up */ 24 /* engine specific data & parameters it needs to set up */
27 struct { 25 struct {
28 Display *display; 26 void *display;
29 Drawable drawable; 27 unsigned long drawable;
30 Visual *visual; 28 void *visual;
31 Colormap colormap; 29 unsigned long colormap;
32 int depth; 30 int depth;
33 int screen; 31 int screen;
34 int rotation; 32 int rotation;
35 unsigned int destination_alpha : 1; 33 unsigned int destination_alpha : 1;
36 } info; 34 } info;
37 /* engine specific function calls to query stuff about the destination */ 35 /* engine specific function calls to query stuff about the destination */
38 /* engine (what visual & colormap & depth to use, performance info etc. */ 36 /* engine (what visual & colormap & depth to use, performance info etc. */
39 struct { 37 struct {
40 Visual * (*best_visual_get) (Evas_Engine_Info_GL_X11 *einfo); 38 void *(*best_visual_get) (Evas_Engine_Info_GL_X11 *einfo);
41 Colormap (*best_colormap_get) (Evas_Engine_Info_GL_X11 *einfo); 39 unsigned long (*best_colormap_get) (Evas_Engine_Info_GL_X11 *einfo);
42 int (*best_depth_get) (Evas_Engine_Info_GL_X11 *einfo); 40 int (*best_depth_get) (Evas_Engine_Info_GL_X11 *einfo);
43 } func; 41 } func;
44 42
45 struct { 43 struct {