forked from enlightenment/efl
Add missing evas_common prefix, avoid symbol redefinition.
soft16 was written as a single engine, thus it was all static/global and had no EAPI in its functions, but then it was moved into "src/lib/common_16" and got that, but got no prefix! That could cause clash with other libraries, so adding such prefix. soft8 was a copy of 16, thus had the same problems. the engines were all based on software_x11, thus they defined the same methods to deal with Xlib, however if you link them all in the same binary (--enable-MODULE=static), the symbol would be redefined. Rename symbols according to their module. SVN revision: 52420
This commit is contained in:
parent
d128fb54a0
commit
a22dac6ea3
|
@ -213,7 +213,7 @@ _soft16_convert_from_rgba_scanline(const DATA32 *src, DATA16 *dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
|
||||
evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
|
||||
{
|
||||
const DATA32 *sp;
|
||||
DATA16 *dp;
|
||||
|
@ -279,7 +279,7 @@ _soft16_convert_from_rgb_scanline(const DATA32 *src, DATA16 *dst, const int y,
|
|||
}
|
||||
|
||||
void
|
||||
soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src)
|
||||
evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src)
|
||||
{
|
||||
const DATA32 *sp;
|
||||
DATA16 *dp;
|
||||
|
|
|
@ -239,7 +239,7 @@ _soft16_font_glyph_draw_mono(Soft16_Image *dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
|
||||
evas_common_soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
|
||||
RGBA_Font_Glyph *fg, int x, int y)
|
||||
{
|
||||
Soft16_Image *dst;
|
||||
|
@ -284,12 +284,12 @@ soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
|
|||
}
|
||||
|
||||
void *
|
||||
soft16_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__)
|
||||
evas_common_soft16_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__)
|
||||
{
|
||||
return (void *)1; /* core requires != NULL to work */
|
||||
}
|
||||
|
||||
void
|
||||
soft16_font_glyph_free(void *ext_dat __UNUSED__)
|
||||
evas_common_soft16_font_glyph_free(void *ext_dat __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -416,7 +416,7 @@ _soft16_image_draw_scaled_mul(Soft16_Image *src, Soft16_Image *dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst,
|
||||
evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
const Eina_Rectangle sr,
|
||||
const Eina_Rectangle dr,
|
||||
|
|
|
@ -239,7 +239,7 @@ _soft16_image_draw_unscaled_mul(Soft16_Image *src, Soft16_Image *dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst,
|
||||
evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
const Eina_Rectangle sr,
|
||||
const Eina_Rectangle dr,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "evas_soft16_scanline_fill.c"
|
||||
|
||||
/*
|
||||
* All functions except by soft16_line_draw() expect x0 <= x1.
|
||||
* All functions except by evas_common_soft16_line_draw() expect x0 <= x1.
|
||||
*/
|
||||
|
||||
static inline int
|
||||
|
@ -370,7 +370,7 @@ _soft16_line_aliased(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
|
|||
}
|
||||
|
||||
void
|
||||
soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
|
||||
evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
|
||||
{
|
||||
struct RGBA_Draw_Context_clip c_bkp, c_tmp;
|
||||
int dx, dy;
|
||||
|
|
|
@ -284,9 +284,9 @@ _evas_common_load_soft16_image_data_from_file(Image_Entry *ie)
|
|||
|
||||
sp = im->source->image.data;
|
||||
if (im->alpha)
|
||||
soft16_image_convert_from_rgba(im, sp);
|
||||
evas_common_soft16_image_convert_from_rgba(im, sp);
|
||||
else
|
||||
soft16_image_convert_from_rgb(im, sp);
|
||||
evas_common_soft16_image_convert_from_rgb(im, sp);
|
||||
}
|
||||
evas_cache_image_drop(&im->source->cache_entry);
|
||||
im->cache_entry.info.module = NULL;
|
||||
|
@ -297,14 +297,14 @@ _evas_common_load_soft16_image_data_from_file(Image_Entry *ie)
|
|||
}
|
||||
|
||||
/* Soft16_Image * */
|
||||
/* soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */
|
||||
/* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */
|
||||
/* int copy) */
|
||||
/* { */
|
||||
/* Soft16_Image *im; */
|
||||
|
||||
/* if (stride < 0) stride = _calc_stride(w); */
|
||||
|
||||
/* im = soft16_image_alloc(w, h, stride, have_alpha, copy); */
|
||||
/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */
|
||||
/* if (!im) return NULL; */
|
||||
|
||||
/* if (pixels) */
|
||||
|
@ -460,13 +460,13 @@ _soft16_image_draw_sampled_int(Soft16_Image *src, Soft16_Image *dst,
|
|||
return;
|
||||
|
||||
if ((dr.w == sr.w) && (dr.h == sr.h))
|
||||
soft16_image_draw_unscaled(src, dst, dc, sr, dr, cr);
|
||||
evas_common_soft16_image_draw_unscaled(src, dst, dc, sr, dr, cr);
|
||||
else
|
||||
soft16_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
|
||||
evas_common_soft16_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
soft16_image_draw(Soft16_Image *src, Soft16_Image *dst,
|
||||
evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
|
@ -522,7 +522,7 @@ soft16_image_draw(Soft16_Image *src, Soft16_Image *dst,
|
|||
}
|
||||
|
||||
EAPI Soft16_Image *
|
||||
soft16_image_alpha_set(Soft16_Image *im, int have_alpha)
|
||||
evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha)
|
||||
{
|
||||
Soft16_Image *new_im;
|
||||
|
||||
|
@ -540,7 +540,7 @@ soft16_image_alpha_set(Soft16_Image *im, int have_alpha)
|
|||
}
|
||||
|
||||
/* Soft16_Image * */
|
||||
/* soft16_image_size_set(Soft16_Image *old_im, int w, int h) */
|
||||
/* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */
|
||||
/* { */
|
||||
/* Soft16_Image *new_im; */
|
||||
/* DATA16 *dp, *sp; */
|
||||
|
@ -548,7 +548,7 @@ soft16_image_alpha_set(Soft16_Image *im, int have_alpha)
|
|||
|
||||
/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */
|
||||
|
||||
/* new_im = soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
|
||||
/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
|
||||
|
||||
/* if (old_im->cache_entry.w < new_im->cache_entry.w) */
|
||||
/* cw = old_im->cache_entry.w; */
|
||||
|
|
|
@ -76,7 +76,7 @@ polygon_edge_sorter(const void *a, const void *b)
|
|||
}
|
||||
|
||||
void
|
||||
soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
|
||||
evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
|
||||
{
|
||||
RGBA_Polygon_Point *pt;
|
||||
RGBA_Vertex *point;
|
||||
|
|
|
@ -75,7 +75,7 @@ _soft16_rectangle_draw_int(Soft16_Image *dst, RGBA_Draw_Context *dc,
|
|||
}
|
||||
|
||||
void
|
||||
soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc,
|
||||
evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
Eina_Rectangle dr;
|
||||
|
|
|
@ -41,7 +41,7 @@ _soft8_convert_from_rgba_scanline(const DATA32 * src, DATA8 * dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src)
|
||||
evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src)
|
||||
{
|
||||
const DATA32 *sp;
|
||||
DATA8 *dp;
|
||||
|
@ -88,7 +88,7 @@ _soft8_convert_from_rgb_scanline(const DATA32 * src, DATA8 * dst, const int y,
|
|||
}
|
||||
|
||||
void
|
||||
soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src)
|
||||
evas_common_soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src)
|
||||
{
|
||||
const DATA32 *sp;
|
||||
DATA8 *dp;
|
||||
|
|
|
@ -227,7 +227,7 @@ _soft8_font_glyph_draw_mono(Soft8_Image * dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
|
||||
evas_common_soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
|
||||
RGBA_Font_Glyph * fg, int x, int y)
|
||||
{
|
||||
Soft8_Image *dst;
|
||||
|
@ -274,12 +274,12 @@ soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
|
|||
}
|
||||
|
||||
void *
|
||||
soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__)
|
||||
evas_common_soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__)
|
||||
{
|
||||
return (void *)1; /* core requires != NULL to work */
|
||||
}
|
||||
|
||||
void
|
||||
soft8_font_glyph_free(void *ext_dat __UNUSED__)
|
||||
evas_common_soft8_font_glyph_free(void *ext_dat __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ _soft8_image_draw_scaled_mul(Soft8_Image * src, Soft8_Image * dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft8_image_draw_scaled_sampled(Soft8_Image * src, Soft8_Image * dst,
|
||||
evas_common_soft8_image_draw_scaled_sampled(Soft8_Image * src, Soft8_Image * dst,
|
||||
RGBA_Draw_Context * dc,
|
||||
const Eina_Rectangle sr,
|
||||
const Eina_Rectangle dr,
|
||||
|
|
|
@ -236,7 +236,7 @@ _soft8_image_draw_unscaled_mul(Soft8_Image * src, Soft8_Image * dst,
|
|||
}
|
||||
|
||||
void
|
||||
soft8_image_draw_unscaled(Soft8_Image * src, Soft8_Image * dst,
|
||||
evas_common_soft8_image_draw_unscaled(Soft8_Image * src, Soft8_Image * dst,
|
||||
RGBA_Draw_Context * dc,
|
||||
const Eina_Rectangle sr,
|
||||
const Eina_Rectangle dr, const Eina_Rectangle cr)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "evas_soft8_scanline_fill.c"
|
||||
|
||||
/*
|
||||
* All functions except by soft8_line_draw() expect x0 <= x1.
|
||||
* All functions except by evas_common_soft8_line_draw() expect x0 <= x1.
|
||||
*/
|
||||
|
||||
static inline int
|
||||
|
@ -351,7 +351,7 @@ _soft8_line_aliased(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
|
|||
}
|
||||
|
||||
void
|
||||
soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
|
||||
evas_common_soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
|
||||
int x1, int y1)
|
||||
{
|
||||
struct RGBA_Draw_Context_clip c_bkp, c_tmp;
|
||||
|
|
|
@ -319,9 +319,9 @@ _evas_common_load_soft8_image_data_from_file(Image_Entry * ie)
|
|||
|
||||
sp = im->source->image.data;
|
||||
if (im->alpha)
|
||||
soft8_image_convert_from_rgba(im, sp);
|
||||
evas_common_soft8_image_convert_from_rgba(im, sp);
|
||||
else
|
||||
soft8_image_convert_from_rgb(im, sp);
|
||||
evas_common_soft8_image_convert_from_rgb(im, sp);
|
||||
}
|
||||
evas_cache_image_drop(&im->source->cache_entry);
|
||||
im->source = NULL;
|
||||
|
@ -330,14 +330,14 @@ _evas_common_load_soft8_image_data_from_file(Image_Entry * ie)
|
|||
}
|
||||
|
||||
/* Soft16_Image * */
|
||||
/* soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */
|
||||
/* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */
|
||||
/* int copy) */
|
||||
/* { */
|
||||
/* Soft16_Image *im; */
|
||||
|
||||
/* if (stride < 0) stride = _calc_stride(w); */
|
||||
|
||||
/* im = soft16_image_alloc(w, h, stride, have_alpha, copy); */
|
||||
/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */
|
||||
/* if (!im) return NULL; */
|
||||
|
||||
/* if (pixels) */
|
||||
|
@ -513,13 +513,13 @@ _soft8_image_draw_sampled_int(Soft8_Image * src, Soft8_Image * dst,
|
|||
return;
|
||||
|
||||
if ((dr.w == sr.w) && (dr.h == sr.h))
|
||||
soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr);
|
||||
evas_common_soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr);
|
||||
else
|
||||
soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
|
||||
evas_common_soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
soft8_image_draw(Soft8_Image * src, Soft8_Image * dst,
|
||||
evas_common_soft8_image_draw(Soft8_Image * src, Soft8_Image * dst,
|
||||
RGBA_Draw_Context * dc,
|
||||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
|
@ -584,7 +584,7 @@ soft8_image_draw(Soft8_Image * src, Soft8_Image * dst,
|
|||
}
|
||||
|
||||
EAPI Soft8_Image *
|
||||
soft8_image_alpha_set(Soft8_Image * im, int have_alpha)
|
||||
evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha)
|
||||
{
|
||||
Soft8_Image *new_im;
|
||||
|
||||
|
@ -605,7 +605,7 @@ soft8_image_alpha_set(Soft8_Image * im, int have_alpha)
|
|||
}
|
||||
|
||||
/* Soft16_Image * */
|
||||
/* soft16_image_size_set(Soft16_Image *old_im, int w, int h) */
|
||||
/* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */
|
||||
/* { */
|
||||
/* Soft16_Image *new_im; */
|
||||
/* DATA16 *dp, *sp; */
|
||||
|
@ -613,7 +613,7 @@ soft8_image_alpha_set(Soft8_Image * im, int have_alpha)
|
|||
|
||||
/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */
|
||||
|
||||
/* new_im = soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
|
||||
/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
|
||||
|
||||
/* if (old_im->cache_entry.w < new_im->cache_entry.w) */
|
||||
/* cw = old_im->cache_entry.w; */
|
||||
|
|
|
@ -76,7 +76,7 @@ polygon_edge_sorter(const void *a, const void *b)
|
|||
}
|
||||
|
||||
void
|
||||
soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
|
||||
evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
|
||||
RGBA_Polygon_Point * points, int x, int y)
|
||||
{
|
||||
RGBA_Polygon_Point *pt;
|
||||
|
|
|
@ -76,7 +76,7 @@ _soft8_rectangle_draw_int(Soft8_Image * dst, RGBA_Draw_Context * dc,
|
|||
}
|
||||
|
||||
void
|
||||
soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
|
||||
evas_common_soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
Eina_Rectangle dr;
|
||||
|
|
|
@ -71,37 +71,37 @@ EAPI void evas_common_soft16_image_init(void);
|
|||
EAPI void evas_common_soft16_image_shutdown(void);
|
||||
EAPI Evas_Cache_Image *evas_common_soft16_image_cache_get(void);
|
||||
|
||||
EAPI void soft16_image_draw(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth);
|
||||
EAPI Soft16_Image *soft16_image_alpha_set(Soft16_Image *im, int have_alpha);
|
||||
EAPI void evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth);
|
||||
EAPI Soft16_Image *evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha);
|
||||
|
||||
void soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
void soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
void evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
void evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
|
||||
/* convert/dither functions */
|
||||
void soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src);
|
||||
void soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src);
|
||||
void evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src);
|
||||
void evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src);
|
||||
|
||||
/**
|
||||
* Rectangle (evas_soft16_rectangle.c)
|
||||
*/
|
||||
EAPI void soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
|
||||
EAPI void evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
|
||||
|
||||
/**
|
||||
* Polygon (evas_soft16_polygon.c)
|
||||
*/
|
||||
EAPI void soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
|
||||
EAPI void evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
|
||||
|
||||
/**
|
||||
* Line (evas_soft16_line.c)
|
||||
*/
|
||||
EAPI void soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
|
||||
EAPI void evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
|
||||
|
||||
/**
|
||||
* Font (evas_soft16_font.c)
|
||||
*/
|
||||
EAPI void *soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
|
||||
EAPI void soft16_font_glyph_free(void *ext_dat);
|
||||
EAPI void soft16_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
|
||||
EAPI void *evas_common_soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
|
||||
EAPI void evas_common_soft16_font_glyph_free(void *ext_dat);
|
||||
EAPI void evas_common_soft16_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -155,37 +155,37 @@ EAPI void evas_common_soft8_image_init(void);
|
|||
EAPI void evas_common_soft8_image_shutdown(void);
|
||||
EAPI Evas_Cache_Image *evas_common_soft8_image_cache_get(void);
|
||||
|
||||
EAPI void soft8_image_draw(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth);
|
||||
EAPI Soft8_Image *soft8_image_alpha_set(Soft8_Image *im, int have_alpha);
|
||||
EAPI void evas_common_soft8_image_draw(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth);
|
||||
EAPI Soft8_Image *evas_common_soft8_image_alpha_set(Soft8_Image *im, int have_alpha);
|
||||
|
||||
void soft8_image_draw_unscaled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
void soft8_image_draw_scaled_sampled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
void evas_common_soft8_image_draw_unscaled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
void evas_common_soft8_image_draw_scaled_sampled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
|
||||
|
||||
/* convert/dither functions */
|
||||
void soft8_image_convert_from_rgb(Soft8_Image *im, const DATA32 *src);
|
||||
void soft8_image_convert_from_rgba(Soft8_Image *im, const DATA32 *src);
|
||||
void evas_common_soft8_image_convert_from_rgb(Soft8_Image *im, const DATA32 *src);
|
||||
void evas_common_soft8_image_convert_from_rgba(Soft8_Image *im, const DATA32 *src);
|
||||
|
||||
/**
|
||||
* Rectangle (evas_soft8_rectangle.c)
|
||||
*/
|
||||
EAPI void soft8_rectangle_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
|
||||
EAPI void evas_common_soft8_rectangle_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
|
||||
|
||||
/**
|
||||
* Polygon (evas_soft8_polygon.c)
|
||||
*/
|
||||
EAPI void soft8_polygon_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
|
||||
EAPI void evas_common_soft8_polygon_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
|
||||
|
||||
/**
|
||||
* Line (evas_soft8_line.c)
|
||||
*/
|
||||
EAPI void soft8_line_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
|
||||
EAPI void evas_common_soft8_line_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
|
||||
|
||||
/**
|
||||
* Font (evas_soft8_font.c)
|
||||
*/
|
||||
EAPI void *soft8_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
|
||||
EAPI void soft8_font_glyph_free(void *ext_dat);
|
||||
EAPI void soft8_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
|
||||
EAPI void *evas_common_soft8_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
|
||||
EAPI void evas_common_soft8_font_glyph_free(void *ext_dat);
|
||||
EAPI void evas_common_soft8_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -176,13 +176,13 @@ eng_context_render_op_get(void *data __UNUSED__, void *context)
|
|||
static void
|
||||
eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h)
|
||||
{
|
||||
soft16_rectangle_draw(surface, context, x, y, w, h);
|
||||
evas_common_soft16_rectangle_draw(surface, context, x, y, w, h);
|
||||
}
|
||||
|
||||
static void
|
||||
eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2)
|
||||
{
|
||||
soft16_line_draw(surface, context, x1, y1, x2, y2);
|
||||
evas_common_soft16_line_draw(surface, context, x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
static void *
|
||||
|
@ -200,7 +200,7 @@ eng_polygon_points_clear(void *data __UNUSED__, void *context __UNUSED__, void *
|
|||
static void
|
||||
eng_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y)
|
||||
{
|
||||
soft16_polygon_draw(surface, context, polygon, x, y);
|
||||
evas_common_soft16_polygon_draw(surface, context, polygon, x, y);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -224,7 +224,7 @@ eng_image_alpha_set(void *data __UNUSED__, void *image, int have_alpha)
|
|||
{
|
||||
if (!image) return NULL;
|
||||
have_alpha = !!have_alpha;
|
||||
image = soft16_image_alpha_set(image, have_alpha);
|
||||
image = evas_common_soft16_image_alpha_set(image, have_alpha);
|
||||
return image;
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
|
|||
im = (Soft16_Image *) image;
|
||||
|
||||
evas_cache_image_load_data(&im->cache_entry);
|
||||
soft16_image_draw(im, surface, context,
|
||||
evas_common_soft16_image_draw(im, surface, context,
|
||||
src_x, src_y, src_w, src_h,
|
||||
dst_x, dst_y, dst_w, dst_h,
|
||||
smooth);
|
||||
|
@ -563,9 +563,9 @@ eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, i
|
|||
evas_cache_image_surface_alloc(&im->cache_entry, dst->cache_entry.w, dst->cache_entry.h);
|
||||
evas_common_draw_context_font_ext_set(context,
|
||||
surface,
|
||||
soft16_font_glyph_new,
|
||||
soft16_font_glyph_free,
|
||||
soft16_font_glyph_draw);
|
||||
evas_common_soft16_font_glyph_new,
|
||||
evas_common_soft16_font_glyph_free,
|
||||
evas_common_soft16_font_glyph_draw);
|
||||
evas_common_font_draw(im, context, font, x, y, text, intl_props);
|
||||
evas_common_draw_context_font_ext_set(context,
|
||||
NULL,
|
||||
|
|
|
@ -804,7 +804,7 @@ evas_engine_sdl16_image_draw(void *data __UNUSED__, void *context, void *surface
|
|||
_SDL_UPDATE_PIXELS(eim);
|
||||
}
|
||||
|
||||
soft16_image_draw((Soft16_Image *) eim->cache_entry.src,
|
||||
evas_common_soft16_image_draw((Soft16_Image *) eim->cache_entry.src,
|
||||
(Soft16_Image *) dst->cache_entry.src,
|
||||
context,
|
||||
src_region_x, src_region_y, src_region_w, src_region_h,
|
||||
|
@ -895,9 +895,9 @@ evas_engine_sdl16_font_draw(void *data __UNUSED__, void *context, void *surface,
|
|||
}
|
||||
evas_common_draw_context_font_ext_set(context,
|
||||
dst,
|
||||
soft16_font_glyph_new,
|
||||
soft16_font_glyph_free,
|
||||
soft16_font_glyph_draw);
|
||||
evas_common_soft16_font_glyph_new,
|
||||
evas_common_soft16_font_glyph_free,
|
||||
evas_common_soft16_font_glyph_draw);
|
||||
evas_common_font_draw(im, context, font, x, y, text, intl_props);
|
||||
evas_common_draw_context_font_ext_set(context,
|
||||
NULL,
|
||||
|
@ -922,7 +922,7 @@ evas_engine_sdl16_line_draw(void *data __UNUSED__, void *context, void *surface,
|
|||
_SDL_UPDATE_PIXELS(eim);
|
||||
}
|
||||
|
||||
soft16_line_draw((Soft16_Image *) eim->cache_entry.src,
|
||||
evas_common_soft16_line_draw((Soft16_Image *) eim->cache_entry.src,
|
||||
context,
|
||||
x1, y1, x2, y2);
|
||||
|
||||
|
@ -955,7 +955,7 @@ evas_engine_sdl16_rectangle_draw(void *data __UNUSED__, void *context, void *sur
|
|||
|
||||
im = (Soft16_Image *) eim->cache_entry.src;
|
||||
|
||||
soft16_rectangle_draw(im, context, x, y, w, h);
|
||||
evas_common_soft16_rectangle_draw(im, context, x, y, w, h);
|
||||
|
||||
if (mustlock_im)
|
||||
SDL_UnlockSurface(eim->surface);
|
||||
|
@ -1004,7 +1004,7 @@ evas_engine_sdl16_polygon_draw(void *data __UNUSED__, void *context, void *surfa
|
|||
_SDL_UPDATE_PIXELS(eim);
|
||||
}
|
||||
|
||||
soft16_polygon_draw((Soft16_Image *) eim->cache_entry.src, context, polygon, x, y);
|
||||
evas_common_soft16_polygon_draw((Soft16_Image *) eim->cache_entry.src, context, polygon, x, y);
|
||||
|
||||
if (mustlock_im)
|
||||
SDL_UnlockSurface(eim->surface);
|
||||
|
|
|
@ -287,7 +287,7 @@ eng_setup(Evas *e, void *in)
|
|||
e->engine.data.context =
|
||||
e->engine.func->context_new(e->engine.data.output);
|
||||
/* check if the display can do shm */
|
||||
re->shm = evas_software_x11_x_can_do_shm(re->disp);
|
||||
re->shm = evas_software_16_x11_x_can_do_shm(re->disp);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ eng_output_free(void *data)
|
|||
// NOTE: XrmGetDatabase() result is shared per connection, do not free it.
|
||||
// if (re->xrdb) XrmDestroyDatabase(re->xrdb);
|
||||
|
||||
if (re->shbuf) evas_software_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
if (re->shbuf) evas_software_16_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
if (re->clip_rects) XDestroyRegion(re->clip_rects);
|
||||
if (re->gc) XFreeGC(re->disp, re->gc);
|
||||
if (re->tb) evas_common_tilebuf_free(re->tb);
|
||||
|
@ -332,7 +332,7 @@ eng_output_resize(void *data, int w, int h)
|
|||
evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
|
||||
if (re->shbuf)
|
||||
{
|
||||
evas_software_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
evas_software_16_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
re->shbuf = NULL;
|
||||
}
|
||||
if (re->clip_rects)
|
||||
|
@ -400,7 +400,7 @@ _output_buffer_alloc(Render_Engine *re)
|
|||
h = re->w;
|
||||
}
|
||||
|
||||
re->shbuf = evas_software_x11_x_output_buffer_new
|
||||
re->shbuf = evas_software_16_x11_x_output_buffer_new
|
||||
(re->disp, DefaultVisual(re->disp, DefaultScreen(re->disp)),
|
||||
DefaultDepth(re->disp, DefaultScreen(re->disp)),
|
||||
w, h, 1, NULL);
|
||||
|
@ -625,7 +625,7 @@ eng_output_flush(void *data)
|
|||
}
|
||||
else return;
|
||||
|
||||
evas_software_x11_x_output_buffer_paste
|
||||
evas_software_16_x11_x_output_buffer_paste
|
||||
(re->shbuf, re->draw, re->gc, 0, 0, re->shbuf->im->cache_entry.w, re->shbuf->im->cache_entry.h, 1);
|
||||
XSetClipMask(re->disp, re->gc, None);
|
||||
}
|
||||
|
@ -638,7 +638,7 @@ eng_output_idle_flush(void *data)
|
|||
re = (Render_Engine *)data;
|
||||
if (re->shbuf)
|
||||
{
|
||||
evas_software_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
evas_software_16_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
re->shbuf = NULL;
|
||||
}
|
||||
if (re->clip_rects)
|
||||
|
|
|
@ -49,15 +49,15 @@ struct _X_Output_Buffer
|
|||
};
|
||||
|
||||
/****/
|
||||
void evas_software_x11_x_init (void);
|
||||
void evas_software_16_x11_x_init (void);
|
||||
|
||||
int evas_software_x11_x_can_do_shm (Display *d);
|
||||
X_Output_Buffer *evas_software_x11_x_output_buffer_new (Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data);
|
||||
void evas_software_x11_x_output_buffer_free (X_Output_Buffer *xob, int sync);
|
||||
void evas_software_x11_x_output_buffer_paste (X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int w, int h, int sync);
|
||||
DATA8 *evas_software_x11_x_output_buffer_data (X_Output_Buffer *xob, int *bytes_per_line_ret);
|
||||
int evas_software_x11_x_output_buffer_depth (X_Output_Buffer *xob);
|
||||
int evas_software_x11_x_output_buffer_byte_order (X_Output_Buffer *xob);
|
||||
int evas_software_x11_x_output_buffer_bit_order (X_Output_Buffer *xob);
|
||||
int evas_software_16_x11_x_can_do_shm (Display *d);
|
||||
X_Output_Buffer *evas_software_16_x11_x_output_buffer_new (Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data);
|
||||
void evas_software_16_x11_x_output_buffer_free (X_Output_Buffer *xob, int sync);
|
||||
void evas_software_16_x11_x_output_buffer_paste (X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int w, int h, int sync);
|
||||
DATA8 *evas_software_16_x11_x_output_buffer_data (X_Output_Buffer *xob, int *bytes_per_line_ret);
|
||||
int evas_software_16_x11_x_output_buffer_depth (X_Output_Buffer *xob);
|
||||
int evas_software_16_x11_x_output_buffer_byte_order (X_Output_Buffer *xob);
|
||||
int evas_software_16_x11_x_output_buffer_bit_order (X_Output_Buffer *xob);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
static int _x_err = 0;
|
||||
|
||||
int
|
||||
evas_software_x11_x_can_do_shm(Display *d)
|
||||
evas_software_16_x11_x_can_do_shm(Display *d)
|
||||
{
|
||||
static Display *cached_d = NULL;
|
||||
static int cached_result = 0;
|
||||
|
@ -15,7 +15,7 @@ evas_software_x11_x_can_do_shm(Display *d)
|
|||
{
|
||||
X_Output_Buffer *xob;
|
||||
|
||||
xob = evas_software_x11_x_output_buffer_new
|
||||
xob = evas_software_16_x11_x_output_buffer_new
|
||||
(d, DefaultVisual(d, DefaultScreen(d)),
|
||||
DefaultDepth(d, DefaultScreen(d)), 16, 16, 2, NULL);
|
||||
if (!xob)
|
||||
|
@ -23,7 +23,7 @@ evas_software_x11_x_can_do_shm(Display *d)
|
|||
cached_result = 0;
|
||||
return 0;
|
||||
}
|
||||
evas_software_x11_x_output_buffer_free(xob, 1);
|
||||
evas_software_16_x11_x_output_buffer_free(xob, 1);
|
||||
cached_result = 1;
|
||||
return 1;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ x_output_tmp_x_err(Display * d __UNUSED__, XErrorEvent * ev __UNUSED__)
|
|||
}
|
||||
|
||||
X_Output_Buffer *
|
||||
evas_software_x11_x_output_buffer_new(Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data)
|
||||
evas_software_16_x11_x_output_buffer_new(Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data)
|
||||
{
|
||||
X_Output_Buffer *xob;
|
||||
|
||||
|
@ -129,7 +129,7 @@ evas_software_x11_x_output_buffer_new(Display *d, Visual *v, int depth, int w, i
|
|||
}
|
||||
|
||||
void
|
||||
evas_software_x11_x_output_buffer_free(X_Output_Buffer *xob, int sync)
|
||||
evas_software_16_x11_x_output_buffer_free(X_Output_Buffer *xob, int sync)
|
||||
{
|
||||
if (xob->shm_info)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ evas_software_x11_x_output_buffer_free(X_Output_Buffer *xob, int sync)
|
|||
}
|
||||
|
||||
void
|
||||
evas_software_x11_x_output_buffer_paste(X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int w, int h, int sync)
|
||||
evas_software_16_x11_x_output_buffer_paste(X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int w, int h, int sync)
|
||||
{
|
||||
if (xob->shm_info)
|
||||
{
|
||||
|
@ -161,26 +161,26 @@ evas_software_x11_x_output_buffer_paste(X_Output_Buffer *xob, Drawable d, GC gc,
|
|||
}
|
||||
|
||||
DATA8 *
|
||||
evas_software_x11_x_output_buffer_data(X_Output_Buffer *xob, int *bytes_per_line_ret)
|
||||
evas_software_16_x11_x_output_buffer_data(X_Output_Buffer *xob, int *bytes_per_line_ret)
|
||||
{
|
||||
if (bytes_per_line_ret) *bytes_per_line_ret = xob->xim->bytes_per_line;
|
||||
return (DATA8*) xob->xim->data;
|
||||
}
|
||||
|
||||
int
|
||||
evas_software_x11_x_output_buffer_depth(X_Output_Buffer *xob)
|
||||
evas_software_16_x11_x_output_buffer_depth(X_Output_Buffer *xob)
|
||||
{
|
||||
return xob->xim->bits_per_pixel;
|
||||
}
|
||||
|
||||
int
|
||||
evas_software_x11_x_output_buffer_byte_order(X_Output_Buffer *xob)
|
||||
evas_software_16_x11_x_output_buffer_byte_order(X_Output_Buffer *xob)
|
||||
{
|
||||
return xob->xim->byte_order;
|
||||
}
|
||||
|
||||
int
|
||||
evas_software_x11_x_output_buffer_bit_order(X_Output_Buffer *xob)
|
||||
evas_software_16_x11_x_output_buffer_bit_order(X_Output_Buffer *xob)
|
||||
{
|
||||
return xob->xim->bitmap_bit_order;
|
||||
}
|
||||
|
|
|
@ -185,14 +185,14 @@ static void
|
|||
eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x,
|
||||
int y, int w, int h)
|
||||
{
|
||||
soft8_rectangle_draw(surface, context, x, y, w, h);
|
||||
evas_common_soft8_rectangle_draw(surface, context, x, y, w, h);
|
||||
}
|
||||
|
||||
static void
|
||||
eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1,
|
||||
int y1, int x2, int y2)
|
||||
{
|
||||
soft8_line_draw(surface, context, x1, y1, x2, y2);
|
||||
evas_common_soft8_line_draw(surface, context, x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
static void *
|
||||
|
@ -213,7 +213,7 @@ static void
|
|||
eng_polygon_draw(void *data __UNUSED__, void *context, void *surface,
|
||||
void *polygon, int x, int y)
|
||||
{
|
||||
soft8_polygon_draw(surface, context, polygon, x, y);
|
||||
evas_common_soft8_polygon_draw(surface, context, polygon, x, y);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -239,7 +239,7 @@ eng_image_alpha_set(void *data __UNUSED__, void *image, int have_alpha)
|
|||
if (!image)
|
||||
return NULL;
|
||||
have_alpha = !!have_alpha;
|
||||
image = soft8_image_alpha_set(image, have_alpha);
|
||||
image = evas_common_soft8_image_alpha_set(image, have_alpha);
|
||||
return image;
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
|
|||
im = (Soft8_Image *) image;
|
||||
|
||||
evas_cache_image_load_data(&im->cache_entry);
|
||||
soft8_image_draw(im, surface, context,
|
||||
evas_common_soft8_image_draw(im, surface, context,
|
||||
src_x, src_y, src_w, src_h,
|
||||
dst_x, dst_y, dst_w, dst_h, smooth);
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ eng_setup(Evas * e, void *in)
|
|||
e->engine.data.context =
|
||||
e->engine.func->context_new(e->engine.data.output);
|
||||
/* check if the display can do shm */
|
||||
re->shm = evas_software_x11_x_can_do_shm(re->connection, re->screen);
|
||||
re->shm = evas_software_8_x11_x_can_do_shm(re->connection, re->screen);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ eng_output_free(void *data)
|
|||
|
||||
re = (Render_Engine *) data;
|
||||
if (re->shbuf)
|
||||
evas_software_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
evas_software_8_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
if (re->clip_rects)
|
||||
{
|
||||
pixman_region_fini(re->clip_rects);
|
||||
|
@ -263,7 +263,7 @@ eng_output_resize(void *data, int w, int h)
|
|||
evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
|
||||
if (re->shbuf)
|
||||
{
|
||||
evas_software_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
evas_software_8_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
re->shbuf = NULL;
|
||||
}
|
||||
if (re->clip_rects)
|
||||
|
@ -334,7 +334,7 @@ _output_buffer_alloc(Render_Engine * re)
|
|||
h = re->w;
|
||||
}
|
||||
|
||||
re->shbuf = evas_software_x11_x_output_buffer_new
|
||||
re->shbuf = evas_software_8_x11_x_output_buffer_new
|
||||
(re->connection, re->screen, re->depth, re->pal, w, h, 1, NULL);
|
||||
|
||||
re->shbuf->drawable = re->drawable;
|
||||
|
@ -595,7 +595,7 @@ eng_output_flush(void *data)
|
|||
pixman_box16_t *rects =
|
||||
pixman_region_rectangles(re->clip_rects, NULL);
|
||||
for (i = 0; i < pixman_region_n_rects(re->clip_rects); i++, rects++)
|
||||
evas_software_x11_x_output_buffer_paste
|
||||
evas_software_8_x11_x_output_buffer_paste
|
||||
(re->shbuf, re->drawable, re->shbuf->gc, rects->x1, rects->y1,
|
||||
rects->x2 - rects->x1, rects->y2 - rects->y1, 1);
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ eng_output_idle_flush(void *data)
|
|||
re = (Render_Engine *) data;
|
||||
if (re->shbuf)
|
||||
{
|
||||
evas_software_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
evas_software_8_x11_x_output_buffer_free(re->shbuf, 0);
|
||||
re->shbuf = NULL;
|
||||
}
|
||||
if (re->clip_rects)
|
||||
|
|
|
@ -53,15 +53,13 @@ struct _X_Output_Buffer
|
|||
};
|
||||
|
||||
/****/
|
||||
void evas_software_x11_x_init (void);
|
||||
|
||||
int evas_software_x11_x_can_do_shm (xcb_connection_t *c, xcb_screen_t *screen);
|
||||
X_Output_Buffer *evas_software_x11_x_output_buffer_new (xcb_connection_t *, xcb_screen_t *screen, int depth, unsigned char *pal, int w, int h, int try_shm, void *data);
|
||||
void evas_software_x11_x_output_buffer_free (X_Output_Buffer *xob, int sync);
|
||||
void evas_software_x11_x_output_buffer_paste (X_Output_Buffer *xob, xcb_drawable_t d, xcb_gcontext_t gc, int x, int y, int w, int h, int sync);
|
||||
DATA8 *evas_software_x11_x_output_buffer_data (X_Output_Buffer *xob, int *bytes_per_line_ret);
|
||||
int evas_software_x11_x_output_buffer_depth (X_Output_Buffer *xob);
|
||||
int evas_software_x11_x_output_buffer_byte_order (X_Output_Buffer *xob);
|
||||
int evas_software_x11_x_output_buffer_bit_order (X_Output_Buffer *xob);
|
||||
int evas_software_8_x11_x_can_do_shm (xcb_connection_t *c, xcb_screen_t *screen);
|
||||
X_Output_Buffer *evas_software_8_x11_x_output_buffer_new (xcb_connection_t *, xcb_screen_t *screen, int depth, unsigned char *pal, int w, int h, int try_shm, void *data);
|
||||
void evas_software_8_x11_x_output_buffer_free (X_Output_Buffer *xob, int sync);
|
||||
void evas_software_8_x11_x_output_buffer_paste (X_Output_Buffer *xob, xcb_drawable_t d, xcb_gcontext_t gc, int x, int y, int w, int h, int sync);
|
||||
DATA8 *evas_software_8_x11_x_output_buffer_data (X_Output_Buffer *xob, int *bytes_per_line_ret);
|
||||
int evas_software_8_x11_x_output_buffer_depth (X_Output_Buffer *xob);
|
||||
int evas_software_8_x11_x_output_buffer_byte_order (X_Output_Buffer *xob);
|
||||
int evas_software_8_x11_x_output_buffer_bit_order (X_Output_Buffer *xob);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
static int _xcb_err = 0;
|
||||
|
||||
int
|
||||
evas_software_x11_x_can_do_shm(xcb_connection_t * c, xcb_screen_t * screen)
|
||||
evas_software_8_x11_x_can_do_shm(xcb_connection_t * c, xcb_screen_t * screen)
|
||||
{
|
||||
static xcb_connection_t *cached_c = NULL;
|
||||
static int cached_result = 0;
|
||||
|
@ -17,17 +17,15 @@ evas_software_x11_x_can_do_shm(xcb_connection_t * c, xcb_screen_t * screen)
|
|||
{
|
||||
X_Output_Buffer *xob;
|
||||
|
||||
xob = evas_software_x11_x_output_buffer_new(c,
|
||||
screen,
|
||||
screen->root_depth,
|
||||
(unsigned char *)NULL,
|
||||
16, 16, 2, NULL);
|
||||
xob = evas_software_8_x11_x_output_buffer_new
|
||||
(c, screen, screen->root_depth, (unsigned char *)NULL,
|
||||
16, 16, 2, NULL);
|
||||
if (!xob)
|
||||
{
|
||||
cached_result = 0;
|
||||
return 0;
|
||||
}
|
||||
evas_software_x11_x_output_buffer_free(xob, 1);
|
||||
evas_software_8_x11_x_output_buffer_free(xob, 1);
|
||||
cached_result = 1;
|
||||
return 1;
|
||||
}
|
||||
|
@ -36,11 +34,11 @@ evas_software_x11_x_can_do_shm(xcb_connection_t * c, xcb_screen_t * screen)
|
|||
}
|
||||
|
||||
X_Output_Buffer *
|
||||
evas_software_x11_x_output_buffer_new(xcb_connection_t * c,
|
||||
xcb_screen_t * s,
|
||||
int depth,
|
||||
unsigned char *pal,
|
||||
int w, int h, int try_shm, void *data)
|
||||
evas_software_8_x11_x_output_buffer_new(xcb_connection_t * c,
|
||||
xcb_screen_t * s,
|
||||
int depth,
|
||||
unsigned char *pal,
|
||||
int w, int h, int try_shm, void *data)
|
||||
{
|
||||
X_Output_Buffer *xob;
|
||||
|
||||
|
@ -159,7 +157,7 @@ evas_software_x11_x_output_buffer_new(xcb_connection_t * c,
|
|||
}
|
||||
|
||||
void
|
||||
evas_software_x11_x_output_buffer_free(X_Output_Buffer * xob, int sync)
|
||||
evas_software_8_x11_x_output_buffer_free(X_Output_Buffer * xob, int sync)
|
||||
{
|
||||
if (xob->shm_info)
|
||||
{
|
||||
|
@ -185,7 +183,7 @@ evas_software_x11_x_output_buffer_free(X_Output_Buffer * xob, int sync)
|
|||
}
|
||||
|
||||
void
|
||||
evas_software_x11_x_output_buffer_paste(X_Output_Buffer * xob,
|
||||
evas_software_8_x11_x_output_buffer_paste(X_Output_Buffer * xob,
|
||||
xcb_drawable_t d,
|
||||
xcb_gcontext_t gc,
|
||||
int x, int y, int w, int h, int sync)
|
||||
|
@ -218,7 +216,7 @@ evas_software_x11_x_output_buffer_paste(X_Output_Buffer * xob,
|
|||
}
|
||||
|
||||
DATA8 *
|
||||
evas_software_x11_x_output_buffer_data(X_Output_Buffer * xob,
|
||||
evas_software_8_x11_x_output_buffer_data(X_Output_Buffer * xob,
|
||||
int *bytes_per_line_ret)
|
||||
{
|
||||
if (bytes_per_line_ret)
|
||||
|
@ -227,19 +225,19 @@ evas_software_x11_x_output_buffer_data(X_Output_Buffer * xob,
|
|||
}
|
||||
|
||||
int
|
||||
evas_software_x11_x_output_buffer_depth(X_Output_Buffer * xob)
|
||||
evas_software_8_x11_x_output_buffer_depth(X_Output_Buffer * xob)
|
||||
{
|
||||
return xob->xim->bpp;
|
||||
}
|
||||
|
||||
int
|
||||
evas_software_x11_x_output_buffer_byte_order(X_Output_Buffer * xob)
|
||||
evas_software_8_x11_x_output_buffer_byte_order(X_Output_Buffer * xob)
|
||||
{
|
||||
return xob->xim->byte_order;
|
||||
}
|
||||
|
||||
int
|
||||
evas_software_x11_x_output_buffer_bit_order(X_Output_Buffer * xob)
|
||||
evas_software_8_x11_x_output_buffer_bit_order(X_Output_Buffer * xob)
|
||||
{
|
||||
return xob->xim->bit_order;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue