From 4f2845559939d58ef39560bb027bde5e2b351866 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Mon, 13 Nov 2000 10:01:18 +0000 Subject: Modifs pour le rendu local. --- generic/WidgetInfo.h | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'generic') diff --git a/generic/WidgetInfo.h b/generic/WidgetInfo.h index 52a1a76..34bfb40 100644 --- a/generic/WidgetInfo.h +++ b/generic/WidgetInfo.h @@ -33,11 +33,14 @@ #include #include +#ifdef SHM +#include +#endif #include "Item.h" #include "Transfo.h" #include "Types.h" - +#include "perfos.h" #ifndef NUM_ALPHA_STEPS #define NUM_ALPHA_STEPS 16 @@ -50,6 +53,18 @@ #define INTERNAL_NEED_REPICK 8 +#ifdef SHM +/* + * Data for local rendering mode. + */ +typedef struct { + unsigned char *buf; /* 24-bit RGB buffer for rendering */ + int rowstride; /* Rowstride for the buffer */ + int ox, oy, cx, cy; /* Rectangle describing the rendering area */ +} RenderBuf; +#endif + + /* * The following structure provides information about the selection and * the insertion cursor. It is needed by only a few items, such as @@ -173,14 +188,21 @@ typedef struct _WidgetInfo { Screen *screen; ZnWindow win; /* The window of the widget. */ ZnBool realized; +#ifdef SHM + XImage *draw_buffer_im; /* Image for double buffering */ + RenderBuf buf; +#endif Pixmap draw_buffer; /* Pixmap for double buffering */ ZnBBox damaged_area; /* The current damaged rectangle */ GC gc; ZnBool has_x_shm; /* Tell if the SHM X11 ext is avail. */ - ZnBool has_z_pixmap; /* Tell if the server use ZPixmap format - * with shared pixmaps. */ - ZnBool has_x_shape; /* Tell if she Shape X ext. is avail. */ - ZnBool has_x_input; /* Tell if she X input ext. is avail. */ + ZnBool has_x_shape; /* Tell if the X shape ext. is avail. */ + ZnBool has_x_input; /* Tell if the X input ext. is avail. */ + ZnBool local_render; /* Instruct to render to a local image, + * using libart. */ +#ifdef SHM + XShmSegmentInfo x_shm_info; +#endif int events_flags; /* NEED_REPICK et al */ Window real_top; Item top_group; @@ -204,10 +226,11 @@ typedef struct _WidgetInfo { /* Perf measurement variables. */ ZnBool monitoring; - int num_updates; - int last_time; - int total_time; + Chrono this_draw_chrono; + Chrono total_draw_chrono; int num_items; + int damaged_area_w; + int damaged_area_h; } WidgetInfo; -- cgit v1.1