forked from enlightenment/efl
parent
70a562b239
commit
cacc00f14a
|
@ -25,7 +25,7 @@ visualtype_get(xcb_connection_t *conn, xcb_screen_t *screen)
|
|||
iter_vis = xcb_depth_visuals_iterator(iter_depth.data);
|
||||
for (; iter_vis.rem; --screen, xcb_visualtype_next (&iter_vis))
|
||||
{
|
||||
if (screen->root_visual.id == iter_vis.data->visual_id.id)
|
||||
if (screen->root_visual == iter_vis.data->visual_id)
|
||||
return iter_vis.data;
|
||||
}
|
||||
}
|
||||
|
@ -121,14 +121,14 @@ main(int argc, char **argv)
|
|||
int pause_me = 0;
|
||||
xcb_connection_t *conn;
|
||||
const xcb_query_extension_reply_t *rep_shm;
|
||||
xcb_get_input_focus_reply_t *reply;
|
||||
xcb_screen_t *screen = NULL;
|
||||
xcb_screen_iterator_t iter_screen;
|
||||
xcb_drawable_t win;
|
||||
xcb_generic_event_t *e;
|
||||
uint32_t mask;
|
||||
uint32_t value[6];
|
||||
int screen_nbr;
|
||||
xcb_get_input_focus_reply_t *reply;
|
||||
xcb_screen_t *screen = NULL;
|
||||
xcb_screen_iterator_t iter_screen;
|
||||
xcb_window_t win;
|
||||
xcb_generic_event_t *e;
|
||||
uint32_t mask;
|
||||
uint32_t value[6];
|
||||
int screen_nbr;
|
||||
|
||||
conn = xcb_connect (NULL, &screen_nbr);
|
||||
if (!conn)
|
||||
|
@ -163,12 +163,12 @@ main(int argc, char **argv)
|
|||
value[2] = XCB_GRAVITY_BIT_FORGET;
|
||||
value[3] = XCB_BACKING_STORE_NOT_USEFUL;
|
||||
value[4] = XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_STRUCTURE_NOTIFY;
|
||||
value[5] = screen->default_colormap.xid;
|
||||
value[5] = screen->default_colormap;
|
||||
|
||||
win.window = xcb_window_new(conn);
|
||||
win = xcb_generate_id (conn);
|
||||
xcb_create_window (conn,
|
||||
screen->root_depth,
|
||||
win.window, screen->root,
|
||||
win, screen->root,
|
||||
0, 0,
|
||||
win_w, win_h,
|
||||
0,
|
||||
|
@ -176,8 +176,8 @@ main(int argc, char **argv)
|
|||
screen->root_visual,
|
||||
mask, value);
|
||||
|
||||
title_set (conn, win.window, "Evas Software XCB Test");
|
||||
class_set (conn, win.window, "Evas_Software_XCB_Test", "Main");
|
||||
title_set (conn, win, "Evas Software XCB Test");
|
||||
class_set (conn, win, "Evas_Software_XCB_Test", "Main");
|
||||
#if 0
|
||||
szhints = AllocSizeHints();
|
||||
SizeHintsSetMinSize(szhints, win_w, win_h);
|
||||
|
@ -186,7 +186,7 @@ main(int argc, char **argv)
|
|||
SetWMNormalHints(conn, win.window, szhints);
|
||||
FreeSizeHints(szhints);
|
||||
#endif
|
||||
xcb_map_window (conn, win.window);
|
||||
xcb_map_window (conn, win);
|
||||
/* we sync */
|
||||
reply = xcb_get_input_focus_reply(conn,
|
||||
xcb_get_input_focus_unchecked(conn),
|
||||
|
@ -319,7 +319,7 @@ main(int argc, char **argv)
|
|||
|
||||
while (1)
|
||||
{
|
||||
e = xcb_poll_for_event(conn, NULL);
|
||||
e = xcb_poll_for_event(conn);
|
||||
|
||||
if (e) {
|
||||
switch (e->response_type)
|
||||
|
@ -327,7 +327,7 @@ main(int argc, char **argv)
|
|||
case XCB_BUTTON_PRESS: {
|
||||
xcb_button_press_event_t *ev = (xcb_button_press_event_t *)e;
|
||||
|
||||
if (ev->detail.id == 3)
|
||||
if (ev->detail == 3)
|
||||
{
|
||||
free(e);
|
||||
goto exit;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "Evas_Engine_Software_Xcb.h"
|
||||
|
||||
xcb_connection_t *c = NULL;
|
||||
xcb_drawable_t win;
|
||||
xcb_window_t win;
|
||||
|
||||
Evas *evas = NULL;
|
||||
|
||||
|
@ -39,7 +39,7 @@ visualtype_get(xcb_connection_t *conn, xcb_screen_t *screen)
|
|||
iter_vis = xcb_depth_visuals_iterator(iter_depth.data);
|
||||
for (; iter_vis.rem; --screen, xcb_visualtype_next (&iter_vis))
|
||||
{
|
||||
if (screen->root_visual.id == iter_vis.data->visual_id.id)
|
||||
if (screen->root_visual == iter_vis.data->visual_id)
|
||||
return iter_vis.data;
|
||||
}
|
||||
}
|
||||
|
@ -170,12 +170,12 @@ main(int argc, char **argv)
|
|||
value[2] = XCB_GRAVITY_BIT_FORGET;
|
||||
value[3] = XCB_BACKING_STORE_NOT_USEFUL;
|
||||
value[4] = XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION;
|
||||
value[5] = screen->default_colormap.xid;
|
||||
value[5] = screen->default_colormap;
|
||||
|
||||
win.window = xcb_window_new(c);
|
||||
win = xcb_generate_id (c);
|
||||
xcb_create_window (c,
|
||||
screen->root_depth,
|
||||
win.window, screen->root,
|
||||
win, screen->root,
|
||||
0, 0,
|
||||
win_w, win_h,
|
||||
0,
|
||||
|
@ -183,17 +183,17 @@ main(int argc, char **argv)
|
|||
screen->root_visual,
|
||||
mask, value);
|
||||
|
||||
title_set (c, win.window, "Evas XCB Performance Test");
|
||||
class_set (c, win.window, "Evas_XCB_Perf_Test", "Main");
|
||||
title_set (c, win, "Evas XCB Performance Test");
|
||||
class_set (c, win, "Evas_XCB_Perf_Test", "Main");
|
||||
|
||||
szhints = AllocSizeHints();
|
||||
SizeHintsSetMinSize(szhints, win_w, win_h);
|
||||
SizeHintsSetMaxSize(szhints, win_w, win_h);
|
||||
SizeHintsSetSize(szhints, 0, win_w, win_h);
|
||||
SetWMNormalHints(c, win.window, szhints);
|
||||
SetWMNormalHints(c, win, szhints);
|
||||
FreeSizeHints(szhints);
|
||||
|
||||
xcb_map_window (c, win.window);
|
||||
xcb_map_window (c, win);
|
||||
|
||||
evas_init();
|
||||
evas = evas_new();
|
||||
|
@ -218,7 +218,7 @@ main(int argc, char **argv)
|
|||
|
||||
while (1)
|
||||
{
|
||||
e = xcb_poll_for_event(c, NULL);
|
||||
e = xcb_poll_for_event(c);
|
||||
|
||||
if (e)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "Evas_Engine_Software_Xcb.h"
|
||||
|
||||
xcb_connection_t *c = NULL;
|
||||
xcb_drawable_t win;
|
||||
xcb_window_t win;
|
||||
|
||||
Evas *evas = NULL;
|
||||
|
||||
|
@ -39,7 +39,7 @@ visualtype_get(xcb_connection_t *conn, xcb_screen_t *screen)
|
|||
iter_vis = xcb_depth_visuals_iterator(iter_depth.data);
|
||||
for (; iter_vis.rem; --screen, xcb_visualtype_next (&iter_vis))
|
||||
{
|
||||
if (screen->root_visual.id == iter_vis.data->visual_id.id)
|
||||
if (screen->root_visual == iter_vis.data->visual_id)
|
||||
return iter_vis.data;
|
||||
}
|
||||
}
|
||||
|
@ -172,29 +172,29 @@ main(int argc, char **argv)
|
|||
value[2] = XCB_GRAVITY_BIT_FORGET;
|
||||
value[3] = XCB_BACKING_STORE_NOT_USEFUL;
|
||||
value[4] = XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION;
|
||||
value[5] = screen->default_colormap.xid;
|
||||
value[5] = screen->default_colormap;
|
||||
|
||||
win.window = xcb_window_new(c);
|
||||
win = xcb_generate_id (c);
|
||||
xcb_create_window (c,
|
||||
screen->root_depth,
|
||||
win.window, screen->root,
|
||||
win, screen->root,
|
||||
0, 0,
|
||||
win_w, win_h,
|
||||
0,
|
||||
XCB_WINDOW_CLASS_INPUT_OUTPUT,
|
||||
screen->root_visual,
|
||||
mask, value);
|
||||
title_set (c, win.window, "Evas XCB Performance Test");
|
||||
class_set (c, win.window, "Evas_XCB_Perf_Test", "Main");
|
||||
title_set (c, win, "Evas XCB Performance Test");
|
||||
class_set (c, win, "Evas_XCB_Perf_Test", "Main");
|
||||
|
||||
szhints = AllocSizeHints();
|
||||
SizeHintsSetMinSize(szhints, win_w, win_h);
|
||||
SizeHintsSetMaxSize(szhints, win_w, win_h);
|
||||
SizeHintsSetSize(szhints, 0, win_w, win_h);
|
||||
SetWMNormalHints(c, win.window, szhints);
|
||||
SetWMNormalHints(c, win, szhints);
|
||||
FreeSizeHints(szhints);
|
||||
|
||||
xcb_map_window (c, win.window);
|
||||
xcb_map_window (c, win);
|
||||
/* we sync */
|
||||
reply = xcb_get_input_focus_reply(c,
|
||||
xcb_get_input_focus_unchecked(c),
|
||||
|
@ -225,7 +225,7 @@ main(int argc, char **argv)
|
|||
|
||||
while (1)
|
||||
{
|
||||
e = xcb_poll_for_event(c, NULL);
|
||||
e = xcb_poll_for_event(c);
|
||||
|
||||
if (e)
|
||||
{
|
||||
|
|
|
@ -104,7 +104,7 @@ main(int argc, char **argv)
|
|||
xcb_get_input_focus_reply_t *reply;
|
||||
xcb_screen_t *screen = NULL;
|
||||
xcb_screen_iterator_t iter_screen;
|
||||
xcb_drawable_t win;
|
||||
xcb_window_t win;
|
||||
xcb_generic_event_t *e;
|
||||
uint32_t mask;
|
||||
uint32_t value[6];
|
||||
|
@ -145,31 +145,31 @@ main(int argc, char **argv)
|
|||
value[2] = XCB_GRAVITY_BIT_FORGET;
|
||||
value[3] = XCB_BACKING_STORE_NOT_USEFUL;
|
||||
value[4] = XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_STRUCTURE_NOTIFY;
|
||||
value[5] = screen->default_colormap.xid;
|
||||
value[5] = screen->default_colormap;
|
||||
|
||||
win.window = xcb_window_new(conn);
|
||||
win = xcb_generate_id (conn);
|
||||
xcb_create_window (conn,
|
||||
screen->root_depth,
|
||||
win.window, screen->root,
|
||||
0, 0,
|
||||
win_w, win_h,
|
||||
0,
|
||||
XCB_WINDOW_CLASS_INPUT_OUTPUT,
|
||||
screen->root_visual,
|
||||
mask, value);
|
||||
title_set (conn, win.window, "Evas XRender Xcb Test");
|
||||
class_set (conn, win.window, "Evas_XRender_XCB_Test", "Main");
|
||||
screen->root_depth,
|
||||
win, screen->root,
|
||||
0, 0,
|
||||
win_w, win_h,
|
||||
0,
|
||||
XCB_WINDOW_CLASS_INPUT_OUTPUT,
|
||||
screen->root_visual,
|
||||
mask, value);
|
||||
title_set (conn, win, "Evas XRender Xcb Test");
|
||||
class_set (conn, win, "Evas_XRender_XCB_Test", "Main");
|
||||
#if 0
|
||||
szhints.flags = PMinSize | PMaxSize | PSize | USSize;
|
||||
szhints.min_width = szhints.max_width = win_w;
|
||||
szhints.min_height = szhints.max_height = win_h;
|
||||
XSetWMNormalHints(disp, win, &szhints);
|
||||
#endif
|
||||
xcb_map_window (conn, win.window);
|
||||
xcb_map_window (conn, win);
|
||||
/* we sync */
|
||||
reply = xcb_get_input_focus_reply(conn,
|
||||
xcb_get_input_focus_unchecked(conn),
|
||||
NULL);
|
||||
xcb_get_input_focus_unchecked(conn),
|
||||
NULL);
|
||||
free(reply);
|
||||
|
||||
/* test evas_free.... :) */
|
||||
|
@ -194,7 +194,7 @@ main(int argc, char **argv)
|
|||
orig_start_time = start_time = get_time();
|
||||
while (1)
|
||||
{
|
||||
e = xcb_poll_for_event(conn, NULL);
|
||||
e = xcb_poll_for_event(conn);
|
||||
|
||||
if (e) {
|
||||
switch (e->response_type)
|
||||
|
@ -202,7 +202,7 @@ main(int argc, char **argv)
|
|||
case XCB_BUTTON_PRESS: {
|
||||
xcb_button_press_event_t *ev = (xcb_button_press_event_t *)e;
|
||||
|
||||
if (ev->detail.id == 3)
|
||||
if (ev->detail == 3)
|
||||
{
|
||||
free(e);
|
||||
goto exit;
|
||||
|
|
|
@ -144,7 +144,7 @@ _best_visual_get(xcb_connection_t *conn, int screen)
|
|||
iter_vis = xcb_depth_visuals_iterator(iter_depth.data);
|
||||
for (; iter_vis.rem; --screen, xcb_visualtype_next (&iter_vis))
|
||||
{
|
||||
if (scr->root_visual.id == iter_vis.data->visual_id.id)
|
||||
if (scr->root_visual == iter_vis.data->visual_id)
|
||||
return iter_vis.data;
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ _best_depth_get(xcb_connection_t *conn, int screen)
|
|||
static Evas_Performance *
|
||||
_output_perf_new(Evas *e, xcb_connection_t *conn, xcb_visualtype_t *vis, xcb_colormap_t cmap, xcb_drawable_t draw, int depth)
|
||||
{
|
||||
return evas_software_xcb_outbuf_perf_new_x(conn, draw, vis, cmap, depth);
|
||||
return evas_software_xcb_generate_id_x(conn, draw, vis, cmap, depth);
|
||||
e = NULL;
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
|
|||
re->end = 1;
|
||||
}
|
||||
|
||||
surface = evas_software_xcb_outbuf_new_region_for_update(re->ob,
|
||||
surface = evas_software_xcb_generate_id_region_for_update(re->ob,
|
||||
ux, uy, uw, uh,
|
||||
cx, cy, cw, ch);
|
||||
*x = ux; *y = uy; *w = uw; *h = uh;
|
||||
|
|
|
@ -118,7 +118,7 @@ void evas_software_xcb_x_write_mask_line (Outbuf
|
|||
int w,
|
||||
int y);
|
||||
int evas_software_xcb_x_can_do_shm (xcb_connection_t *c);
|
||||
Xcb_Output_Buffer *evas_software_xcb_x_output_buffer_new (xcb_connection_t *c,
|
||||
Xcb_Output_Buffer *evas_software_xcb_generate_id (xcb_connection_t *c,
|
||||
int depth,
|
||||
int w,
|
||||
int h,
|
||||
|
@ -172,7 +172,7 @@ Outbuf *evas_software_xcb_outbuf_setup_x (int
|
|||
char *evas_software_xcb_outbuf_perf_serialize_x (Outbuf_Perf *perf);
|
||||
void evas_software_xcb_outbuf_perf_deserialize_x (Outbuf_Perf *perf,
|
||||
const char *data);
|
||||
Outbuf_Perf *evas_software_xcb_outbuf_perf_new_x (xcb_connection_t *conn,
|
||||
Outbuf_Perf *evas_software_xcb_generate_id_x (xcb_connection_t *conn,
|
||||
xcb_drawable_t draw,
|
||||
xcb_visualtype_t *vis,
|
||||
xcb_colormap_t cmap,
|
||||
|
@ -204,7 +204,7 @@ void evas_software_xcb_outbuf_update (Outbuf *buf,
|
|||
int y,
|
||||
int w,
|
||||
int h);
|
||||
RGBA_Image *evas_software_xcb_outbuf_new_region_for_update (Outbuf *buf,
|
||||
RGBA_Image *evas_software_xcb_generate_id_region_for_update (Outbuf *buf,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
|
|
|
@ -17,7 +17,7 @@ evas_software_xcb_outbuf_free(Outbuf * buf)
|
|||
{
|
||||
evas_software_xcb_outbuf_flush(buf);
|
||||
xcb_free_gc(buf->priv.x.conn, buf->priv.x.gc);
|
||||
if (buf->priv.x.gcm.xid)
|
||||
if (buf->priv.x.gcm)
|
||||
xcb_free_gc(buf->priv.x.conn, buf->priv.x.gcm);
|
||||
if (buf->priv.pal)
|
||||
evas_software_xcb_x_color_deallocate(buf->priv.x.conn,
|
||||
|
@ -75,7 +75,7 @@ evas_software_xcb_outbuf_setup_x(int w,
|
|||
Xcb_Output_Buffer *xcbob;
|
||||
|
||||
buf->priv.x.shm = evas_software_xcb_x_can_do_shm(buf->priv.x.conn);
|
||||
xcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn,
|
||||
xcbob = evas_software_xcb_generate_id(buf->priv.x.conn,
|
||||
buf->priv.x.depth,
|
||||
1, 1,
|
||||
buf->priv.x.shm, NULL);
|
||||
|
@ -258,7 +258,7 @@ evas_software_xcb_outbuf_setup_x(int w,
|
|||
}
|
||||
|
||||
RGBA_Image *
|
||||
evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
|
||||
evas_software_xcb_generate_id_region_for_update(Outbuf *buf,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
|
@ -305,15 +305,15 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
|
|||
im->image->data = NULL;
|
||||
im->image->no_free = 1;
|
||||
im->extended_info = obr;
|
||||
obr->xcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn,
|
||||
obr->xcbob = evas_software_xcb_generate_id(buf->priv.x.conn,
|
||||
buf->priv.x.depth,
|
||||
w,
|
||||
h,
|
||||
use_shm,
|
||||
NULL);
|
||||
im->image->data = (DATA32 *)evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl);
|
||||
if (buf->priv.x.mask.pixmap.xid)
|
||||
obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn,
|
||||
if (buf->priv.x.mask)
|
||||
obr->mxcbob = evas_software_xcb_generate_id(buf->priv.x.conn,
|
||||
1,
|
||||
w,
|
||||
h,
|
||||
|
@ -325,28 +325,28 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
|
|||
im = evas_common_image_create(w, h);
|
||||
im->extended_info = obr;
|
||||
if ((buf->rot == 0) || (buf->rot == 180))
|
||||
obr->xcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn,
|
||||
obr->xcbob = evas_software_xcb_generate_id(buf->priv.x.conn,
|
||||
buf->priv.x.depth,
|
||||
w,
|
||||
h,
|
||||
use_shm,
|
||||
NULL);
|
||||
else if ((buf->rot == 90) || (buf->rot == 270))
|
||||
obr->xcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn,
|
||||
obr->xcbob = evas_software_xcb_generate_id(buf->priv.x.conn,
|
||||
buf->priv.x.depth,
|
||||
h,
|
||||
w,
|
||||
use_shm,
|
||||
NULL);
|
||||
if (buf->priv.x.mask.pixmap.xid)
|
||||
obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn,
|
||||
if (buf->priv.x.mask)
|
||||
obr->mxcbob = evas_software_xcb_generate_id(buf->priv.x.conn,
|
||||
1,
|
||||
w,
|
||||
h,
|
||||
use_shm,
|
||||
NULL);
|
||||
}
|
||||
if ((buf->priv.x.mask.pixmap.xid) || (buf->priv.destination_alpha))
|
||||
if ((buf->priv.x.mask) || (buf->priv.destination_alpha))
|
||||
{
|
||||
im->flags |= RGBA_IMAGE_HAS_ALPHA;
|
||||
/* FIXME: faster memset! */
|
||||
|
@ -596,14 +596,14 @@ void
|
|||
evas_software_xcb_outbuf_drawable_set(Outbuf *buf,
|
||||
xcb_drawable_t draw)
|
||||
{
|
||||
if (buf->priv.x.win.window.xid == draw.window.xid) return;
|
||||
if (buf->priv.x.gc.xid)
|
||||
if (buf->priv.x.win == draw) return;
|
||||
if (buf->priv.x.gc)
|
||||
{
|
||||
xcb_free_gc(buf->priv.x.conn, buf->priv.x.gc);
|
||||
buf->priv.x.gc.xid = 0;
|
||||
buf->priv.x.gc = 0;
|
||||
}
|
||||
buf->priv.x.win = draw;
|
||||
buf->priv.x.gc = xcb_gcontext_new(buf->priv.x.conn);
|
||||
buf->priv.x.gc = xcb_generate_id(buf->priv.x.conn);
|
||||
xcb_create_gc(buf->priv.x.conn, buf->priv.x.gc, buf->priv.x.win, 0, NULL);
|
||||
}
|
||||
|
||||
|
@ -611,16 +611,16 @@ void
|
|||
evas_software_xcb_outbuf_mask_set(Outbuf *buf,
|
||||
xcb_drawable_t mask)
|
||||
{
|
||||
if (buf->priv.x.mask.pixmap.xid == mask.pixmap.xid) return;
|
||||
if (buf->priv.x.gcm.xid)
|
||||
if (buf->priv.x.mask == mask) return;
|
||||
if (buf->priv.x.gcm)
|
||||
{
|
||||
xcb_free_gc(buf->priv.x.conn, buf->priv.x.gcm);
|
||||
buf->priv.x.gcm.xid = 0;
|
||||
buf->priv.x.gcm = 0;
|
||||
}
|
||||
buf->priv.x.mask = mask;
|
||||
if (buf->priv.x.mask.pixmap.xid)
|
||||
if (buf->priv.x.mask)
|
||||
{
|
||||
buf->priv.x.gcm = xcb_gcontext_new(buf->priv.x.conn);
|
||||
buf->priv.x.gcm = xcb_generate_id(buf->priv.x.conn);
|
||||
xcb_create_gc(buf->priv.x.conn, buf->priv.x.gcm, buf->priv.x.win, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -649,13 +649,13 @@ evas_software_xcb_outbuf_debug_show(Outbuf *buf,
|
|||
xcb_screen_iterator_t i;
|
||||
|
||||
geom = xcb_get_geometry_reply (buf->priv.x.conn, xcb_get_geometry_unchecked(buf->priv.x.conn, draw), 0);
|
||||
root.window = geom->root;
|
||||
root = geom->root;
|
||||
free (geom);
|
||||
geom = xcb_get_geometry_reply (buf->priv.x.conn, xcb_get_geometry_unchecked(buf->priv.x.conn, root), 0);
|
||||
|
||||
i = xcb_setup_roots_iterator((xcb_setup_t *)xcb_get_setup(buf->priv.x.conn));
|
||||
for (; i.rem; xcb_screen_next(&i))
|
||||
if (i.data->root.xid == geom->root.xid)
|
||||
if (i.data->root == geom->root)
|
||||
{
|
||||
screen = i.data;
|
||||
break;
|
||||
|
@ -763,7 +763,7 @@ evas_software_xcb_outbuf_perf_deserialize_x(Outbuf_Perf *perf,
|
|||
}
|
||||
|
||||
Outbuf_Perf *
|
||||
evas_software_xcb_outbuf_perf_new_x(xcb_connection_t *conn,
|
||||
evas_software_xcb_generate_id_x(xcb_connection_t *conn,
|
||||
xcb_drawable_t draw,
|
||||
xcb_visualtype_t *vis,
|
||||
xcb_colormap_t cmap,
|
||||
|
@ -780,15 +780,15 @@ evas_software_xcb_outbuf_perf_new_x(xcb_connection_t *conn,
|
|||
perf->x.conn = conn;
|
||||
|
||||
/* FIXME: should use the default screen */
|
||||
root.window = xcb_setup_roots_iterator ((xcb_setup_t *)xcb_get_setup (conn)).data->root;
|
||||
if (draw.window.xid)
|
||||
root = xcb_setup_roots_iterator ((xcb_setup_t *)xcb_get_setup (conn)).data->root;
|
||||
if (draw)
|
||||
{
|
||||
xcb_get_geometry_reply_t *geom;
|
||||
xcb_screen_iterator_t i;
|
||||
int cur;
|
||||
|
||||
geom = xcb_get_geometry_reply (conn, xcb_get_geometry_unchecked(conn, draw), NULL);
|
||||
root.window = geom->root;
|
||||
root = geom->root;
|
||||
free (geom);
|
||||
geom = xcb_get_geometry_reply (conn, xcb_get_geometry_unchecked(conn, root), 0);
|
||||
perf->x.w = (int)geom->width;
|
||||
|
@ -797,7 +797,7 @@ evas_software_xcb_outbuf_perf_new_x(xcb_connection_t *conn,
|
|||
perf->x.screen_num = 0;
|
||||
i = xcb_setup_roots_iterator((xcb_setup_t *)xcb_get_setup(conn));
|
||||
for (cur = 0; i.rem; xcb_screen_next(&i), ++cur)
|
||||
if (i.data->root.xid == geom->root.xid)
|
||||
if (i.data->root == geom->root)
|
||||
{
|
||||
perf->x.screen_num = cur;
|
||||
break;
|
||||
|
@ -881,7 +881,7 @@ evas_software_xcb_outbuf_perf_new_x(xcb_connection_t *conn,
|
|||
perf->cpu.info = strdup("");
|
||||
return perf;
|
||||
vis = NULL;
|
||||
cmap.xid = 0;
|
||||
cmap = 0;
|
||||
}
|
||||
|
||||
char *
|
||||
|
@ -942,7 +942,7 @@ evas_software_xcb_outbuf_perf_store_x(Outbuf_Perf *perf)
|
|||
format = STRING;
|
||||
|
||||
str = evas_software_xcb_outbuf_perf_serialize_x(perf);
|
||||
xcb_change_property(perf->x.conn, XCB_PROP_MODE_REPLACE, perf->x.root.window,
|
||||
xcb_change_property(perf->x.conn, XCB_PROP_MODE_REPLACE, perf->x.root,
|
||||
type, format, 8,
|
||||
strlen(str), str);
|
||||
/* we sync */
|
||||
|
@ -967,7 +967,7 @@ evas_software_xcb_outbuf_perf_restore_x(xcb_connection_t *conn,
|
|||
xcb_atom_t type, format;
|
||||
Outbuf_Perf *perf;
|
||||
|
||||
perf = evas_software_xcb_outbuf_perf_new_x(conn, draw, vis, cmap, x_depth);
|
||||
perf = evas_software_xcb_generate_id_x(conn, draw, vis, cmap, x_depth);
|
||||
|
||||
type_str = "__EVAS_PERF_ENGINE_SOFTWARE";
|
||||
type_rep = xcb_intern_atom_reply(conn,
|
||||
|
@ -983,14 +983,14 @@ evas_software_xcb_outbuf_perf_restore_x(xcb_connection_t *conn,
|
|||
format = STRING;
|
||||
free(type_rep);
|
||||
|
||||
cookie = xcb_get_property_unchecked(conn, 0, perf->x.root.window,
|
||||
cookie = xcb_get_property_unchecked(conn, 0, perf->x.root,
|
||||
type, format,
|
||||
0, 16384);
|
||||
prop_rep = xcb_get_property_reply(conn, cookie, NULL);
|
||||
|
||||
if ((prop_rep) &&
|
||||
(prop_rep->format == 8) &&
|
||||
(prop_rep->type.xid == type.xid))
|
||||
(prop_rep->type == type))
|
||||
{
|
||||
char *retval;
|
||||
int retnum;
|
||||
|
@ -1036,7 +1036,7 @@ evas_software_xcb_outbuf_perf_x(xcb_connection_t *conn,
|
|||
int w, h;
|
||||
int do_shm = 0;
|
||||
|
||||
perf = evas_software_xcb_outbuf_perf_new_x(conn, draw, vis, cmap, x_depth);
|
||||
perf = evas_software_xcb_generate_id_x(conn, draw, vis, cmap, x_depth);
|
||||
|
||||
mask = XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL |
|
||||
XCB_CW_BIT_GRAVITY | XCB_CW_BACKING_STORE |
|
||||
|
@ -1047,12 +1047,12 @@ evas_software_xcb_outbuf_perf_x(xcb_connection_t *conn,
|
|||
value[3] = XCB_BACKING_STORE_ALWAYS;
|
||||
value[4] = 1;
|
||||
value[5] = XCB_EVENT_MASK_NO_EVENT;
|
||||
value[6] = cmap.xid;
|
||||
value[6] = cmap;
|
||||
w = perf->x.w;
|
||||
h = perf->x.h;
|
||||
win.window = xcb_window_new (conn);
|
||||
win = xcb_generate_id (conn);
|
||||
xcb_create_window (conn, x_depth,
|
||||
win.window, perf->x.root.window,
|
||||
win, perf->x.root,
|
||||
0, 0,
|
||||
w, h,
|
||||
0,
|
||||
|
@ -1066,8 +1066,8 @@ evas_software_xcb_outbuf_perf_x(xcb_connection_t *conn,
|
|||
free(reply);
|
||||
mask = XCB_CONFIG_WINDOW_STACK_MODE;
|
||||
value[0] = XCB_STACK_MODE_ABOVE;
|
||||
xcb_configure_window (conn, win.window, mask, value2);
|
||||
xcb_map_window (conn, win.window);
|
||||
xcb_configure_window (conn, win, mask, value2);
|
||||
xcb_map_window (conn, win);
|
||||
|
||||
do_shm = evas_software_xcb_x_can_do_shm(conn);
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ evas_software_xcb_outbuf_perf_x(xcb_connection_t *conn,
|
|||
max = w;
|
||||
if (w > h)
|
||||
max = h;
|
||||
gc = xcb_gcontext_new (conn);
|
||||
gc = xcb_generate_id (conn);
|
||||
xcb_create_gc (conn, gc, win, 0, NULL);
|
||||
for (i = 16; i < max; i += 16)
|
||||
{
|
||||
|
@ -1100,7 +1100,7 @@ evas_software_xcb_outbuf_perf_x(xcb_connection_t *conn,
|
|||
t0 = _evas_get_time();
|
||||
for (l = 0; l < loops; l++)
|
||||
{
|
||||
xcbob = evas_software_xcb_x_output_buffer_new(conn,
|
||||
xcbob = evas_software_xcb_generate_id(conn,
|
||||
x_depth,
|
||||
i, i,
|
||||
do_shm,
|
||||
|
@ -1126,7 +1126,7 @@ evas_software_xcb_outbuf_perf_x(xcb_connection_t *conn,
|
|||
t0 = _evas_get_time();
|
||||
for (l = 0; l < loops; l++)
|
||||
{
|
||||
xcbob = evas_software_xcb_x_output_buffer_new(conn,
|
||||
xcbob = evas_software_xcb_generate_id(conn,
|
||||
x_depth,
|
||||
i, i,
|
||||
0,
|
||||
|
@ -1160,6 +1160,6 @@ evas_software_xcb_outbuf_perf_x(xcb_connection_t *conn,
|
|||
}
|
||||
xcb_free_gc(conn, gc);
|
||||
}
|
||||
xcb_destroy_window(conn, win.window);
|
||||
xcb_destroy_window(conn, win);
|
||||
return perf;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,8 @@ evas_software_xcb_x_can_do_shm(xcb_connection_t *c)
|
|||
xcb_drawable_t drawable;
|
||||
int depth;
|
||||
|
||||
drawable.window = xcb_setup_roots_iterator (xcb_get_setup(c)).data->root;
|
||||
/* FIXME: get the corect screen */
|
||||
drawable = xcb_setup_roots_iterator (xcb_get_setup(c)).data->root;
|
||||
geom = xcb_get_geometry_reply (c, xcb_get_geometry_unchecked(c, drawable), 0);
|
||||
if(!geom)
|
||||
return 0;
|
||||
|
@ -78,7 +79,7 @@ evas_software_xcb_x_can_do_shm(xcb_connection_t *c)
|
|||
{
|
||||
Xcb_Output_Buffer *xcbob;
|
||||
|
||||
xcbob = evas_software_xcb_x_output_buffer_new(c,
|
||||
xcbob = evas_software_xcb_generate_id(c,
|
||||
depth,
|
||||
16,
|
||||
16,
|
||||
|
@ -103,7 +104,7 @@ evas_software_xcb_x_can_do_shm(xcb_connection_t *c)
|
|||
/* } */
|
||||
|
||||
Xcb_Output_Buffer *
|
||||
evas_software_xcb_x_output_buffer_new(xcb_connection_t *c,
|
||||
evas_software_xcb_generate_id(xcb_connection_t *c,
|
||||
int depth,
|
||||
int w,
|
||||
int h,
|
||||
|
@ -124,7 +125,7 @@ evas_software_xcb_x_output_buffer_new(xcb_connection_t *c,
|
|||
xcbob->shm_info = malloc(sizeof(xcb_shm_segment_info_t));
|
||||
if (xcbob->shm_info)
|
||||
{
|
||||
xcbob->shm_info->shmseg = xcb_shm_seg_new(c);
|
||||
xcbob->shm_info->shmseg = xcb_generate_id(c);
|
||||
xcbob->image = xcb_image_shm_create(c, depth, XCB_IMAGE_FORMAT_Z_PIXMAP, NULL, w, h);
|
||||
if (xcbob->image)
|
||||
{
|
||||
|
|
|
@ -361,7 +361,7 @@ evas_software_xcb_x_color_allocate(xcb_connection_t *conn,
|
|||
palpriv = pal->data;
|
||||
if ((conn == palpriv->conn) &&
|
||||
(vis == palpriv->vis) &&
|
||||
(cmap.xid == palpriv->cmap.xid))
|
||||
(cmap == palpriv->cmap))
|
||||
{
|
||||
pal->references++;
|
||||
return pal;
|
||||
|
|
Loading…
Reference in New Issue