Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/engines/fb


Modified Files:
        evas_engine.c evas_engine.h evas_fb_main.c evas_outbuf.c 


Log Message:


whitespace

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/fb/evas_engine.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_engine.c       28 Mar 2005 03:58:04 -0000      1.12
+++ evas_engine.c       22 May 2005 02:49:49 -0000      1.13
@@ -158,7 +158,7 @@
      evas_engine_fb_font_h_advance_get,
      evas_engine_fb_font_v_advance_get,
      evas_engine_fb_font_char_coords_get,
-     evas_engine_fb_font_char_at_coords_get,     
+     evas_engine_fb_font_char_at_coords_get,
      evas_engine_fb_font_draw,
      /* font cache functions */
      evas_engine_fb_font_cache_flush,
@@ -170,7 +170,7 @@
 evas_engine_fb_info(Evas *e)
 {
    Evas_Engine_Info_FB *info;
-   
+
    info = calloc(1, sizeof(Evas_Engine_Info_FB));
    if (!info) return NULL;
    info->magic.magic = rand();
@@ -182,7 +182,7 @@
 evas_engine_fb_info_free(Evas *e, void *info)
 {
    Evas_Engine_Info_FB *in;
-   
+
    in = (Evas_Engine_Info_FB *)info;
    free(in);
 }
@@ -192,12 +192,12 @@
 {
    Render_Engine *re;
    Evas_Engine_Info_FB *info;
-   
+
    info = (Evas_Engine_Info_FB *)in;
    re = evas_engine_fb_output_setup(e->output.w,
                                    e->output.h,
                                    info->info.rotation,
-                                   info->info.virtual_terminal, 
+                                   info->info.virtual_terminal,
                                    info->info.device_number,
                                    info->info.refresh);
    e->engine.data.output = re;
@@ -209,11 +209,11 @@
 evas_engine_fb_output_setup(int w, int h, int rot, int vt, int dev, int 
refresh)
 {
    Render_Engine *re;
-   
+
    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();
@@ -225,16 +225,16 @@
    evas_common_font_init();
    evas_common_draw_init();
    evas_common_tilebuf_init();
-   
+
    evas_fb_outbuf_fb_init();
-   
+
    /* get any stored performance metrics from device (xserver) */
    re->ob = evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt, 
dev, refresh);
    re->tb = evas_common_tilebuf_new(evas_fb_outbuf_fb_get_width(re->ob), 
evas_fb_outbuf_fb_get_height(re->ob));
    /* no backbuf! */
    evas_fb_outbuf_fb_set_have_backbuf(re->ob, 0);
    /* in preliminary tests 16x16 gave highest framerates */
-   evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); 
+   evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
    return re;
 }
 
@@ -242,7 +242,7 @@
 evas_engine_fb_output_free(void *data)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_fb_outbuf_fb_free(re->ob);
    evas_common_tilebuf_free(re->tb);
@@ -257,9 +257,9 @@
 evas_engine_fb_output_resize(void *data, int w, int h)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
-   evas_fb_outbuf_fb_reconfigure(re->ob, w, h, 
+   evas_fb_outbuf_fb_reconfigure(re->ob, w, h,
                      evas_fb_outbuf_fb_get_rot(re->ob),
                      OUTBUF_DEPTH_INHERIT);
    evas_common_tilebuf_free(re->tb);
@@ -272,16 +272,16 @@
 evas_engine_fb_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_fb_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);
 }
@@ -290,7 +290,7 @@
 evas_engine_fb_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);
 }
@@ -299,7 +299,7 @@
 evas_engine_fb_output_redraws_clear(void *data)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_common_tilebuf_clear(re->tb);
 }
@@ -318,7 +318,7 @@
        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;
@@ -327,15 +327,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_fb_outbuf_fb_new_region_for_update(re->ob, 
-                                         ux, uy, uw, uh, 
+
+   surface = evas_fb_outbuf_fb_new_region_for_update(re->ob,
+                                         ux, uy, uw, uh,
                                          cx, cy, cw, ch);
    *x = ux; *y = uy; *w = uw; *h = uh;
    return surface;
@@ -345,7 +345,7 @@
 evas_engine_fb_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_fb_outbuf_fb_push_updated_region(re->ob, surface, x, y, w, h);
    evas_fb_outbuf_fb_free_region_for_update(re->ob, surface);
@@ -356,7 +356,7 @@
 evas_engine_fb_output_flush(void *data)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
 }
 
@@ -364,7 +364,7 @@
 evas_engine_fb_context_new(void *data)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    return evas_common_draw_context_new();
 }
@@ -373,7 +373,7 @@
 evas_engine_fb_context_free(void *data, void *context)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_common_draw_context_free(context);
 }
