Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/software_xcb
Modified Files:
evas_engine.c evas_engine.h evas_outbuf.c evas_xcb_buffer.c
evas_xcb_color.c
Log Message:
whitespace
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_xcb/evas_engine.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_engine.c 15 May 2005 09:30:26 -0000 1.3
+++ evas_engine.c 22 May 2005 02:49:49 -0000 1.4
@@ -173,7 +173,7 @@
evas_engine_software_xcb_font_h_advance_get,
evas_engine_software_xcb_font_v_advance_get,
evas_engine_software_xcb_font_char_coords_get,
- evas_engine_software_xcb_font_char_at_coords_get,
+ evas_engine_software_xcb_font_char_at_coords_get,
evas_engine_software_xcb_font_draw,
/* font cache functions */
evas_engine_software_xcb_font_cache_flush,
@@ -185,7 +185,7 @@
evas_engine_software_xcb_info(Evas *e)
{
Evas_Engine_Info_Software_Xcb *info;
-
+
info = calloc(1, sizeof(Evas_Engine_Info_Software_Xcb));
if (!info) return NULL;
info->magic.magic = rand();
@@ -210,7 +210,7 @@
evas_engine_software_xcb_info_free(Evas *e, void *info)
{
Evas_Engine_Info_Software_Xcb *in;
-
+
in = (Evas_Engine_Info_Software_Xcb *)info;
free(in);
}
@@ -220,16 +220,16 @@
{
Render_Engine *re;
Evas_Engine_Info_Software_Xcb *info;
-
+
info = (Evas_Engine_Info_Software_Xcb *)in;
if (!e->engine.data.output)
- e->engine.data.output =
+ e->engine.data.output =
evas_engine_software_xcb_output_setup(e->output.w,
e->output.h,
info->info.rotation,
- info->info.conn,
+ info->info.conn,
info->info.drawable,
- info->info.visual,
+ info->info.visual,
info->info.colormap,
info->info.depth,
info->info.debug,
@@ -239,9 +239,9 @@
info->info.shape_dither);
if (!e->engine.data.output) return;
if (!e->engine.data.context)
- e->engine.data.context =
- e->engine.func->context_new(e->engine.data.output);
-
+ e->engine.data.context =
+ e->engine.func->context_new(e->engine.data.output);
+
re = e->engine.data.output;
evas_software_xcb_outbuf_drawable_set(re->ob, info->info.drawable);
evas_software_xcb_outbuf_mask_set(re->ob, info->info.mask);
@@ -265,11 +265,11 @@
{
Render_Engine *re;
Outbuf_Perf *perf;
-
+
re = calloc(1, sizeof(Render_Engine));
/* if we haven't initialized - init (automatic abort if already done) */
evas_common_cpu_init();
-
+
evas_common_blend_init();
evas_common_image_init();
evas_common_convert_init();
@@ -281,11 +281,11 @@
evas_common_font_init();
evas_common_draw_init();
evas_common_tilebuf_init();
-
+
evas_software_xcb_x_init();
evas_software_xcb_x_color_init();
- evas_software_xcb_outbuf_init();
-
+ evas_software_xcb_outbuf_init();
+
/* get any stored performance metrics from device (xserver) */
perf = evas_software_xcb_outbuf_perf_restore_x(conn, draw, vis, cmap,
depth);
re->ob = evas_software_xcb_outbuf_setup_x(w, h, rot,
@@ -322,7 +322,7 @@
evas_engine_software_xcb_output_free(void *data)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_software_xcb_outbuf_free(re->ob);
evas_common_tilebuf_free(re->tb);
@@ -337,9 +337,9 @@
evas_engine_software_xcb_output_resize(void *data, int w, int h)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
- evas_software_xcb_outbuf_reconfigure(re->ob, w, h,
+ evas_software_xcb_outbuf_reconfigure(re->ob, w, h,
evas_software_xcb_outbuf_get_rot(re->ob),
OUTBUF_DEPTH_INHERIT);
evas_common_tilebuf_free(re->tb);
@@ -352,16 +352,16 @@
evas_engine_software_xcb_output_tile_size_set(void *data, int w, int h)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
- evas_common_tilebuf_set_tile_size(re->tb, w, h);
+ evas_common_tilebuf_set_tile_size(re->tb, w, h);
}
static void
evas_engine_software_xcb_output_redraws_rect_add(void *data, int x, int y, int
w, int h)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_tilebuf_add_redraw(re->tb, x, y, w, h);
}
@@ -370,7 +370,7 @@
evas_engine_software_xcb_output_redraws_rect_del(void *data, int x, int y, int
w, int h)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_tilebuf_del_redraw(re->tb, x, y, w, h);
}
@@ -379,7 +379,7 @@
evas_engine_software_xcb_output_redraws_clear(void *data)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_tilebuf_clear(re->tb);
}
@@ -391,14 +391,14 @@
RGBA_Image *surface;
Tilebuf_Rect *rect;
int ux, uy, uw, uh;
-
+
re = (Render_Engine *)data;
if (re->end)
{
re->end = 0;
return NULL;
}
- if (!re->rects)
+ if (!re->rects)
{
re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects;
@@ -407,15 +407,15 @@
rect = (Tilebuf_Rect *)re->cur_rect;
ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h;
re->cur_rect = re->cur_rect->next;
- if (!re->cur_rect)
+ if (!re->cur_rect)
{
evas_common_tilebuf_free_render_rects(re->rects);
re->rects = NULL;
re->end = 1;
}
-
- surface = evas_software_xcb_outbuf_new_region_for_update(re->ob,
- ux, uy, uw, uh,
+
+ surface = evas_software_xcb_outbuf_new_region_for_update(re->ob,
+ ux, uy, uw, uh,
cx, cy, cw, ch);
*x = ux; *y = uy; *w = uw; *h = uh;
return surface;
@@ -425,7 +425,7 @@
evas_engine_software_xcb_output_redraws_next_update_push(void *data, void
*surface, int x, int y, int w, int h)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_software_xcb_outbuf_push_updated_region(re->ob, surface, x, y, w, h);
evas_software_xcb_outbuf_free_region_for_update(re->ob, surface);
@@ -436,7 +436,7 @@
evas_engine_software_xcb_output_flush(void *data)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_software_xcb_outbuf_flush(re->ob);
}
@@ -445,7 +445,7 @@
evas_engine_software_xcb_context_new(void *data)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
return evas_common_draw_context_new();
}
@@ -454,7 +454,7 @@
evas_engine_software_xcb_context_free(void *data, void *context)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_draw_context_free(context);
}
@@ -463,7 +463,7 @@
evas_engine_software_xcb_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);
}
@@ -472,7 +472,7 @@
evas_engine_software_xcb_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);
}
@@ -481,7 +481,7 @@
evas_engine_software_xcb_context_clip_unset(void *data, void *context)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_draw_context_unset_clip(context);
}
@@ -490,7 +490,7 @@
evas_engine_software_xcb_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;
@@ -503,7 +503,7 @@
evas_engine_software_xcb_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);
}
@@ -512,7 +512,7 @@
evas_engine_software_xcb_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));
@@ -525,7 +525,7 @@
evas_engine_software_xcb_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);
}
@@ -534,7 +534,7 @@
evas_engine_software_xcb_context_multiplier_unset(void *data, void *context)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_draw_context_unset_multiplier(context);
}
@@ -543,7 +543,7 @@
evas_engine_software_xcb_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));
@@ -556,7 +556,7 @@
evas_engine_software_xcb_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);
}
@@ -565,7 +565,7 @@
evas_engine_software_xcb_context_cutout_clear(void *data, void *context)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_draw_context_clear_cutouts(context);
}
@@ -579,11 +579,11 @@
evas_engine_software_xcb_rectangle_draw(void *data, void *context, void
*surface, int x, int y, int w, int h)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
-#ifdef IMGONLY
+#ifdef IMGONLY
return;
-#endif
+#endif
evas_common_rectangle_draw(surface, context, x, y, w, h);
evas_common_cpu_end_opt();
}
@@ -592,11 +592,11 @@
evas_engine_software_xcb_line_draw(void *data, void *context, void *surface,
int x1, int y1, int x2, int y2)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
-#ifdef IMGONLY
+#ifdef IMGONLY
return;
-#endif
+#endif
evas_common_line_draw(surface, context, x1, y1, x2, y2);
evas_common_cpu_end_opt();
}
@@ -605,7 +605,7 @@
evas_engine_software_xcb_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);
context = NULL;
@@ -615,7 +615,7 @@
evas_engine_software_xcb_polygon_points_clear(void *data, void *context, void
*polygon)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
return evas_common_polygon_points_clear(polygon);
context = NULL;
@@ -625,11 +625,11 @@
evas_engine_software_xcb_polygon_draw(void *data, void *context, void
*surface, void *polygon)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
-#ifdef IMGONLY
+#ifdef IMGONLY
return;
-#endif
+#endif
evas_common_polygon_draw(surface, context, polygon);
evas_common_cpu_end_opt();
}
@@ -638,7 +638,7 @@
evas_engine_software_xcb_gradient_color_add(void *data, void *context, void
*gradient, int r, int g, int b, int a, int distance)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
if (!gradient)
gradient = evas_common_gradient_new();
@@ -651,7 +651,7 @@
evas_engine_software_xcb_gradient_colors_clear(void *data, void *context, void
*gradient)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
if (gradient) evas_common_gradient_free(gradient);
return NULL;
@@ -662,11 +662,11 @@
evas_engine_software_xcb_gradient_draw(void *data, void *context, void
*surface, void *gradient, int x, int y, int w, int h, double angle)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
-#ifdef IMGONLY
+#ifdef IMGONLY
return;
-#endif
+#endif
evas_common_gradient_draw(surface, context, x, y, w, h, gradient, angle);
evas_common_cpu_end_opt();
}
@@ -686,7 +686,7 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = evas_common_image_new();
im->image = evas_common_image_surface_new(im);
@@ -707,7 +707,7 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = evas_common_image_create(w, h);
if (!im) return NULL;
@@ -730,7 +730,7 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = image;
if (w) *w = im->image->w;
@@ -742,7 +742,7 @@
{
Render_Engine *re;
RGBA_Image *im, *im_old;
-
+
re = (Render_Engine *)data;
im_old = image;
im = evas_common_image_create(w, h);
@@ -764,7 +764,7 @@
evas_engine_software_xcb_image_dirty_region(void *data, void *image, int x,
int y, int w, int h)
{
Render_Engine *re;
-
+
re = (Render_Engine *)data;
evas_common_image_dirty(image);
return image;
@@ -779,7 +779,7 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = image;
evas_common_load_image_data_from_file(im);
@@ -788,7 +788,7 @@
if (im->references > 1)
{
RGBA_Image *im_new;
-
+
im_new = evas_common_image_create(im->image->w, im->image->h);
if (!im_new) return im;
evas_common_blit_rectangle(im, im_new, 0, 0, im->image->w,
im->image->h, 0, 0);
@@ -808,13 +808,13 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = image;
if (image_data != im->image->data)
{
int w, h;
-
+
w = im->image->w;
h = im->image->h;
evas_common_image_unref(im);
@@ -830,13 +830,13 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = image;
if (im->references > 1)
{
RGBA_Image *im_new;
-
+
im_new = evas_common_image_create(im->image->w, im->image->h);
if (!im_new) return im;
evas_common_load_image_data_from_file(im);
@@ -860,7 +860,7 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = image;
if (im->flags & RGBA_IMAGE_HAS_ALPHA) return 1;
@@ -875,13 +875,13 @@
re = (Render_Engine *)data;
evas_common_load_image_data_from_file(image);
if (smooth)
- evas_common_scale_rgba_in_to_out_clip_smooth(image, surface, context,
- src_x, src_y, src_w, src_h,
+ evas_common_scale_rgba_in_to_out_clip_smooth(image, surface, context,
+ src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h);
else
- evas_common_scale_rgba_in_to_out_clip_sample(image, surface, context,
- src_x, src_y, src_w, src_h,
- dst_x, dst_y, dst_w, dst_h);
+ evas_common_scale_rgba_in_to_out_clip_sample(image, surface, context,
+ src_x, src_y, src_w, src_h,
+ dst_x, dst_y, dst_w, dst_h);
evas_common_cpu_end_opt();
}
@@ -890,7 +890,7 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = image;
return im->info.comment;
@@ -902,7 +902,7 @@
{
Render_Engine *re;
RGBA_Image *im;
-
+
re = (Render_Engine *)data;
im = image;
if (im->info.format == 1) return "png";
@@ -914,7 +914,7 @@
{
Render_Engine *re;
int tmp_size;
-
+
re = (Render_Engine *)data;
tmp_size = evas_common_image_get_cache();
evas_common_image_set_cache(0);
@@ -993,7 +993,7 @@
return evas_common_font_ascent_get(font);
}
-static int
+static int
evas_engine_software_xcb_font_descent_get(void *data, void *font)
{
Render_Engine *re;
@@ -1043,7 +1043,7 @@
{
Render_Engine *re;
int h, v;
-
+
re = (Render_Engine *)data;
evas_common_font_query_advance(font, text, &h, &v);
return h;
@@ -1084,9 +1084,9 @@
Render_Engine *re;
re = (Render_Engine *)data;
-#ifdef IMGONLY
+#ifdef IMGONLY
return;
-#endif
+#endif
if ((w == ow) && (h == oh))
evas_common_font_draw(surface, context, font, x, y, text);
else
@@ -1100,7 +1100,7 @@
{
RGBA_Image *im;
int inset;
-
+
dc->col.col = dc_in->col.col;
inset = evas_common_font_query_inset( font, text);
im = evas_common_image_create(ow+inset, oh);
@@ -1108,18 +1108,18 @@
{
int max_ascent;
int j;
-
+
im->flags |= RGBA_IMAGE_HAS_ALPHA;
j = (ow+inset) * oh;
memset(im->image->data, 0, j * sizeof(DATA32));
-
+
max_ascent = evas_common_font_max_ascent_get(font);
-
+
evas_common_font_draw(im, dc, font, 0, max_ascent, text);
evas_common_cpu_end_opt();
- evas_common_scale_rgba_in_to_out_clip_smooth(im, surface,
context,
- inset, 0, ow, oh,
- x + ((inset * w) / ow), y -
((max_ascent * h) / oh),
+ evas_common_scale_rgba_in_to_out_clip_smooth(im, surface,
context,
+ inset, 0, ow, oh,
+ x + ((inset * w) / ow), y -
((max_ascent * h) / oh),
w, h);
evas_common_image_free(im);
}
@@ -1174,11 +1174,11 @@
int cur;
if (!conn) return NULL;
-
+
i = XCBConnSetupSuccessRepRootsIter(XCBGetSetup(conn));
if (screen > i.rem - 1) return NULL; /* screen must be between 0 and i.rem
- 1 */
for (cur = 0; cur <= screen; XCBSCREENNext(&i), ++cur) {}
-
+
return i.data;
}
@@ -1195,12 +1195,12 @@
if (!scr) return NULL;
d = XCBSCREENAllowedDepthsIter(scr).data;
if (!d) return NULL;
-
+
iter = XCBDEPTHVisualsIter(d);
for (cur = 0 ; cur < iter.rem ; XCBVISUALTYPENext(&iter), ++cur)
if (scr->root_visual.id == iter.data->visual_id.id)
return iter.data;
-
+
return NULL;
}
@@ -1209,7 +1209,7 @@
{
XCBSCREEN *scr;
XCBCOLORMAP c;
-
+
c.xid = 0;
if (!conn) return c;
scr = evas_engine_software_xcb_screen_get(conn, screen);
@@ -1245,19 +1245,19 @@
}
static char *
-evas_engine_software_xcb_output_perf_data(Evas_Performance *perf)
+evas_engine_software_xcb_output_perf_data(Evas_Performance *perf)
{
return evas_software_xcb_outbuf_perf_serialize_x(perf);
}
static char *
-evas_engine_software_xcb_output_perf_key(Evas_Performance *perf)
+evas_engine_software_xcb_output_perf_key(Evas_Performance *perf)
{
return evas_software_xcb_outbuf_perf_serialize_info_x(perf);
}
static void
-evas_engine_software_xcb_output_perf_free(Evas_Performance *perf)
+evas_engine_software_xcb_output_perf_free(Evas_Performance *perf)
{
evas_software_xcb_outbuf_perf_free(perf);
}
@@ -1269,7 +1269,7 @@
}
static void
-evas_engine_software_xcb_output_perf_device_store(Evas_Performance *perf)
+evas_engine_software_xcb_output_perf_device_store(Evas_Performance *perf)
{
evas_software_xcb_outbuf_perf_store_x(perf);
}
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_xcb/evas_engine.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_engine.h 15 May 2005 09:30:26 -0000 1.2
+++ evas_engine.h 22 May 2005 02:49:49 -0000 1.3
@@ -32,7 +32,7 @@
int w, h;
int rot;
Outbuf_Perf *perf;
-
+
struct {
Convert_Pal *pal;
struct {
@@ -55,9 +55,9 @@
/* a list of pending regions to write to the target */
Evas_List *pending_writes;
-
+
int mask_dither : 1;
-
+
int debug : 1;
} priv;
};
@@ -67,7 +67,7 @@
struct {
XCBConnection *conn;
XCBDRAWABLE root;
-
+
char *display;
char *vendor;
int version;
@@ -86,10 +86,10 @@
struct {
char *info;
} cpu;
-
+
int min_shm_image_pixel_count;
};
-
+
struct _Outbuf_Region
{
Xcb_Output_Buffer *xcbob, *mxcbob;
@@ -143,10 +143,10 @@
Convert_Pal_Mode colors);
void evas_software_xcb_x_color_deallocate (XCBConnection *conn,
XCBCOLORMAP cmap,
- XCBVISUALTYPE *vis,
+ XCBVISUALTYPE *vis,
Convert_Pal *pal);
-/* outbuf */
+/* outbuf */
void evas_software_xcb_outbuf_init (void);
void evas_software_xcb_outbuf_free (Outbuf *buf);
Outbuf *evas_software_xcb_outbuf_setup_x (int w,
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_xcb/evas_outbuf.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_outbuf.c 15 May 2005 09:30:26 -0000 1.2
+++ evas_outbuf.c 22 May 2005 02:49:49 -0000 1.3
@@ -86,10 +86,10 @@
#ifdef WORDS_BIGENDIAN
if (evas_software_xcb_x_output_buffer_byte_order(xcbob) == LSBFirst)
buf->priv.x.swap = 1;
-#else
+#else
if (evas_software_xcb_x_output_buffer_byte_order(xcbob) == MSBFirst)
buf->priv.x.swap = 1;
-#endif
+#endif
if ((vis->_class == TrueColor) || (vis->_class == DirectColor))
{
buf->priv.mask.r = (DATA32) vis->red_mask;
@@ -246,7 +246,7 @@
return buf;
}
-
+
RGBA_Image *
evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
int x,
@@ -282,7 +282,7 @@
{
if ((w * h) < (200 * 200)) use_shm = 0;
}
-
+
if ((buf->rot == 0) &&
(buf->priv.mask.r == 0xff0000) &&
(buf->priv.mask.g == 0x00ff00) &&
@@ -306,7 +306,7 @@
obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn,
1,
w,
- h,
+ h,
use_shm,
NULL);
}
@@ -357,12 +357,12 @@
evas_software_xcb_outbuf_flush(Outbuf *buf)
{
Evas_List *l;
-
+
for (l = buf->priv.pending_writes; l; l = l->next)
{
RGBA_Image *im;
Outbuf_Region *obr;
-
+
im = l->data;
obr = im->extended_info;
/* paste now */
@@ -390,7 +390,7 @@
{
RGBA_Image *im;
Outbuf_Region *obr;
-
+
im = buf->priv.pending_writes->data;
buf->priv.pending_writes =
evas_list_remove_list(buf->priv.pending_writes,
buf->priv.pending_writes);
@@ -417,7 +417,7 @@
void *data;
int bpl = 0;
int yy;
-
+
obr = update->extended_info;
if (buf->priv.pal)
{
@@ -450,7 +450,7 @@
PAL_MODE_NONE, buf->rot);
}
if (!conv_func) return;
-
+
data = evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl);
src_data = update->image->data;
if (buf->rot == 0)
@@ -518,9 +518,9 @@
int rot,
Outbuf_Depth depth)
{
- if ((w == buf->w) &&
- (h == buf->h) &&
- (rot == buf->rot) &&
+ if ((w == buf->w) &&
+ (h == buf->h) &&
+ (rot == buf->rot) &&
(depth == buf->depth)) return;
buf->w = w;
buf->h = h;
@@ -909,7 +909,7 @@
int retnum;
perf = evas_software_xcb_outbuf_perf_new_x(conn, draw, vis, cmap, x_depth);
-
+
type_str = "__EVAS_PERF_ENGINE_SOFTWARE";
type_rep = XCBInternAtomReply(conn,
XCBInternAtom(conn,
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_xcb/evas_xcb_buffer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_xcb_buffer.c 15 May 2005 09:30:26 -0000 1.2
+++ evas_xcb_buffer.c 22 May 2005 02:49:49 -0000 1.3
@@ -13,7 +13,7 @@
DATA32 *src_ptr;
DATA8 *dst_ptr;
int bpl = 0;
-
+
src_ptr = src;
dst_ptr = evas_software_xcb_x_output_buffer_data(xcbob, &bpl);
dst_ptr = dst_ptr + (bpl * y);
@@ -44,20 +44,20 @@
XCBGetGeometryRep *geom;
XCBDRAWABLE drawable;
int depth;
-
+
drawable.window = XCBConnSetupSuccessRepRootsIter
(XCBGetSetup(c)).data->root;
geom = XCBGetGeometryReply (c, XCBGetGeometry(c, drawable), 0);
if(!geom)
return 0;
-
+
depth = geom->depth;
free (geom);
if (XCBShmInit(c))
{
Xcb_Output_Buffer *xcbob;
-
- xcbob = evas_software_xcb_x_output_buffer_new(c,
+
+ xcbob = evas_software_xcb_x_output_buffer_new(c,
depth,
16,
16,
@@ -70,7 +70,7 @@
return 0;
}
-/*
+/*
* FIXME: no error mechanism
*/
@@ -93,7 +93,7 @@
xcbob = calloc(1, sizeof(Xcb_Output_Buffer));
if (!xcbob) return NULL;
-
+
xcbob->connection = c;
xcbob->image = NULL;
xcbob->shm_info = NULL;
@@ -107,23 +107,23 @@
xcbob->image = XCBImageSHMCreate(c, depth, ZPixmap, NULL, w, h);
if (xcbob->image)
{
- xcbob->shm_info->shmid = shmget(IPC_PRIVATE,
- xcbob->image->bytes_per_line
*
+ xcbob->shm_info->shmid = shmget(IPC_PRIVATE,
+ xcbob->image->bytes_per_line *
xcbob->image->height,
IPC_CREAT | 0777);
if (xcbob->shm_info->shmid >= 0)
{
- xcbob->shm_info->shmaddr = xcbob->image->data =
+ xcbob->shm_info->shmaddr = xcbob->image->data =
shmat(xcbob->shm_info->shmid, 0, 0);
if (xcbob->shm_info->shmaddr != NULL)
{
- /*
+ /*
* FIXME: no error mechanism
*/
/* XErrorHandler ph; */
/* EventHandlers eh; */
-
+
XCBSync(c, 0);
_xcb_err = 0;
/* ph = XSetErrorHandler((XErrorHandler) */
@@ -138,8 +138,8 @@
return xcbob;
}
}
- shmdt(xcbob->shm_info->shmaddr);
- shmctl(xcbob->shm_info->shmid, IPC_RMID, 0);
+ shmdt(xcbob->shm_info->shmaddr);
+ shmctl(xcbob->shm_info->shmid, IPC_RMID, 0);
}
if (xcbob->image) XCBImageSHMDestroy(xcbob->image);
xcbob->image = NULL;
@@ -147,25 +147,25 @@
if (xcbob->shm_info) free(xcbob->shm_info);
xcbob->shm_info = NULL;
}
- }
+ }
+
+ if (try_shm > 1) return NULL;
- if (try_shm > 1) return NULL;
-
- xcbob->image = XCBImageCreate(c, depth, ZPixmap, 0, data, w, h, 32, 0);
+ xcbob->image = XCBImageCreate(c, depth, ZPixmap, 0, data, w, h, 32, 0);
if (!xcbob->image)
{
free(xcbob);
return NULL;
}
-
+
xcbob->data = data;
-
+
if (!xcbob->image->data)
{
xcbob->image->data = malloc(xcbob->image->bytes_per_line *
xcbob->image->height);
if (!xcbob->image->data)
{
- XCBImageDestroy(xcbob->image);
+ XCBImageDestroy(xcbob->image);
free(xcbob);
return NULL;
}
@@ -190,7 +190,7 @@
{
if (xcbob->data) xcbob->image->data = NULL;
XCBImageDestroy(xcbob->image);
- }
+ }
free(xcbob);
}
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_xcb/evas_xcb_color.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_xcb_color.c 15 May 2005 09:30:26 -0000 1.2
+++ evas_xcb_color.c 22 May 2005 02:49:49 -0000 1.3
@@ -125,7 +125,7 @@
XCBCOLORITEM xcl_in;
int val;
XCBAllocColorRep *rep;
-
+
val = (int)((((double)g) / ((ng) - 1)) * 65535);
xcl.red = (unsigned short)(val);
xcl.green = (unsigned short)(val);
@@ -147,7 +147,7 @@
{
unsigned long pixels[256];
int j;
-
+
if (i > 0)
{
for(j = 0; j < i; j++)
@@ -264,47 +264,47 @@
evas_software_xcb_x_color_init(void)
{
static int initialised = 0;
-
+
if (initialised) return;
x_color_alloc[PAL_MODE_NONE] = NULL;
x_color_count[PAL_MODE_NONE] = 0;
-
+
x_color_alloc[PAL_MODE_MONO] = x_color_alloc_mono;
x_color_count[PAL_MODE_MONO] = 2;
-
+
x_color_alloc[PAL_MODE_GRAY4] = x_color_alloc_gray_4;
x_color_count[PAL_MODE_GRAY4] = 4;
-
+
x_color_alloc[PAL_MODE_GRAY16] = x_color_alloc_gray_16;
x_color_count[PAL_MODE_GRAY16] = 16;
-
+
x_color_alloc[PAL_MODE_GRAY64] = x_color_alloc_gray_64;
x_color_count[PAL_MODE_GRAY64] = 64;
-
+
x_color_alloc[PAL_MODE_GRAY256] = x_color_alloc_gray_256;
x_color_count[PAL_MODE_GRAY256] = 256;
-
+
x_color_alloc[PAL_MODE_RGB111] = x_color_alloc_rgb_111;
x_color_count[PAL_MODE_RGB111] = 2 * 2 * 2;
-
+
x_color_alloc[PAL_MODE_RGB121] = x_color_alloc_rgb_121;
x_color_count[PAL_MODE_RGB121] = 2 * 4 * 2;
-
+
x_color_alloc[PAL_MODE_RGB221] = x_color_alloc_rgb_221;
x_color_count[PAL_MODE_RGB221] = 4 * 4 * 2;
-
+
x_color_alloc[PAL_MODE_RGB222] = x_color_alloc_rgb_222;
x_color_count[PAL_MODE_RGB222] = 4 * 4 * 4;
-
+
x_color_alloc[PAL_MODE_RGB232] = x_color_alloc_rgb_232;
x_color_count[PAL_MODE_RGB232] = 4 * 8 * 4;
-
+
x_color_alloc[PAL_MODE_RGB666] = x_color_alloc_rgb_666;
x_color_count[PAL_MODE_RGB666] = 6 * 6 * 6;
-
+
x_color_alloc[PAL_MODE_RGB332] = x_color_alloc_rgb_332;
x_color_count[PAL_MODE_RGB332] = 8 * 8 * 4;
-
+
x_color_alloc[PAL_MODE_LAST] = NULL;
x_color_count[PAL_MODE_LAST] = 0;
initialised = 1;
@@ -331,7 +331,7 @@
{
pal->references++;
return pal;
- }
+ }
}
pal = calloc(1, sizeof(struct _Convert_Pal));
if (!pal) return NULL;
@@ -370,17 +370,17 @@
void
evas_software_xcb_x_color_deallocate(XCBConnection *conn,
XCBCOLORMAP cmap,
- XCBVISUALTYPE *vis,
+ XCBVISUALTYPE *vis,
Convert_Pal *pal)
{
unsigned long pixels[256];
int j;
-
+
pal->references--;
if (pal->references > 0) return;
- if (pal->lookup)
- {
- for(j = 0; j < pal->count; j++)
+ if (pal->lookup)
+ {
+ for(j = 0; j < pal->count; j++)
pixels[j] = (unsigned long) pal->lookup[j];
XCBFreeColors(conn, cmap, 0, pal->count, pixels);
free(pal->lookup);
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs