|
|
|
@ -3,90 +3,10 @@
|
|
|
|
|
#include "evas_engine.h"
|
|
|
|
|
#include "Evas_Engine_XRender_X11.h"
|
|
|
|
|
|
|
|
|
|
static void *eng_info(Evas *e);
|
|
|
|
|
static void eng_info_free(Evas *e, void *info);
|
|
|
|
|
static void eng_setup(Evas *e, void *info);
|
|
|
|
|
static void eng_output_free(void *data);
|
|
|
|
|
static void eng_output_resize(void *data, int w, int h);
|
|
|
|
|
static void eng_output_tile_size_set(void *data, int w, int h);
|
|
|
|
|
static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h);
|
|
|
|
|
static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h);
|
|
|
|
|
static void eng_output_redraws_clear(void *data);
|
|
|
|
|
static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
|
|
|
|
|
static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h);
|
|
|
|
|
static void eng_output_flush(void *data);
|
|
|
|
|
static void *eng_context_new(void *data);
|
|
|
|
|
static void eng_context_free(void *data, void *context);
|
|
|
|
|
static void eng_context_clip_set(void *data, void *context, int x, int y, int w, int h);
|
|
|
|
|
static void eng_context_clip_clip(void *data, void *context, int x, int y, int w, int h);
|
|
|
|
|
static void eng_context_clip_unset(void *data, void *context);
|
|
|
|
|
static int eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h);
|
|
|
|
|
static void eng_context_color_set(void *data, void *context, int r, int g, int b, int a);
|
|
|
|
|
static int eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a);
|
|
|
|
|
static void eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a);
|
|
|
|
|
static void eng_context_multiplier_unset(void *data, void *context);
|
|
|
|
|
static int eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a);
|
|
|
|
|
static void eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h);
|
|
|
|
|
static void eng_context_cutout_clear(void *data, void *context);
|
|
|
|
|
static void eng_context_anti_alias_set(void *data, void *context, unsigned char aa);
|
|
|
|
|
static unsigned char eng_context_anti_alias_get(void *data, void *context);
|
|
|
|
|
static void eng_context_color_interpolation_set(void *data, void *context, int color_space);
|
|
|
|
|
static int eng_context_color_interpolation_get(void *data, void *context);
|
|
|
|
|
static void eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h);
|
|
|
|
|
static void eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
|
|
|
|
|
static void *eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y);
|
|
|
|
|
static void *eng_polygon_points_clear(void *data, void *context, void *polygon);
|
|
|
|
|
static void eng_polygon_draw(void *data, void *context, void *surface, void *polygon);
|
|
|
|
|
static void *eng_gradient_color_add(void *data, void *context, void *gradient, int r, int g, int b, int a, int distance);
|
|
|
|
|
static void *eng_gradient_colors_clear(void *data, void *context, void *gradient);
|
|
|
|
|
static void eng_gradient_free(void *data, void *gradient);
|
|
|
|
|
static void eng_gradient_fill_set(void *data, void *gradient, int x, int y, int w, int h);
|
|
|
|
|
static void eng_gradient_type_set(void *data, void *gradient, char *name);
|
|
|
|
|
static void eng_gradient_type_params_set(void *data, void *gradient, char *params);
|
|
|
|
|
static void *eng_gradient_geometry_init(void *data, void *gradient, int spread);
|
|
|
|
|
static int eng_gradient_alpha_get(void *data, void *gradient, int spread);
|
|
|
|
|
static void eng_gradient_map(void *data, void *context, void *gradient, int spread);
|
|
|
|
|
static void eng_gradient_draw(void *data, void *context, void *surface, void *gradient, int x, int y, int w, int h, double angle, int spread);
|
|
|
|
|
static void *eng_image_load(void *data, char *file, char *key, int *error);
|
|
|
|
|
static void *eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data);
|
|
|
|
|
static void *eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data);
|
|
|
|
|
static void eng_image_free(void *data, void *image);
|
|
|
|
|
static void eng_image_size_get(void *data, void *image, int *w, int *h);
|
|
|
|
|
static void *eng_image_size_set(void *data, void *image, int w, int h);
|
|
|
|
|
static void *eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h);
|
|
|
|
|
static void *eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data);
|
|
|
|
|
static void *eng_image_data_put(void *data, void *image, DATA32 *image_data);
|
|
|
|
|
static void *eng_image_alpha_set(void *data, void *image, int has_alpha);
|
|
|
|
|
static int eng_image_alpha_get(void *data, void *image);
|
|
|
|
|
static void eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth);
|
|
|
|
|
static char *eng_image_comment_get(void *data, void *image, char *key);
|
|
|
|
|
static char *eng_image_format_get(void *data, void *image);
|
|
|
|
|
static void eng_image_cache_flush(void *data);
|
|
|
|
|
static void eng_image_cache_set(void *data, int bytes);
|
|
|
|
|
static int eng_image_cache_get(void *data);
|
|
|
|
|
static void *eng_font_load(void *data, char *name, int size);
|
|
|
|
|
static void *eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size);
|
|
|
|
|
static void *eng_font_add(void *data, void *font, char *name, int size);
|
|
|
|
|
static void *eng_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size);
|
|
|
|
|
static void eng_font_free(void *data, void *font);
|
|
|
|
|
static int eng_font_ascent_get(void *data, void *font);
|
|
|
|
|
static int eng_font_descent_get(void *data, void *font);
|
|
|
|
|
static int eng_font_max_ascent_get(void *data, void *font);
|
|
|
|
|
static int eng_font_max_descent_get(void *data, void *font);
|
|
|
|
|
static void eng_font_string_size_get(void *data, void *font, char *text, int *w, int *h);
|
|
|
|
|
static int eng_font_inset_get(void *data, void *font, char *text);
|
|
|
|
|
static int eng_font_h_advance_get(void *data, void *font, char *text);
|
|
|
|
|
static int eng_font_v_advance_get(void *data, void *font, char *text);
|
|
|
|
|
static int eng_font_char_coords_get(void *data, void *font, char *text, int pos, int *cx, int *cy, int *cw, int *ch);
|
|
|
|
|
static int eng_font_char_at_coords_get(void *data, void *font, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
|
|
|
|
|
static void eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, char *text);
|
|
|
|
|
static void eng_font_cache_flush(void *data);
|
|
|
|
|
static void eng_font_cache_set(void *data, int bytes);
|
|
|
|
|
static int eng_font_cache_get(void *data);
|
|
|
|
|
|
|
|
|
|
static void eng_font_hinting_set(void *data, void *font, int hinting);
|
|
|
|
|
static int eng_font_hinting_can_hint(void *data, int hinting);
|
|
|
|
|
/* function tables - filled in later (func and parent func) */
|
|
|
|
|
static Evas_Func func, pfunc;
|
|
|
|
|
|
|
|
|
|
/* engine struct data */
|
|
|
|
|
typedef struct _Render_Engine Render_Engine;
|
|
|
|
|
typedef struct _Render_Engine_Update Render_Engine_Update;
|
|
|
|
|
|
|
|
|
@ -116,102 +36,54 @@ struct _Render_Engine
|
|
|
|
|
Evas_List *updates;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static Evas_Func eng_func =
|
|
|
|
|
{
|
|
|
|
|
eng_info,
|
|
|
|
|
eng_info_free,
|
|
|
|
|
eng_setup,
|
|
|
|
|
eng_output_free,
|
|
|
|
|
eng_output_resize,
|
|
|
|
|
eng_output_tile_size_set,
|
|
|
|
|
eng_output_redraws_rect_add,
|
|
|
|
|
eng_output_redraws_rect_del,
|
|
|
|
|
eng_output_redraws_clear,
|
|
|
|
|
eng_output_redraws_next_update_get,
|
|
|
|
|
eng_output_redraws_next_update_push,
|
|
|
|
|
eng_output_flush,
|
|
|
|
|
/* draw context virtual methods */
|
|
|
|
|
eng_context_new,
|
|
|
|
|
eng_context_free,
|
|
|
|
|
eng_context_clip_set,
|
|
|
|
|
eng_context_clip_clip,
|
|
|
|
|
eng_context_clip_unset,
|
|
|
|
|
eng_context_clip_get,
|
|
|
|
|
eng_context_color_set,
|
|
|
|
|
eng_context_color_get,
|
|
|
|
|
eng_context_multiplier_set,
|
|
|
|
|
eng_context_multiplier_unset,
|
|
|
|
|
eng_context_multiplier_get,
|
|
|
|
|
eng_context_cutout_add,
|
|
|
|
|
eng_context_cutout_clear,
|
|
|
|
|
eng_context_anti_alias_set,
|
|
|
|
|
eng_context_anti_alias_get,
|
|
|
|
|
eng_context_color_interpolation_set,
|
|
|
|
|
eng_context_color_interpolation_get,
|
|
|
|
|
/* rectangle draw funcs */
|
|
|
|
|
eng_rectangle_draw,
|
|
|
|
|
/* line draw funcs */
|
|
|
|
|
eng_line_draw,
|
|
|
|
|
/* polygon draw funcs */
|
|
|
|
|
eng_polygon_point_add,
|
|
|
|
|
eng_polygon_points_clear,
|
|
|
|
|
eng_polygon_draw,
|
|
|
|
|
/* gradient draw funcs */
|
|
|
|
|
eng_gradient_color_add,
|
|
|
|
|
eng_gradient_colors_clear,
|
|
|
|
|
eng_gradient_free,
|
|
|
|
|
eng_gradient_fill_set,
|
|
|
|
|
eng_gradient_type_set,
|
|
|
|
|
eng_gradient_type_params_set,
|
|
|
|
|
eng_gradient_geometry_init,
|
|
|
|
|
eng_gradient_alpha_get,
|
|
|
|
|
eng_gradient_map,
|
|
|
|
|
eng_gradient_draw,
|
|
|
|
|
/* image draw funcs */
|
|
|
|
|
eng_image_load,
|
|
|
|
|
eng_image_new_from_data,
|
|
|
|
|
eng_image_new_from_copied_data,
|
|
|
|
|
eng_image_free,
|
|
|
|
|
eng_image_size_get,
|
|
|
|
|
eng_image_size_set,
|
|
|
|
|
eng_image_dirty_region,
|
|
|
|
|
eng_image_data_get,
|
|
|
|
|
eng_image_data_put,
|
|
|
|
|
eng_image_alpha_set,
|
|
|
|
|
eng_image_alpha_get,
|
|
|
|
|
eng_image_draw,
|
|
|
|
|
eng_image_comment_get,
|
|
|
|
|
eng_image_format_get,
|
|
|
|
|
/* image cache funcs */
|
|
|
|
|
eng_image_cache_flush,
|
|
|
|
|
eng_image_cache_set,
|
|
|
|
|
eng_image_cache_get,
|
|
|
|
|
/* font draw functions */
|
|
|
|
|
eng_font_load,
|
|
|
|
|
eng_font_memory_load,
|
|
|
|
|
eng_font_add,
|
|
|
|
|
eng_font_memory_add,
|
|
|
|
|
eng_font_free,
|
|
|
|
|
eng_font_ascent_get,
|
|
|
|
|
eng_font_descent_get,
|
|
|
|
|
eng_font_max_ascent_get,
|
|
|
|
|
eng_font_max_descent_get,
|
|
|
|
|
eng_font_string_size_get,
|
|
|
|
|
eng_font_inset_get,
|
|
|
|
|
eng_font_h_advance_get,
|
|
|
|
|
eng_font_v_advance_get,
|
|
|
|
|
eng_font_char_coords_get,
|
|
|
|
|
eng_font_char_at_coords_get,
|
|
|
|
|
eng_font_draw,
|
|
|
|
|
/* font cache functions */
|
|
|
|
|
eng_font_cache_flush,
|
|
|
|
|
eng_font_cache_set,
|
|
|
|
|
eng_font_cache_get,
|
|
|
|
|
|
|
|
|
|
eng_font_hinting_set,
|
|
|
|
|
eng_font_hinting_can_hint
|
|
|
|
|
};
|
|
|
|
|
/* prototypes we will use here */
|
|
|
|
|
static void *eng_info(Evas *e);
|
|
|
|
|
static void eng_info_free(Evas *e, void *info);
|
|
|
|
|
static void eng_setup(Evas *e, void *info);
|
|
|
|
|
static void eng_output_free(void *data);
|
|
|
|
|
static void eng_output_resize(void *data, int w, int h);
|
|
|
|
|
static void eng_output_tile_size_set(void *data, int w, int h);
|
|
|
|
|
static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h);
|
|
|
|
|
static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h);
|
|
|
|
|
static void eng_output_redraws_clear(void *data);
|
|
|
|
|
static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
|
|
|
|
|
static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h);
|
|
|
|
|
static void eng_output_flush(void *data);
|
|
|
|
|
static void eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h);
|
|
|
|
|
static void eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
|
|
|
|
|
static void eng_polygon_draw(void *data, void *context, void *surface, void *polygon);
|
|
|
|
|
static void *eng_gradient_color_add(void *data, void *context, void *gradient, int r, int g, int b, int a, int distance);
|
|
|
|
|
static void *eng_gradient_colors_clear(void *data, void *context, void *gradient);
|
|
|
|
|
static void eng_gradient_free(void *data, void *gradient);
|
|
|
|
|
static void eng_gradient_fill_set(void *data, void *gradient, int x, int y, int w, int h);
|
|
|
|
|
static void eng_gradient_type_set(void *data, void *gradient, char *name);
|
|
|
|
|
static void eng_gradient_type_params_set(void *data, void *gradient, char *params);
|
|
|
|
|
static void *eng_gradient_geometry_init(void *data, void *gradient, int spread);
|
|
|
|
|
static int eng_gradient_alpha_get(void *data, void *gradient, int spread);
|
|
|
|
|
static void eng_gradient_map(void *data, void *context, void *gradient, int spread);
|
|
|
|
|
static void eng_gradient_draw(void *data, void *context, void *surface, void *gradient, int x, int y, int w, int h, double angle, int spread);
|
|
|
|
|
static void *eng_image_load(void *data, char *file, char *key, int *error);
|
|
|
|
|
static void *eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data);
|
|
|
|
|
static void *eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data);
|
|
|
|
|
static void eng_image_free(void *data, void *image);
|
|
|
|
|
static void eng_image_size_get(void *data, void *image, int *w, int *h);
|
|
|
|
|
static void *eng_image_size_set(void *data, void *image, int w, int h);
|
|
|
|
|
static void *eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h);
|
|
|
|
|
static void *eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data);
|
|
|
|
|
static void *eng_image_data_put(void *data, void *image, DATA32 *image_data);
|
|
|
|
|
static void *eng_image_alpha_set(void *data, void *image, int has_alpha);
|
|
|
|
|
static int eng_image_alpha_get(void *data, void *image);
|
|
|
|
|
static void eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth);
|
|
|
|
|
static char *eng_image_comment_get(void *data, void *image, char *key);
|
|
|
|
|
static char *eng_image_format_get(void *data, void *image);
|
|
|
|
|
static void eng_image_cache_flush(void *data);
|
|
|
|
|
static void eng_image_cache_set(void *data, int bytes);
|
|
|
|
|
static int eng_image_cache_get(void *data);
|
|
|
|
|
static void eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, char *text);
|
|
|
|
|
|
|
|
|
|
/* internal engine routines */
|
|
|
|
|
|
|
|
|
|
/* engine api this module provides */
|
|
|
|
|
static void *
|
|
|
|
|
eng_info(Evas *e)
|
|
|
|
|
{
|
|
|
|
@ -469,181 +341,9 @@ eng_output_flush(void *data)
|
|
|
|
|
_xr_image_info_pool_flush(re->xinf, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_context_new(void *data)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_draw_context_new();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_free(void *data, void *context)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_free(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_clip_set(void *data, void *context, int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_set_clip(context, x, y, w, h);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_clip_clip(void *data, void *context, int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_clip_clip(context, x, y, w, h);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_clip_unset(void *data, void *context)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_unset_clip(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
*x = ((RGBA_Draw_Context *)context)->clip.x;
|
|
|
|
|
*y = ((RGBA_Draw_Context *)context)->clip.y;
|
|
|
|
|
*w = ((RGBA_Draw_Context *)context)->clip.w;
|
|
|
|
|
*h = ((RGBA_Draw_Context *)context)->clip.h;
|
|
|
|
|
return ((RGBA_Draw_Context *)context)->clip.use;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_color_set(void *data, void *context, int r, int g, int b, int a)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_set_color(context, r, g, b, a);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
*r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->col.col));
|
|
|
|
|
*g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->col.col));
|
|
|
|
|
*b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->col.col));
|
|
|
|
|
*a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->col.col));
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_set_multiplier(context, r, g, b, a);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_multiplier_unset(void *data, void *context)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_unset_multiplier(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
*r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->mul.col));
|
|
|
|
|
*g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->mul.col));
|
|
|
|
|
*b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->mul.col));
|
|
|
|
|
*a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->mul.col));
|
|
|
|
|
return ((RGBA_Draw_Context *)context)->mul.use;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_add_cutout(context, x, y, w, h);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_cutout_clear(void *data, void *context)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_clear_cutouts(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_anti_alias_set(void *data, void *context, unsigned char aa)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_set_anti_alias(context, aa);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static unsigned char
|
|
|
|
|
eng_context_anti_alias_get(void *data, void *context)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return ((RGBA_Draw_Context *)context)->anti_alias;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_context_color_interpolation_set(void *data, void *context, int color_space)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_draw_context_set_color_interpolation(context, color_space);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_context_color_interpolation_get(void *data, void *context)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return ((RGBA_Draw_Context *)context)->interpolation.color_space;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xr_render_surface_rectangle_draw((Xrender_Surface *)surface,
|
|
|
|
|
(RGBA_Draw_Context *)context,
|
|
|
|
|
x, y, w, h);
|
|
|
|
@ -652,36 +352,12 @@ eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w
|
|
|
|
|
static void
|
|
|
|
|
eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xr_render_surface_line_draw((Xrender_Surface *)surface, (RGBA_Draw_Context *)context, x1, y1, x2, y2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_polygon_point_add(polygon, x, y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_polygon_points_clear(void *data, void *context, void *polygon)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_polygon_points_clear(polygon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xre_poly_draw((Xrender_Surface *)surface, (RGBA_Draw_Context *)context, (RGBA_Polygon_Point *)polygon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -697,81 +373,54 @@ eng_gradient_color_add(void *data, void *context, void *gradient, int r, int g,
|
|
|
|
|
static void *
|
|
|
|
|
eng_gradient_colors_clear(void *data, void *context, void *gradient)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return _xre_gradient_colors_clear((XR_Gradient *)gradient);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_gradient_free(void *data, void *gradient)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xre_gradient_free((XR_Gradient *)gradient);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_gradient_fill_set(void *data, void *gradient, int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xre_gradient_fill_set((XR_Gradient *)gradient, x, y, w, h);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_gradient_type_set(void *data, void *gradient, char *name)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xre_gradient_type_set((XR_Gradient *)gradient, name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_gradient_type_params_set(void *data, void *gradient, char *params)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xre_gradient_type_params_set((XR_Gradient *)gradient, params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_gradient_geometry_init(void *data, void *gradient, int spread)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return _xre_gradient_geometry_init((XR_Gradient *)gradient, spread);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_gradient_alpha_get(void *data, void *gradient, int spread)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return _xre_gradient_alpha_get((XR_Gradient *)gradient, spread);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_gradient_map(void *data, void *context, void *gradient, int spread)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xre_gradient_map((RGBA_Draw_Context *)context, (XR_Gradient *)gradient, spread);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_gradient_draw(void *data, void *context, void *surface, void *gradient, int x, int y, int w, int h, double angle, int spread)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
_xre_gradient_draw((Xrender_Surface *)surface,
|
|
|
|
|
(RGBA_Draw_Context *)context,
|
|
|
|
|
(XR_Gradient *)gradient, x, y, w, h, angle, spread);
|
|
|
|
@ -814,9 +463,6 @@ eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data)
|
|
|
|
|
static void
|
|
|
|
|
eng_image_free(void *data, void *image)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return;
|
|
|
|
|
_xre_image_free((XR_Image *)image);
|
|
|
|
|
}
|
|
|
|
@ -824,9 +470,6 @@ eng_image_free(void *data, void *image)
|
|
|
|
|
static void
|
|
|
|
|
eng_image_size_get(void *data, void *image, int *w, int *h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return;
|
|
|
|
|
if (w) *w = ((XR_Image *)image)->w;
|
|
|
|
|
if (h) *h = ((XR_Image *)image)->h;
|
|
|
|
@ -835,9 +478,6 @@ eng_image_size_get(void *data, void *image, int *w, int *h)
|
|
|
|
|
static void *
|
|
|
|
|
eng_image_size_set(void *data, void *image, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return image;
|
|
|
|
|
if ((w <= 0) || (h <= 0))
|
|
|
|
|
{
|
|
|
|
@ -867,9 +507,6 @@ eng_image_size_set(void *data, void *image, int w, int h)
|
|
|
|
|
static void *
|
|
|
|
|
eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return image;
|
|
|
|
|
_xre_image_dirty((XR_Image *)image);
|
|
|
|
|
_xre_image_region_dirty((XR_Image *)image, x, y, w, h);
|
|
|
|
@ -879,9 +516,6 @@ eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
|
|
|
|
|
static void *
|
|
|
|
|
eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return image;
|
|
|
|
|
if (to_write)
|
|
|
|
|
{
|
|
|
|
@ -909,9 +543,6 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
|
|
|
|
|
static void *
|
|
|
|
|
eng_image_data_put(void *data, void *image, DATA32 *image_data)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return image;
|
|
|
|
|
if (_xre_image_data_get((XR_Image *)image) != image_data)
|
|
|
|
|
{
|
|
|
|
@ -948,9 +579,6 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data)
|
|
|
|
|
static void *
|
|
|
|
|
eng_image_alpha_set(void *data, void *image, int has_alpha)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return image;
|
|
|
|
|
if (((((XR_Image *)image)->alpha) && (has_alpha)) ||
|
|
|
|
|
((!((XR_Image *)image)->alpha) && (!has_alpha)))
|
|
|
|
@ -978,9 +606,6 @@ eng_image_alpha_set(void *data, void *image, int has_alpha)
|
|
|
|
|
static int
|
|
|
|
|
eng_image_alpha_get(void *data, void *image)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return 0;
|
|
|
|
|
return _xre_image_alpha_get((XR_Image *)image);
|
|
|
|
|
}
|
|
|
|
@ -988,9 +613,6 @@ eng_image_alpha_get(void *data, void *image)
|
|
|
|
|
static void
|
|
|
|
|
eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if ((!image) || (!surface)) return;
|
|
|
|
|
_xre_image_surface_gen((XR_Image *)image);
|
|
|
|
|
if (((XR_Image *)image)->surface)
|
|
|
|
@ -1005,9 +627,6 @@ eng_image_draw(void *data, void *context, void *surface, void *image, int src_x,
|
|
|
|
|
static char *
|
|
|
|
|
eng_image_comment_get(void *data, void *image, char *key)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return NULL;
|
|
|
|
|
return ((XR_Image *)image)->comment;
|
|
|
|
|
}
|
|
|
|
@ -1015,9 +634,6 @@ eng_image_comment_get(void *data, void *image, char *key)
|
|
|
|
|
static char *
|
|
|
|
|
eng_image_format_get(void *data, void *image)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
if (!image) return NULL;
|
|
|
|
|
return ((XR_Image *)image)->format;
|
|
|
|
|
}
|
|
|
|
@ -1025,13 +641,9 @@ eng_image_format_get(void *data, void *image)
|
|
|
|
|
static void
|
|
|
|
|
eng_image_cache_flush(void *data)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
int tmp_size;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
tmp_size = evas_common_image_get_cache();
|
|
|
|
|
evas_common_image_set_cache(0);
|
|
|
|
|
evas_common_image_set_cache(tmp_size);
|
|
|
|
|
|
|
|
|
|
pfunc.image_cache_flush(data);
|
|
|
|
|
_xre_image_cache_set(0);
|
|
|
|
|
_xre_image_cache_set(tmp_size);
|
|
|
|
|
}
|
|
|
|
@ -1039,159 +651,14 @@ eng_image_cache_flush(void *data)
|
|
|
|
|
static void
|
|
|
|
|
eng_image_cache_set(void *data, int bytes)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_image_set_cache(bytes);
|
|
|
|
|
pfunc.image_cache_set(data, bytes);
|
|
|
|
|
_xre_image_cache_set(bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_image_cache_get(void *data)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_image_get_cache();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_font_load(void *data, char *name, int size)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_load(name, size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_memory_load(name, size, fdata, fdata_size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_font_add(void *data, void *font, char *name, int size)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_add(font, name, size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
eng_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_memory_add(font, name, size, fdata, fdata_size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_font_free(void *data, void *font)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_font_free(font);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_ascent_get(void *data, void *font)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_ascent_get(font);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_descent_get(void *data, void *font)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_descent_get(font);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_max_ascent_get(void *data, void *font)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_max_ascent_get(font);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_max_descent_get(void *data, void *font)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_max_descent_get(font);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_font_string_size_get(void *data, void *font, char *text, int *w, int *h)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_font_query_size(font, text, w, h);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_inset_get(void *data, void *font, char *text)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_query_inset(font, text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_h_advance_get(void *data, void *font, char *text)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
int h, v;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_font_query_advance(font, text, &h, &v);
|
|
|
|
|
return h;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_v_advance_get(void *data, void *font, char *text)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
int h, v;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_font_query_advance(font, text, &h, &v);
|
|
|
|
|
return v;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_char_coords_get(void *data, void *font, char *text, int pos, int *cx, int *cy, int *cw, int *ch)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_query_char_coords(font, text, pos, cx, cy, cw, ch);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_char_at_coords_get(void *data, void *font, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_query_text_at_pos(font, text, x, y, cx, cy, cw, ch);
|
|
|
|
|
return pfunc.image_cache_get(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
@ -1228,61 +695,68 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_font_cache_flush(void *data)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_font_flush();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_font_cache_set(void *data, int bytes)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_font_cache_set(bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_cache_get(void *data)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_font_cache_get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
eng_font_hinting_set(void *data, void *font, int hinting)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
evas_common_font_hinting_set(font, hinting);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
eng_font_hinting_can_hint(void *data, int hinting)
|
|
|
|
|
{
|
|
|
|
|
Render_Engine *re;
|
|
|
|
|
|
|
|
|
|
re = (Render_Engine *)data;
|
|
|
|
|
return evas_common_hinting_available(hinting);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int module_open(Evas_Module *em)
|
|
|
|
|
/* module advertising code */
|
|
|
|
|
int
|
|
|
|
|
module_open(Evas_Module *em)
|
|
|
|
|
{
|
|
|
|
|
if (!em) return 0;
|
|
|
|
|
em->functions = (void *)(&eng_func);
|
|
|
|
|
/* get whatever engine module we inherit from */
|
|
|
|
|
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
|
|
|
|
|
/* store it for later use */
|
|
|
|
|
func = pfunc;
|
|
|
|
|
/* now to override methods */
|
|
|
|
|
#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_)
|
|
|
|
|
ORD(info);
|
|
|
|
|
ORD(info_free);
|
|
|
|
|
ORD(setup);
|
|
|
|
|
ORD(output_free);
|
|
|
|
|
ORD(output_resize);
|
|
|
|
|
ORD(output_tile_size_set);
|
|
|
|
|
ORD(output_redraws_rect_add);
|
|
|
|
|
ORD(output_redraws_rect_del);
|
|
|
|
|
ORD(output_redraws_clear);
|
|
|
|
|
ORD(output_redraws_next_update_get);
|
|
|
|
|
ORD(output_redraws_next_update_push);
|
|
|
|
|
ORD(output_flush);
|
|
|
|
|
ORD(rectangle_draw);
|
|
|
|
|
ORD(line_draw);
|
|
|
|
|
ORD(polygon_draw);
|
|
|
|
|
ORD(gradient_color_add);
|
|
|
|
|
ORD(gradient_colors_clear);
|
|
|
|
|
ORD(gradient_free);
|
|
|
|
|
ORD(gradient_fill_set);
|
|
|
|
|
ORD(gradient_type_set);
|
|
|
|
|
ORD(gradient_type_params_set);
|
|
|
|
|
ORD(gradient_geometry_init);
|
|
|
|
|
ORD(gradient_alpha_get);
|
|
|
|
|
ORD(gradient_map);
|
|
|
|
|
ORD(gradient_draw);
|
|
|
|
|
ORD(image_load);
|
|
|
|
|
ORD(image_new_from_data);
|
|
|
|
|
ORD(image_new_from_copied_data);
|
|
|
|
|
ORD(image_free);
|
|
|
|
|
ORD(image_size_get);
|
|
|
|
|
ORD(image_size_set);
|
|
|
|
|
ORD(image_dirty_region);
|
|
|
|
|
ORD(image_data_get);
|
|
|
|
|
ORD(image_data_put);
|
|
|
|
|
ORD(image_alpha_set);
|
|
|
|
|
ORD(image_alpha_get);
|
|
|
|
|
ORD(image_draw);
|
|
|
|
|
ORD(image_comment_get);
|
|
|
|
|
ORD(image_format_get);
|
|
|
|
|
ORD(image_cache_flush);
|
|
|
|
|
ORD(image_cache_set);
|
|
|
|
|
ORD(image_cache_get);
|
|
|
|
|
ORD(font_draw);
|
|
|
|
|
/* now advertise out own api */
|
|
|
|
|
em->functions = (void *)(&func);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void module_close(void)
|
|
|
|
|
void
|
|
|
|
|
module_close(void)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Evas_Module_Api evas_modapi =
|
|
|
|
|