@@ -382,7 +382,7 @@
 evas_engine_fb_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);
 }
@@ -391,7 +391,7 @@
 evas_engine_fb_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);
 }
@@ -400,7 +400,7 @@
 evas_engine_fb_context_clip_unset(void *data, void *context)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_common_draw_context_unset_clip(context);
 }
@@ -409,7 +409,7 @@
 evas_engine_fb_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;
@@ -422,7 +422,7 @@
 evas_engine_fb_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);
 }
@@ -431,7 +431,7 @@
 evas_engine_fb_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));
@@ -444,7 +444,7 @@
 evas_engine_fb_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);
 }
@@ -453,7 +453,7 @@
 evas_engine_fb_context_multiplier_unset(void *data, void *context)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_common_draw_context_unset_multiplier(context);
 }
@@ -462,7 +462,7 @@
 evas_engine_fb_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));
@@ -475,7 +475,7 @@
 evas_engine_fb_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);
 }
@@ -484,7 +484,7 @@
 evas_engine_fb_context_cutout_clear(void *data, void *context)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_common_draw_context_clear_cutouts(context);
 }
@@ -493,8 +493,8 @@
 evas_engine_fb_draw_rectangle(void *data, void *context, void *surface, int x, 
int y, int w, int h)
 {
    Render_Engine *re;
-   
-   re = (Render_Engine *)data;   
+
+   re = (Render_Engine *)data;
    evas_common_rectangle_draw(surface, context, x, y, w, h);
    evas_common_cpu_end_opt();
 }
@@ -503,7 +503,7 @@
 evas_engine_fb_line_draw(void *data, void *context, void *surface, int x1, int 
y1, int x2, int y2)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_common_line_draw(surface, context, x1, y1, x2, y2);
    evas_common_cpu_end_opt();
@@ -513,7 +513,7 @@
 evas_engine_fb_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 = 0;
@@ -523,7 +523,7 @@
 evas_engine_fb_polygon_points_clear(void *data, void *context, void *polygon)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    return evas_common_polygon_points_clear(polygon);
    context = 0;
@@ -533,7 +533,7 @@
 evas_engine_fb_polygon_draw(void *data, void *context, void *surface, void 
*polygon)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    evas_common_polygon_draw(surface, context, polygon);
    evas_common_cpu_end_opt();
@@ -543,7 +543,7 @@
 evas_engine_fb_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();
@@ -556,7 +556,7 @@
 evas_engine_fb_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;
@@ -567,7 +567,7 @@
 evas_engine_fb_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;
    evas_common_gradient_draw(surface, context, x, y, w, h, gradient, angle);
    evas_common_cpu_end_opt();
@@ -588,7 +588,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im;
-   
+
    re = (Render_Engine *)data;
    im = evas_common_image_new();
    im->image = evas_common_image_surface_new(im);
@@ -609,7 +609,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im;
-   
+
    re = (Render_Engine *)data;
    im = evas_common_image_create(w, h);
    if (!im) return NULL;
@@ -632,7 +632,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im;
-   
+
    re = (Render_Engine *)data;
    im = image;
    if (w) *w = im->image->w;
@@ -644,7 +644,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im, *im_old;
-   
+
    re = (Render_Engine *)data;
    im_old = image;
    im = evas_common_image_create(w, h);
@@ -666,7 +666,7 @@
 evas_engine_fb_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;
@@ -681,7 +681,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im;
-   
+
    re = (Render_Engine *)data;
    im = image;
    evas_common_load_image_data_from_file(im);
@@ -690,7 +690,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);
@@ -710,13 +710,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);
@@ -732,13 +732,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);
@@ -762,7 +762,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im;
-   
+
    re = (Render_Engine *)data;
    im = image;
    if (im->flags & RGBA_IMAGE_HAS_ALPHA) return 1;
@@ -777,13 +777,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();
 }
 
@@ -792,7 +792,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im;
-   
+
    re = (Render_Engine *)data;
    im = image;
    return im->info.comment;
@@ -804,7 +804,7 @@
 {
    Render_Engine *re;
    RGBA_Image *im;
-   
+
    re = (Render_Engine *)data;
    im = image;
    if (im->info.format == 1) return "png";
@@ -816,7 +816,7 @@
 {
    Render_Engine *re;
    int tmp_size;
-   
+
    re = (Render_Engine *)data;
    tmp_size = evas_common_image_get_cache();
    evas_common_image_set_cache(0);
@@ -863,7 +863,7 @@
 evas_engine_fb_font_add(void *data, void *font, char *name, int size)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    return evas_common_font_add(font, name, size);
 }
@@ -872,7 +872,7 @@
 evas_engine_fb_font_memory_add(void *data, void *font, char *name, int size, 
const void *fdata, int fdata_size)
 {
    Render_Engine *re;
-   
+
    re = (Render_Engine *)data;
    return evas_common_font_memory_add(font, name, size, fdata, fdata_size);
 }
@@ -895,7 +895,7 @@
    return evas_common_font_ascent_get(font);
 }
 
