Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/software_x11 Modified Files: evas_engine.c evas_engine.h evas_outbuf.c evas_x_buffer.c evas_x_color.c Log Message: whitespace =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_x11/evas_engine.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- evas_engine.c 11 May 2005 08:52:46 -0000 1.16 +++ evas_engine.c 22 May 2005 02:49:49 -0000 1.17 @@ -173,7 +173,7 @@ evas_engine_software_x11_font_h_advance_get, evas_engine_software_x11_font_v_advance_get, evas_engine_software_x11_font_char_coords_get, - evas_engine_software_x11_font_char_at_coords_get, + evas_engine_software_x11_font_char_at_coords_get, evas_engine_software_x11_font_draw, /* font cache functions */ evas_engine_software_x11_font_cache_flush, @@ -185,7 +185,7 @@ evas_engine_software_x11_info(Evas *e) { Evas_Engine_Info_Software_X11 *info; - + info = calloc(1, sizeof(Evas_Engine_Info_Software_X11)); if (!info) return NULL; info->magic.magic = rand(); @@ -210,7 +210,7 @@ evas_engine_software_x11_info_free(Evas *e, void *info) { Evas_Engine_Info_Software_X11 *in; - + in = (Evas_Engine_Info_Software_X11 *)info; free(in); } @@ -220,16 +220,16 @@ { Render_Engine *re; Evas_Engine_Info_Software_X11 *info; - + info = (Evas_Engine_Info_Software_X11 *)in; if (!e->engine.data.output) - e->engine.data.output = + e->engine.data.output = evas_engine_software_x11_output_setup(e->output.w, e->output.h, info->info.rotation, - info->info.display, + info->info.display, 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_x11_outbuf_drawable_set(re->ob, info->info.drawable); evas_software_x11_outbuf_mask_set(re->ob, info->info.mask); @@ -253,11 +253,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(); @@ -269,11 +269,11 @@ evas_common_font_init(); evas_common_draw_init(); evas_common_tilebuf_init(); - + evas_software_x11_x_init(); evas_software_x11_x_color_init(); - evas_software_x11_outbuf_init(); - + evas_software_x11_outbuf_init(); + /* get any stored performance metrics from device (xserver) */ perf = evas_software_x11_outbuf_perf_restore_x(disp, draw, vis, cmap, depth); re->ob = evas_software_x11_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT, disp, draw, vis, cmap, depth, perf, grayscale, max_colors, mask, shape_dither); @@ -300,7 +300,7 @@ evas_engine_software_x11_output_free(void *data) { Render_Engine *re; - + re = (Render_Engine *)data; evas_software_x11_outbuf_free(re->ob); evas_common_tilebuf_free(re->tb); @@ -315,9 +315,9 @@ evas_engine_software_x11_output_resize(void *data, int w, int h) { Render_Engine *re; - + re = (Render_Engine *)data; - evas_software_x11_outbuf_reconfigure(re->ob, w, h, + evas_software_x11_outbuf_reconfigure(re->ob, w, h, evas_software_x11_outbuf_get_rot(re->ob), OUTBUF_DEPTH_INHERIT); evas_common_tilebuf_free(re->tb); @@ -330,16 +330,16 @@ evas_engine_software_x11_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_x11_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); } @@ -348,7 +348,7 @@ evas_engine_software_x11_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); } @@ -357,7 +357,7 @@ evas_engine_software_x11_output_redraws_clear(void *data) { Render_Engine *re; - + re = (Render_Engine *)data; evas_common_tilebuf_clear(re->tb); } @@ -369,14 +369,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; @@ -385,13 +385,13 @@ 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_x11_outbuf_new_region_for_update (re->ob, ux, uy, uw, uh, cx, cy, cw, ch); *x = ux; *y = uy; *w = uw; *h = uh; @@ -403,7 +403,7 @@ { Render_Engine *re; Evas_Engine_Info_Software_X11 *info; - + re = (Render_Engine *)data; evas_software_x11_outbuf_push_updated_region(re->ob, surface, x, y, w, h); evas_software_x11_outbuf_free_region_for_update(re->ob, surface); @@ -414,7 +414,7 @@ evas_engine_software_x11_output_flush(void *data) { Render_Engine *re; - + re = (Render_Engine *)data; evas_software_x11_outbuf_flush(re->ob); } @@ -423,7 +423,7 @@ evas_engine_software_x11_context_new(void *data) { Render_Engine *re; - + re = (Render_Engine *)data; return evas_common_draw_context_new(); } @@ -432,7 +432,7 @@ evas_engine_software_x11_context_free(void *data, void *context) { Render_Engine *re; - + re = (Render_Engine *)data; evas_common_draw_context_free(context); } @@ -441,7 +441,7 @@ evas_engine_software_x11_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); } @@ -450,7 +450,7 @@ evas_engine_software_x11_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); } @@ -459,7 +459,7 @@ evas_engine_software_x11_context_clip_unset(void *data, void *context) { Render_Engine *re; - + re = (Render_Engine *)data; evas_common_draw_context_unset_clip(context); } @@ -468,7 +468,7 @@ evas_engine_software_x11_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; @@ -481,7 +481,7 @@ evas_engine_software_x11_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); } @@ -490,7 +490,7 @@ evas_engine_software_x11_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)); @@ -503,7 +503,7 @@ evas_engine_software_x11_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); } @@ -512,7 +512,7 @@ evas_engine_software_x11_context_multiplier_unset(void *data, void *context) { Render_Engine *re; - + re = (Render_Engine *)data; evas_common_draw_context_unset_multiplier(context); } @@ -521,7 +521,7 @@ evas_engine_software_x11_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)); @@ -534,7 +534,7 @@ evas_engine_software_x11_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); } @@ -543,7 +543,7 @@ evas_engine_software_x11_context_cutout_clear(void *data, void *context) { Render_Engine *re; - + re = (Render_Engine *)data; evas_common_draw_context_clear_cutouts(context); } @@ -557,11 +557,11 @@ evas_engine_software_x11_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(); } @@ -570,11 +570,11 @@ evas_engine_software_x11_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(); } @@ -583,7 +583,7 @@ evas_engine_software_x11_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; @@ -593,7 +593,7 @@ evas_engine_software_x11_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; @@ -603,11 +603,11 @@ evas_engine_software_x11_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(); } @@ -616,7 +616,7 @@ evas_engine_software_x11_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(); @@ -629,7 +629,7 @@ evas_engine_software_x11_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; @@ -640,11 +640,11 @@ evas_engine_software_x11_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(); } @@ -664,7 +664,7 @@ { Render_Engine *re; RGBA_Image *im; - + re = (Render_Engine *)data; im = evas_common_image_new(); im->image = evas_common_image_surface_new(im); @@ -685,7 +685,7 @@ { Render_Engine *re; RGBA_Image *im; - + re = (Render_Engine *)data; im = evas_common_image_create(w, h); if (!im) return NULL; @@ -708,7 +708,7 @@ { Render_Engine *re; RGBA_Image *im; - + re = (Render_Engine *)data; im = image; if (w) *w = im->image->w; @@ -720,7 +720,7 @@ { Render_Engine *re; RGBA_Image *im, *im_old; - + re = (Render_Engine *)data; im_old = image; im = evas_common_image_create(w, h); @@ -742,7 +742,7 @@ evas_engine_software_x11_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; @@ -757,7 +757,7 @@ { Render_Engine *re; RGBA_Image *im; - + re = (Render_Engine *)data; im = image; evas_common_load_image_data_from_file(im); @@ -766,7 +766,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); @@ -786,13 +786,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); @@ -808,13 +808,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); @@ -838,7 +838,7 @@ { Render_Engine *re; RGBA_Image *im; - + re = (Render_Engine *)data; im = image; if (im->flags & RGBA_IMAGE_HAS_ALPHA) return 1; @@ -853,13 +853,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(); } @@ -868,7 +868,7 @@ { Render_Engine *re; RGBA_Image *im; - + re = (Render_Engine *)data; im = image; return im->info.comment; @@ -880,7 +880,7 @@ { Render_Engine *re; RGBA_Image *im; - + re = (Render_Engine *)data; im = image; if (im->info.format == 1) return "png"; @@ -892,7 +892,7 @@ { Render_Engine *re; int tmp_size; - + re = (Render_Engine *)data; tmp_size = evas_common_image_get_cache(); evas_common_image_set_cache(0); @@ -971,7 +971,7 @@ return evas_common_font_ascent_get(font); } -static int +static int evas_engine_software_x11_font_descent_get(void *data, void *font) { Render_Engine *re; @@ -1021,7 +1021,7 @@ { Render_Engine *re; int h, v; - + re = (Render_Engine *)data; evas_common_font_query_advance(font, text, &h, &v); return h; @@ -1062,9 +1062,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 @@ -1078,7 +1078,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); @@ -1086,18 +1086,18 @@ { int max_ascent; int i, 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); } @@ -1173,26 +1173,26 @@ } static Evas_Performance * -evas_engine_software_x11_output_perf_test(Evas *e, Display *disp, Visual *vis, Colormap cmap, Drawable draw, int depth) +evas_engine_software_x11_output_perf_test(Evas *e, Display *disp, Visual *vis, Colormap cmap, Drawable draw, int depth) { return evas_software_x11_outbuf_perf_x(disp, draw, vis, cmap, depth); e = NULL; } static char * -evas_engine_software_x11_output_perf_data(Evas_Performance *perf) +evas_engine_software_x11_output_perf_data(Evas_Performance *perf) { return evas_software_x11_outbuf_perf_serialize_x(perf); } static char * -evas_engine_software_x11_output_perf_key(Evas_Performance *perf) +evas_engine_software_x11_output_perf_key(Evas_Performance *perf) { return evas_software_x11_outbuf_perf_serialize_info_x(perf); } static void -evas_engine_software_x11_output_perf_free(Evas_Performance *perf) +evas_engine_software_x11_output_perf_free(Evas_Performance *perf) { evas_software_x11_outbuf_perf_free(perf); } @@ -1204,7 +1204,7 @@ } static void -evas_engine_software_x11_output_perf_device_store(Evas_Performance *perf) +evas_engine_software_x11_output_perf_device_store(Evas_Performance *perf) { evas_software_x11_outbuf_perf_store_x(perf); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_x11/evas_engine.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evas_engine.h 11 May 2005 08:52:46 -0000 1.4 +++ evas_engine.h 22 May 2005 02:49:49 -0000 1.5 @@ -1,7 +1,7 @@ #ifndef EVAS_ENGINE_H #define EVAS_ENGINE_H -/* PERF: +/* PERF: * # EVAS BENCH: 4.072 */ @@ -37,7 +37,7 @@ int w, h; int rot; Outbuf_Perf *perf; - + struct { Convert_Pal *pal; struct { @@ -60,9 +60,9 @@ /* a list of pending regions to write to the target */ Evas_List *pending_writes; - + int mask_dither : 1; - + int debug : 1; } priv; }; @@ -72,7 +72,7 @@ struct { Display *disp; Window root; - + char *display; char *vendor; int version; @@ -91,7 +91,7 @@ struct { char *info; } cpu; - + int min_shm_image_pixel_count; }; @@ -120,16 +120,16 @@ 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); - + void evas_software_x11_x_color_init (void); Convert_Pal *evas_software_x11_x_color_allocate (Display *disp, Colormap cmap, Visual *vis, Convert_Pal_Mode colors); void evas_software_x11_x_color_deallocate (Display *disp, Colormap cmap, Visual *vis, Convert_Pal *pal); - + void evas_software_x11_outbuf_init (void); void evas_software_x11_outbuf_free (Outbuf *buf); Outbuf *evas_software_x11_outbuf_setup_x (int w, int h, int rot, Outbuf_Depth depth, Display *disp, Drawable draw, Visual *vis, Colormap cmap, int x_depth, Outbuf_Perf *perf, int grayscale, int max_colors, Pixmap mask, int shape_dither); - + char *evas_software_x11_outbuf_perf_serialize_x (Outbuf_Perf *perf); void evas_software_x11_outbuf_perf_deserialize_x (Outbuf_Perf *perf, const char *data); Outbuf_Perf *evas_software_x11_outbuf_perf_new_x (Display *disp, Window draw, Visual *vis, Colormap cmap, int x_depth); @@ -151,8 +151,8 @@ void evas_software_x11_outbuf_drawable_set (Outbuf *buf, Drawable draw); void evas_software_x11_outbuf_mask_set (Outbuf *buf, Pixmap mask); void evas_software_x11_outbuf_rotation_set (Outbuf *buf, int rot); - + void evas_software_x11_outbuf_debug_set (Outbuf *buf, int debug); void evas_software_x11_outbuf_debug_show (Outbuf *buf, Drawable draw, int x, int y, int w, int h); - + #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_x11/evas_outbuf.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- evas_outbuf.c 11 May 2005 08:52:46 -0000 1.5 +++ evas_outbuf.c 22 May 2005 02:49:49 -0000 1.6 @@ -72,10 +72,10 @@ #ifdef WORDS_BIGENDIAN if (evas_software_x11_x_output_buffer_byte_order(xob) == LSBFirst) buf->priv.x.swap = 1; -#else +#else if (evas_software_x11_x_output_buffer_byte_order(xob) == MSBFirst) buf->priv.x.swap = 1; -#endif +#endif if ((vis->class == TrueColor) || (vis->class == DirectColor)) { buf->priv.mask.r = (DATA32) vis->red_mask; @@ -240,7 +240,7 @@ { if ((w * h) < (200 * 200)) use_shm = 0; } - + if ((buf->rot == 0) && (buf->priv.mask.r == 0xff0000) && (buf->priv.mask.g == 0x00ff00) && @@ -263,7 +263,7 @@ if (buf->priv.x.mask) obr->mxob = evas_software_x11_x_output_buffer_new(buf->priv.x.disp, buf->priv.x.vis, - 1, w, h, + 1, w, h, use_shm, NULL); } @@ -312,12 +312,12 @@ evas_software_x11_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 */ @@ -338,7 +338,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); obr = im->extended_info; @@ -358,7 +358,7 @@ DATA32 *src_data; void *data; int bpl = 0, yy; - + obr = update->extended_info; if (buf->priv.pal) { @@ -391,7 +391,7 @@ PAL_MODE_NONE, buf->rot); } if (!conv_func) return; - + data = evas_software_x11_x_output_buffer_data(obr->xob, &bpl); src_data = update->image->data; if (buf->rot == 0) @@ -456,9 +456,9 @@ evas_software_x11_outbuf_reconfigure(Outbuf * buf, int w, int h, 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; @@ -532,13 +532,13 @@ { int i; int screen_num = 0; - + { int wx, wy; unsigned int ww, wh, bd, dp; Window wdum, root; XWindowAttributes wattr; - + XGetGeometry(buf->priv.x.disp, draw, &root, &wx, &wy, &ww, &wh, &bd, &dp); XGetGeometry(buf->priv.x.disp, root, &wdum, &wx, &wy, &ww, &wh, &bd, &dp); XGetWindowAttributes(buf->priv.x.disp, root, &wattr); @@ -547,7 +547,7 @@ for (i = 0; i < 10; i++) { XImage *xim; - + XSetForeground(buf->priv.x.disp, buf->priv.x.gc, BlackPixel(buf->priv.x.disp, screen_num)); XFillRectangle(buf->priv.x.disp, draw, buf->priv.x.gc, x, y, w, h); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_x11/evas_x_buffer.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- evas_x_buffer.c 11 May 2005 08:52:46 -0000 1.3 +++ evas_x_buffer.c 22 May 2005 02:49:49 -0000 1.4 @@ -10,7 +10,7 @@ DATA32 *src_ptr; DATA8 *dst_ptr; int bpl = 0; - + src_ptr = src; dst_ptr = evas_software_x11_x_output_buffer_data(xob, &bpl); dst_ptr = dst_ptr + (bpl * y); @@ -41,7 +41,7 @@ if (XShmQueryExtension(d)) { X_Output_Buffer *xob; - + xob = evas_software_x11_x_output_buffer_new (d, DefaultVisual(d, DefaultScreen(d)), DefaultDepth(d, DefaultScreen(d)), 16, 16, 2, NULL); @@ -66,7 +66,7 @@ xob = calloc(1, sizeof(X_Output_Buffer)); if (!xob) return NULL; - + xob->display = d; xob->xim = NULL; xob->shm_info = NULL; @@ -76,23 +76,23 @@ xob->shm_info = malloc(sizeof(XShmSegmentInfo)); if (xob->shm_info) { - xob->xim = XShmCreateImage(d, v, depth, ZPixmap, NULL, + xob->xim = XShmCreateImage(d, v, depth, ZPixmap, NULL, xob->shm_info, w, h); if (xob->xim) { - xob->shm_info->shmid = shmget(IPC_PRIVATE, - xob->xim->bytes_per_line * + xob->shm_info->shmid = shmget(IPC_PRIVATE, + xob->xim->bytes_per_line * xob->xim->height, IPC_CREAT | 0777); if (xob->shm_info->shmid >= 0) { xob->shm_info->readOnly = False; - xob->shm_info->shmaddr = xob->xim->data = + xob->shm_info->shmaddr = xob->xim->data = shmat(xob->shm_info->shmid, 0, 0); if (xob->shm_info->shmaddr != NULL) { XErrorHandler ph; - + XSync(d, False); _x_err = 0; ph = XSetErrorHandler((XErrorHandler) @@ -105,8 +105,8 @@ return xob; } } - shmdt(xob->shm_info->shmaddr); - shmctl(xob->shm_info->shmid, IPC_RMID, 0); + shmdt(xob->shm_info->shmaddr); + shmctl(xob->shm_info->shmid, IPC_RMID, 0); } if (xob->xim) XDestroyImage(xob->xim); xob->xim = NULL; @@ -114,25 +114,25 @@ if (xob->shm_info) free(xob->shm_info); xob->shm_info = NULL; } - } + } - if (try_shm > 1) return NULL; - - xob->xim = XCreateImage(d, v, depth, ZPixmap, 0, data, w, h, 32, 0); + if (try_shm > 1) return NULL; + + xob->xim = XCreateImage(d, v, depth, ZPixmap, 0, data, w, h, 32, 0); if (!xob->xim) { free(xob); return NULL; } - + xob->data = data; - + if (!xob->xim->data) { xob->xim->data = malloc(xob->xim->bytes_per_line * xob->xim->height); if (!xob->xim->data) { - XDestroyImage(xob->xim); + XDestroyImage(xob->xim); free(xob); return NULL; } @@ -156,7 +156,7 @@ { if (xob->data) xob->xim->data = NULL; XDestroyImage(xob->xim); - } + } free(xob); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_x11/evas_x_color.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evas_x_color.c 11 May 2005 08:52:46 -0000 1.4 +++ evas_x_color.c 22 May 2005 02:49:49 -0000 1.5 @@ -109,7 +109,7 @@ XColor xcl_in; int val; Status ret; - + val = (int)((((double)g) / ((ng) - 1)) * 65535); xcl.red = (unsigned short)(val); xcl.green = (unsigned short)(val); @@ -123,7 +123,7 @@ { unsigned long pixels[256]; int j; - + if (i > 0) { for(j = 0; j < i; j++) @@ -215,47 +215,47 @@ evas_software_x11_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; @@ -279,7 +279,7 @@ { pal->references++; return pal; - } + } } pal = calloc(1, sizeof(struct _Convert_Pal)); if (!pal) return NULL; @@ -320,12 +320,12 @@ { 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]; XFreeColors(disp, cmap, pixels, pal->count, 0); 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs