diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-17 11:12:07 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-17 11:21:51 +0100 |
commit | f9a50de3dcc501e930de6c60983a4feb57121e7e (patch) | |
tree | e2a65ef9a1ce5c15faf8e95e0337e821e2579ac7 /overlay/overlay.h | |
parent | 7df9caeea1606b4f0272de35f0d7f70eedd5ec30 (diff) |
Introduce intel-gpu-overlay
A realtime display of GPU activity. Note, this is just at the point of
minimum usability...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/overlay.h')
-rw-r--r-- | overlay/overlay.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/overlay/overlay.h b/overlay/overlay.h new file mode 100644 index 00000000..7c5b2d86 --- /dev/null +++ b/overlay/overlay.h @@ -0,0 +1,37 @@ +#include <cairo.h> + +enum position { + POS_UNSET = -1, + + POS_LEFT = 0, + POS_CENTRE = 1, + POS_RIGHT = 2, + + POS_TOP = 0 << 4, + POS_MIDDLE = 1 << 4, + POS_BOTTOM = 2 << 4, + + POS_TOP_LEFT = POS_TOP | POS_LEFT, + POS_TOP_CENTRE = POS_TOP | POS_CENTRE, + POS_TOP_RIGHT = POS_TOP | POS_RIGHT, + + POS_MIDDLE_LEFT = POS_MIDDLE | POS_LEFT, + POS_MIDDLE_CENTRE = POS_MIDDLE | POS_CENTRE, + POS_MIDDLE_RIGHT = POS_MIDDLE | POS_RIGHT, + + POS_BOTTOM_LEFT = POS_BOTTOM | POS_LEFT, + POS_BOTTOM_CENTRE = POS_BOTTOM | POS_CENTRE, + POS_BOTTOM_RIGHT = POS_BOTTOM | POS_RIGHT, +}; + +struct overlay { + cairo_surface_t *surface; + void (*show)(struct overlay *); + void (*position)(struct overlay *, enum position); + void (*hide)(struct overlay *); +}; + +extern const cairo_user_data_key_t overlay_key; + +cairo_surface_t *x11_overlay_create(enum position pos, int max_width, int max_height); +void x11_overlay_stop(void); |