-static int 
+static int
 evas_engine_fb_font_descent_get(void *data, void *font)
 {
    Render_Engine *re;
@@ -945,7 +945,7 @@
 {
    Render_Engine *re;
    int h, v;
-   
+
    re = (Render_Engine *)data;
    evas_common_font_query_advance(font, text, &h, &v);
    return h;
@@ -999,7 +999,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);
@@ -1007,18 +1007,18 @@
               {
                  int max_ascent;
                  int i, j;
-                 
+
                  im->flags |= RGBA_IMAGE_HAS_ALPHA;
                  j = (ow+inset) * oh;
                  for (i = 0; i < j; i++) im->image->data[i] = (dc->col.col & 
0xffffff);
-                 
+
                  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);
               }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/fb/evas_engine.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_engine.h       14 Nov 2002 05:38:10 -0000      1.2
+++ evas_engine.h       22 May 2005 02:49:49 -0000      1.3
@@ -24,7 +24,7 @@
    Outbuf_Depth    depth;
    int             w, h;
    int             rot;
-   
+
    struct {
       struct {
         FB_Mode  *fb;
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/fb/evas_fb_main.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_fb_main.c      14 Apr 2005 17:38:49 -0000      1.6
+++ evas_fb_main.c      22 May 2005 02:49:49 -0000      1.7
@@ -50,15 +50,15 @@
 fb_init_palette_332(FB_Mode *mode)
 {
   int r, g, b, i;
-  
+
   if (mode->fb_var.bits_per_pixel != 8)
     return;
   i = 0;
 
   if (ioctl(fb, FBIOGETCMAP, &cmap) == -1)
     perror("ioctl FBIOGETCMAP");
-  
-  /* generate the palette */ 
+
+  /* generate the palette */
   for (r = 0; r < 8; r++)
     {
       for (g = 0; g < 8; g++)
@@ -66,7 +66,7 @@
          for (b = 0; b < 4; b++)
            {
              int val;
-             
+
              val = (r << 5) | (r << 2) | (r >> 1);
              red[i] = (val << 8) | val;
              val = (g << 5) | (g << 2) | (g >> 1);
@@ -81,14 +81,14 @@
   /* set colormap */
   if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1)
     perror("ioctl FBIOPUTCMAP");
-   
+
 }
 
 static void
 fb_init_palette_linear(FB_Mode *mode)
 {
   int i;
-  
+
   if (mode->fb_var.bits_per_pixel != 8)
     return;
 
@@ -102,11 +102,11 @@
     green[i] = (i << 8) | i;
   for (i = 0; i < 256; i++)
     blue[i] = (i << 8) | i;
-  
+
   /* set colormap */
   if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1)
     perror("ioctl FBIOPUTCMAP");
-   
+
 }
 
 /* -------------------------------------------------------------------- */
@@ -132,14 +132,14 @@
       if (sscanf(line, "mode \"%250[^\"]\"", label) == 1)
        {
          char f1[32], f2[32], f3[32], f4[32];
-         
+
          f1[0] = 0; f2[0] = 0; f3[0] = 0; f4[0] = 0;
          sscanf(label, "%30[^x]x%30[^-]-%30[^-]-%30s", f1, f2, f3, f4);
          if ((f1[0]) && (f2[0]))
            {
              int geometry = 0;
              int timings = 0;
-             
+
              num++;
              modes = realloc(modes, num * sizeof(FB_Mode));
              modes[num - 1].width = atoi(f1);
@@ -149,24 +149,24 @@
              else
                modes[num - 1].refresh = 0;
              modes[num - 1].fb_var.sync = 0;
-             while ((fgets(line, sizeof(line) - 1, f)) && 
+             while ((fgets(line, sizeof(line) - 1, f)) &&
                     (!strstr(line, "endmode")))
                {
-                 
+
                  if (sscanf(line," geometry %i %i %i %i %i",
-                            &modes[num - 1].fb_var.xres, 
+                            &modes[num - 1].fb_var.xres,
                             &modes[num - 1].fb_var.yres,
-                            &modes[num - 1].fb_var.xres_virtual, 
+                            &modes[num - 1].fb_var.xres_virtual,
                             &modes[num - 1].fb_var.yres_virtual,
                             &modes[num - 1].fb_var.bits_per_pixel) == 5)
                    geometry = 1;
                  if (sscanf(line," timings %i %i %i %i %i %i %i",
                             &modes[num - 1].fb_var.pixclock,
-                            &modes[num - 1].fb_var.left_margin,  
+                            &modes[num - 1].fb_var.left_margin,
                             &modes[num - 1].fb_var.right_margin,
-                            &modes[num - 1].fb_var.upper_margin, 
+                            &modes[num - 1].fb_var.upper_margin,
                             &modes[num - 1].fb_var.lower_margin,
-                            &modes[num - 1].fb_var.hsync_len,    
+                            &modes[num - 1].fb_var.hsync_len,
                             &modes[num - 1].fb_var.vsync_len) == 7)
                    timings = 1;
                  if ((sscanf(line, " hsync %15s", value) == 1) &&
@@ -203,7 +203,7 @@
                  modes[num - 1].fb_var.yoffset = 0;
                }
            }
-         
+
        }
     }
   fclose(f);
@@ -217,12 +217,12 @@
   FB_Mode *modes, *mode = NULL;
   int      i, num_modes;
 
-  modes = fb_list_modes(&num_modes);  
+  modes = fb_list_modes(&num_modes);
   if (modes)
     {
       for (i = 0; i < num_modes; i++)
        {
-         if ((modes[i].width == width) && 
+         if ((modes[i].width == width) &&
              (modes[i].height == height) &&
              (!depth || modes[i].fb_var.bits_per_pixel == depth) &&
              (modes[i].refresh == refresh))
@@ -231,7 +231,7 @@
 
              if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1)
                perror("ioctl FBIOPUT_VSCREENINFO");
-              
+
              free(modes);
              return fb_getmode();
            }
@@ -248,7 +248,7 @@
 
   if (ioctl(fb, FBIOPUT_VSCREENINFO, &cur_mode->fb_var) == -1)
     perror("ioctl FBIOPUT_VSCREENINFO");
-   
+
   free(cur_mode);
   return fb_getmode();
 }
@@ -258,7 +258,7 @@
 {
   FB_Mode *modes;
   int      i, num_modes;
-  
+
   modes = fb_list_modes(&num_modes);
   if (modes)
     {
@@ -272,7 +272,7 @@
 
              if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1)
                perror("ioctl FBIOPUT_VSCREENINFO");
-              
+
              free(modes);
              free(cur_mode);
              return fb_getmode();
@@ -288,7 +288,7 @@
 {
   FB_Mode *modes;
   int      i, num_modes;
-  
+
   modes = fb_list_modes(&num_modes);
   if (modes)
     {
@@ -303,13 +303,13 @@
 
              if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1)
                perror("ioctl FBIOPUT_VSCREENINFO");
-              
+
              free(modes);
              free(cur_mode);
              return fb_getmode();
            }
        }
-      free(modes);      
+      free(modes);
     }
   return cur_mode;
 }
@@ -323,28 +323,28 @@
   mode = malloc(sizeof(FB_Mode));
   /* look what we have now ... */
 
-  if (ioctl(fb, FBIOGET_VSCREENINFO, &mode->fb_var) == -1) 
+  if (ioctl(fb, FBIOGET_VSCREENINFO, &mode->fb_var) == -1)
     {
       perror("ioctl FBIOGET_VSCREENINFO");
       exit(1);
     }
-   
+
   mode->width = mode->fb_var.xres;
   mode->height = mode->fb_var.yres;
-  hpix = 
-    mode->fb_var.left_margin + 
-    mode->fb_var.xres + 
+  hpix =
+    mode->fb_var.left_margin +
+    mode->fb_var.xres +
     mode->fb_var.right_margin +
     mode->fb_var.hsync_len;
-  lines = 
+  lines =
     mode->fb_var.upper_margin +
-    mode->fb_var.yres + 
+    mode->fb_var.yres +
     mode->fb_var.lower_margin +
     mode->fb_var.vsync_len;
-  clockrate = 
+  clockrate =
     1000000 / mode->fb_var.pixclock;
   mode->refresh = clockrate * 1000000 / (lines * hpix);
-  switch (mode->fb_var.bits_per_pixel) 
+  switch (mode->fb_var.bits_per_pixel)
     {
      case 1:
       bpp = 1;
@@ -395,8 +395,8 @@
 {
   struct vt_stat vts;
   char vtname[32];
-  
-  if (vtno < 0) 
+
+  if (vtno < 0)
     {
 
       if ((ioctl(tty,VT_OPENQRY, &vtno) == -1))
@@ -409,47 +409,47 @@
          perror("ioctl VT_OPENQRY vtno <= 0");
          exit(1);
        }
-       
+
     }
   vtno &= 0xff;
   sprintf(vtname, "/dev/tty%i", vtno);
   chown(vtname, getuid(), getgid());
-  if (access(vtname,R_OK | W_OK) == -1) 
+  if (access(vtname,R_OK | W_OK) == -1)
     {
       fprintf(stderr,"access %s: %s\n",vtname,strerror(errno));
       exit(1);
     }
   open(vtname,O_RDWR);
 
-  if (ioctl(tty, VT_GETSTATE, &vts) == -1) 
+  if (ioctl(tty, VT_GETSTATE, &vts) == -1)
     {
       perror("ioctl VT_GETSTATE");
       exit(1);
     }
-   
+
   orig_vt_no = vts.v_active;
 /*
-  if (ioctl(tty, VT_ACTIVATE, vtno) == -1) 
+  if (ioctl(tty, VT_ACTIVATE, vtno) == -1)
     {
       perror("ioctl VT_ACTIVATE");
       exit(1);
     }
-  if (ioctl(tty, VT_WAITACTIVE, vtno) == -1) 
+  if (ioctl(tty, VT_WAITACTIVE, vtno) == -1)
     {
       perror("ioctl VT_WAITACTIVE");
       exit(1);
     }
 */
-   
+
 }
 
 void
 fb_init(int vt, int device)
 {
    char dev[32];
-   
+
    tty = 0;
-#if 0   
+#if 0
    if (vt != 0) fb_setvt(vt);
 #endif
    sprintf(dev, "/dev/fb/%i", device);
@@ -460,99 +460,99 @@
        fb = open(dev, O_RDWR);
      }
    if (fb == -1)
-     {  
+     {
        fprintf(stderr,"open %s: %s\n", dev, strerror(errno));
        fb_cleanup();
        exit(1);
      }
 
-   if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_ovar) == -1) 
+   if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_ovar) == -1)
      {
        perror("ioctl FBIOGET_VSCREENINFO");
        exit(1);
      }
