aboutsummaryrefslogtreecommitdiff
path: root/generic/WidgetInfo.h
diff options
context:
space:
mode:
authorlecoanet2000-11-13 10:01:18 +0000
committerlecoanet2000-11-13 10:01:18 +0000
commit4f2845559939d58ef39560bb027bde5e2b351866 (patch)
treefffebae5c19a253896f50e846c6418bb0fefaaf3 /generic/WidgetInfo.h
parent4326f55b83fe29b293f6b5169836bcfa3f8d8c0e (diff)
downloadtkzinc-4f2845559939d58ef39560bb027bde5e2b351866.zip
tkzinc-4f2845559939d58ef39560bb027bde5e2b351866.tar.gz
tkzinc-4f2845559939d58ef39560bb027bde5e2b351866.tar.bz2
tkzinc-4f2845559939d58ef39560bb027bde5e2b351866.tar.xz
Modifs pour le rendu local.
Diffstat (limited to 'generic/WidgetInfo.h')
-rw-r--r--generic/WidgetInfo.h39
1 files changed, 31 insertions, 8 deletions
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 <X11/Xlib.h>
#include <X11/Xutil.h>
+#ifdef SHM
+#include <X11/extensions/XShm.h>
+#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;