-   if (ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1) 
+   if (ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1)
      {
        perror("ioctl FBIOGET_FSCREENINFO");
        exit(1);
      }
-   
+
    if ((fb_ovar.bits_per_pixel == 8) ||
        (fb_fix.visual == FB_VISUAL_DIRECTCOLOR))
      {
 
-       if (ioctl(fb,FBIOGETCMAP , &ocmap) == -1) 
+       if (ioctl(fb,FBIOGETCMAP , &ocmap) == -1)
          {
             perror("ioctl FBIOGETCMAP");
             exit(1);
          }
-       
+
      }
 #if 0
-   if (isatty(0)) 
+   if (isatty(0))
       tty = 0;
-   else if ((tty = open("/dev/tty",O_RDWR)) == -1) 
+   else if ((tty = open("/dev/tty",O_RDWR)) == -1)
      {
        fprintf(stderr,"open %s: %s\n", "/dev/tty", strerror(errno));
        exit(1);
      }
    if (tty)
      {
-       if (ioctl(tty, KDGETMODE, &kd_mode) == -1) 
+       if (ioctl(tty, KDGETMODE, &kd_mode) == -1)
          {
             perror("ioctl KDGETMODE");
             exit(1);
          }
-       if (ioctl(tty, VT_GETMODE, &vt_omode) == -1) 
+       if (ioctl(tty, VT_GETMODE, &vt_omode) == -1)
          {
             perror("ioctl VT_GETMODE");
             exit(1);
          }
-     }   
-#endif   
+     }
+#endif
 }
 
 int
 fb_postinit(FB_Mode *mode)
 {
 
-  if (ioctl(fb,FBIOGET_FSCREENINFO, &fb_fix) == -1) 
+  if (ioctl(fb,FBIOGET_FSCREENINFO, &fb_fix) == -1)
     {
       perror("ioctl FBIOGET_FSCREENINFO");
       fb_cleanup();
       exit(1);
     }
-   
-  if (fb_fix.type != FB_TYPE_PACKED_PIXELS) 
+
+  if (fb_fix.type != FB_TYPE_PACKED_PIXELS)
     {
       fprintf(stderr,"can handle only packed pixel frame buffers\n");
       fb_cleanup();
       exit(1);
     }
   mode->mem_offset = (unsigned)(fb_fix.smem_start) & (~PAGE_MASK);
-  mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset, 
+  mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset,
                                 PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0);
-  if ((int)mode->mem == -1) 
+  if ((int)mode->mem == -1)
     {
       perror("mmap");
       fb_cleanup();
   }
   /* move viewport to upper left corner */
-  if ((mode->fb_var.xoffset != 0) || (mode->fb_var.yoffset != 0)) 
+  if ((mode->fb_var.xoffset != 0) || (mode->fb_var.yoffset != 0))
     {
       mode->fb_var.xoffset = 0;
       mode->fb_var.yoffset = 0;
 
-      if (ioctl(fb, FBIOPAN_DISPLAY, &(mode->fb_var)) == -1) 
+      if (ioctl(fb, FBIOPAN_DISPLAY, &(mode->fb_var)) == -1)
        {
          perror("ioctl FBIOPAN_DISPLAY");
          fb_cleanup();
-       }       
+       }
     }
 #if 0
    if (tty)
      {
-       if (ioctl(tty,KDSETMODE, KD_GRAPHICS) == -1) 
+       if (ioctl(tty,KDSETMODE, KD_GRAPHICS) == -1)
          {
             perror("ioctl KDSETMODE");
             fb_cleanup();
@@ -572,17 +572,17 @@
     perror("ioctl FBIOPUT_VSCREENINFO");
   if (ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1)
     perror("ioctl FBIOGET_FSCREENINFO");
-   
-  if ((fb_ovar.bits_per_pixel == 8) || 
+
+  if ((fb_ovar.bits_per_pixel == 8) ||
       (fb_fix.visual == FB_VISUAL_DIRECTCOLOR))
     {
 
       if (ioctl(fb, FBIOPUTCMAP, &ocmap) == -1)
        perror("ioctl FBIOPUTCMAP");
-       
+
     }
   close(fb);
-  
+
 
    if (tty)
      {
@@ -593,6 +593,6 @@
 /*     if ((ioctl(tty, VT_ACTIVATE, orig_vt_no) == -1) && (orig_vt_no))
          perror("ioctl VT_ACTIVATE");
 */     }
-   
+
   close(tty);
 }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/fb/evas_outbuf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_outbuf.c       11 Apr 2005 15:45:12 -0000      1.3
+++ evas_outbuf.c       22 May 2005 02:49:49 -0000      1.4
@@ -13,7 +13,7 @@
 {
    /* FIXME: impliment */
    printf("destroying fb info.. not implemented!!!! WARNING. LEAK!\n");
-   if (buf->priv.back_buf) 
+   if (buf->priv.back_buf)
      evas_common_image_free(buf->priv.back_buf);
    free(buf);
 }
@@ -25,9 +25,9 @@
    /* setup window and/or fb */
    /* if (dithered) create backbuf */
    Outbuf *buf;
-   int fb_fd = -1;   
+   int fb_fd = -1;
    int fb_depth;
-   
+
    fb_depth = -1;
    if (depth == OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED) fb_depth = 16;
    else if (depth == OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED) fb_depth = 15;
@@ -38,7 +38,7 @@
    buf = calloc(1, sizeof(Outbuf));
    if (!buf)
      return NULL;
-   
+
    fb_init(vt_no, dev_no);
    if (rot == 0)
      buf->priv.fb.fb = fb_setmode(w, h, fb_depth, refresh);
@@ -53,7 +53,7 @@
        return NULL;
      }
    fb_fd = fb_postinit(buf->priv.fb.fb);
-   
+
    if (rot == 0)
      {
        buf->w = buf->priv.fb.fb->width;
@@ -69,14 +69,14 @@
        buf->w = buf->priv.fb.fb->height;
        buf->h = buf->priv.fb.fb->width;
      }
-   
+
    buf->depth = depth;
    buf->rot = rot;
 
      {
        Gfx_Func_Convert conv_func;
        int i;
-       
+
        buf->priv.mask.r = 0;
        for (i = 0; i < (int)buf->priv.fb.fb->fb_var.red.length; i++)
          buf->priv.mask.r |= (1 << (buf->priv.fb.fb->fb_var.red.offset + i));
@@ -85,33 +85,33 @@
          buf->priv.mask.g |= (1 << (buf->priv.fb.fb->fb_var.green.offset + i));
        buf->priv.mask.b = 0;
        for (i = 0; i < (int)buf->priv.fb.fb->fb_var.blue.length; i++)
-         buf->priv.mask.b |= (1 << (buf->priv.fb.fb->fb_var.blue.offset + i)); 
-       
-       conv_func = NULL;       
+         buf->priv.mask.b |= (1 << (buf->priv.fb.fb->fb_var.blue.offset + i));
+
+       conv_func = NULL;
        if (buf->rot == 0)
-         conv_func = evas_common_convert_func_get(0, buf->w, buf->h, 
+         conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
                                       buf->priv.fb.fb->fb_var.bits_per_pixel,
-                                      buf->priv.mask.r, 
-                                      buf->priv.mask.g, 
-                                      buf->priv.mask.b, 
-                                      PAL_MODE_NONE, 
+                                      buf->priv.mask.r,
+                                      buf->priv.mask.g,
+                                      buf->priv.mask.b,
+                                      PAL_MODE_NONE,
                                       buf->rot);
        else if (buf->rot == 270)
-         conv_func = evas_common_convert_func_get(0, buf->h, buf->w, 
+         conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
                                       buf->priv.fb.fb->fb_var.bits_per_pixel,
-                                      buf->priv.mask.r, 
-                                      buf->priv.mask.g, 
-                                      buf->priv.mask.b, 
-                                      PAL_MODE_NONE, 
-                                      buf->rot);              
+                                      buf->priv.mask.r,
+                                      buf->priv.mask.g,
+                                      buf->priv.mask.b,
+                                      PAL_MODE_NONE,
+                                      buf->rot);
        else if (buf->rot == 90)
-         conv_func = evas_common_convert_func_get(0, buf->h, buf->w, 
+         conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
                                       buf->priv.fb.fb->fb_var.bits_per_pixel,
-                                      buf->priv.mask.r, 
-                                      buf->priv.mask.g, 
-                                      buf->priv.mask.b, 
-                                      PAL_MODE_NONE, 
-                                      buf->rot);              
+                                      buf->priv.mask.r,
+                                      buf->priv.mask.g,
+                                      buf->priv.mask.b,
+                                      PAL_MODE_NONE,
+                                      buf->rot);
        if (!conv_func)
          {
             free(buf);
@@ -120,7 +120,7 @@
      }
 //   if (buf->priv.fb.fb->fb_var.bits_per_pixel < 24)
 //     buf->priv.back_buf = evas_common_image_create(buf->w, buf->h);
-   
+
    return buf;
 }
 
@@ -129,7 +129,7 @@
 {
    if (buf->priv.back_buf)
      {
-       evas_common_blit_rectangle(buf->priv.back_buf, buf->priv.back_buf, 
+       evas_common_blit_rectangle(buf->priv.back_buf, buf->priv.back_buf,
                       src_x, src_y, w, h, dst_x, dst_y);
        evas_fb_outbuf_fb_update(buf, dst_x, dst_y, w, h);
      }
@@ -155,8 +155,8 @@
        conv_func = NULL;
         if (buf->rot == 0)
          {
-            data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset 
+ 
-              buf->priv.fb.fb->bpp * 
+            data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset 
+
+              buf->priv.fb.fb->bpp *
               (x + (y * buf->priv.fb.fb->width));
             conv_func = evas_common_convert_func_get(data, w, h, 
buf->priv.fb.fb->fb_var.bits_per_pixel,
                                          buf->priv.mask.r, buf->priv.mask.g,
@@ -165,8 +165,8 @@
          }
        else if (buf->rot == 270)
          {
-            data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset 
+ 
-              buf->priv.fb.fb->bpp * 
+            data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset 
+
+              buf->priv.fb.fb->bpp *
               (buf->h - y - h + (x * buf->priv.fb.fb->width));
             conv_func = evas_common_convert_func_get(data, h, w, 
buf->priv.fb.fb->fb_var.bits_per_pixel,
                                          buf->priv.mask.r, buf->priv.mask.g,
@@ -175,8 +175,8 @@
          }
        else if (buf->rot == 90)
          {
-            data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset 
+ 
-              buf->priv.fb.fb->bpp * 
+            data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset 
+
+              buf->priv.fb.fb->bpp *
               (y + ((buf->w - x - w) * buf->priv.fb.fb->width));
             conv_func = evas_common_convert_func_get(data, h, w, 
buf->priv.fb.fb->fb_var.bits_per_pixel,
                                          buf->priv.mask.r, buf->priv.mask.g,
@@ -186,30 +186,30 @@
        if (conv_func)
          {
             DATA32 *src_data;
-            
+
             src_data = buf->priv.back_buf->image->data + (y * buf->w) + x;
             if (buf->rot == 0)
               {
-                 conv_func(src_data, data, 
+                 conv_func(src_data, data,
                            buf->w - w,
                            buf->priv.fb.fb->width - w,
-                           w, h, 
+                           w, h,
                            x, y, NULL);
               }
             else if (buf->rot == 270)
               {
-                 conv_func(src_data, data, 
+                 conv_func(src_data, data,
                            buf->w - w,
                            buf->priv.fb.fb->width - h,
-                           h, w, 
+                           h, w,
                            x, y, NULL);
               }
             else if (buf->rot == 90)
               {
-                 conv_func(src_data, data, 
+                 conv_func(src_data, data,
                            buf->w - w,
                            buf->priv.fb.fb->width - h,
-                           h, w, 
+                           h, w,
                            x, y, NULL);
               }
          }
@@ -227,7 +227,7 @@
    else
      {
        RGBA_Image *im;
-       
+
        *cx = 0; *cy = 0; *cw = w; *ch = h;
        im = evas_common_image_create(w, h);
        return im;
@@ -256,16 +256,16 @@
      {
        Gfx_Func_Convert conv_func;
        DATA8 *data;
-       
+
        data = NULL;
        conv_func = NULL;
        if (buf->rot == 0)
          {
-            data = (DATA8 *)buf->priv.fb.fb->mem + 
-              buf->priv.fb.fb->mem_offset + 
-              buf->priv.fb.fb->bpp * 
+            data = (DATA8 *)buf->priv.fb.fb->mem +
+              buf->priv.fb.fb->mem_offset +
+              buf->priv.fb.fb->bpp *
               (x + (y * buf->priv.fb.fb->width));
-            conv_func = evas_common_convert_func_get(data, w, h, 
+            conv_func = evas_common_convert_func_get(data, w, h,
                                          
buf->priv.fb.fb->fb_var.bits_per_pixel,
                                          buf->priv.mask.r, buf->priv.mask.g,
                                          buf->priv.mask.b, PAL_MODE_NONE,
@@ -273,11 +273,11 @@
          }
        else if (buf->rot == 270)
          {
-            data = (DATA8 *)buf->priv.fb.fb->mem + 
-              buf->priv.fb.fb->mem_offset + 
-              buf->priv.fb.fb->bpp * 
+            data = (DATA8 *)buf->priv.fb.fb->mem +
+              buf->priv.fb.fb->mem_offset +
+              buf->priv.fb.fb->bpp *
               (buf->h - y - h + (x * buf->priv.fb.fb->width));
-            conv_func = evas_common_convert_func_get(data, h, w, 
+            conv_func = evas_common_convert_func_get(data, h, w,
                                          
buf->priv.fb.fb->fb_var.bits_per_pixel,
                                          buf->priv.mask.r, buf->priv.mask.g,
                                          buf->priv.mask.b, PAL_MODE_NONE,
@@ -285,11 +285,11 @@
          }
        else if (buf->rot == 90)
          {
-            data = (DATA8 *)buf->priv.fb.fb->mem + 
-              buf->priv.fb.fb->mem_offset + 
-              buf->priv.fb.fb->bpp * 
+            data = (DATA8 *)buf->priv.fb.fb->mem +
+              buf->priv.fb.fb->mem_offset +
+              buf->priv.fb.fb->bpp *
               (y + ((buf->w - x - w) * buf->priv.fb.fb->width));
-            conv_func = evas_common_convert_func_get(data, h, w, 
+            conv_func = evas_common_convert_func_get(data, h, w,
                                          
buf->priv.fb.fb->fb_var.bits_per_pixel,
                                          buf->priv.mask.r, buf->priv.mask.g,
                                          buf->priv.mask.b, PAL_MODE_NONE,
@@ -298,30 +298,30 @@
        if (conv_func)
          {
             DATA32 *src_data;
-            
+
             src_data = update->image->data;
             if (buf->rot == 0)
               {
-                 conv_func(src_data, data, 
+                 conv_func(src_data, data,
                            0,
                            buf->priv.fb.fb->width - w,
-                           w, h, 
+                           w, h,
                            x, y, NULL);
               }
             else if (buf->rot == 270)
               {
-                 conv_func(src_data, data, 
+                 conv_func(src_data, data,
                            0,
                            buf->priv.fb.fb->width - h,
-                           h, w, 
+                           h, w,
                            x, y, NULL);
               }
             else if (buf->rot == 90)
               {
-                 conv_func(src_data, data, 
+                 conv_func(src_data, data,
                            0,
                            buf->priv.fb.fb->width - h,
-                           h, w, 
+                           h, w,
                            x, y, NULL);
               }
          }
@@ -331,7 +331,7 @@
 void
 evas_fb_outbuf_fb_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth 
depth)
 {
-   if ((w == buf->w) && (h == buf->h) && 
+   if ((w == buf->w) && (h == buf->h) &&
        (rot == buf->rot) && (depth == buf->depth))
      return;
    if (buf->priv.back_buf)
@@ -386,7 +386,7 @@
      {
        if (have_backbuf) return;
        evas_common_image_free(buf->priv.back_buf);
-       buf->priv.back_buf = NULL;      
+       buf->priv.back_buf = NULL;
      }
    else
      {




-------------------------------------------------------
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

Reply via email to