static void * _output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *vis, xcb_colormap_t cmap, int depth, int debug, int grayscale, int max_colors, xcb_drawable_t mask, int shape_dither, int destination_alpha) { Render_Engine *re; Outbuf *ob; if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; evas_software_xcb_init(); evas_software_xcb_color_init(); evas_software_xcb_outbuf_init(); ob = evas_software_xcb_outbuf_setup(w, h, rot, OUTBUF_DEPTH_INHERIT, conn, screen, draw, vis, cmap, depth, grayscale, max_colors, mask, shape_dither, destination_alpha); if (!ob) goto on_error; /* for updates return 1 big buffer, but only use portions of it, also cache * it and keepit around until an idle_flush */ /* disable for now - i am hunting down why some expedite tests are slower, * as well as shaped stuff is broken and probable non-32bpp is broken as * convert funcs dont do the right thing * */ // re->ob->onebuf = 1; evas_software_xcb_outbuf_debug_set(ob, debug); if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL, evas_software_xcb_outbuf_rotation_get, evas_software_xcb_outbuf_reconfigure, NULL, evas_software_xcb_outbuf_new_region_for_update, evas_software_xcb_outbuf_push_updated_region, evas_software_xcb_outbuf_free_region_for_update, evas_software_xcb_outbuf_idle_flush, evas_software_xcb_outbuf_flush, evas_software_xcb_outbuf_free, w, h)) goto on_error; return re; on_error: if (ob) evas_software_xcb_outbuf_free(ob); free(re); return NULL; }
static void * _output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *vis, xcb_colormap_t cmap, int depth, int debug, int grayscale, int max_colors, xcb_drawable_t mask, int shape_dither, int destination_alpha) { Render_Engine *re; re = calloc(1, sizeof(Render_Engine)); if (!re) return NULL; evas_software_xcb_x_init(); evas_software_xcb_x_color_init(); evas_software_xcb_outbuf_init(); // FIXME: re->xrdb re->ob = evas_software_xcb_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT, conn, screen, draw, vis, cmap, depth, grayscale, max_colors, mask, shape_dither, destination_alpha); if (!re->ob) { free(re); return NULL; } /* for updates return 1 big buffer, but only use portions of it, also cache it and keepit around until an idle_flush */ /* disable for now - i am hunting down why some expedite tests are slower, * as well as shaped stuff is broken and probable non-32bpp is broken as * convert funcs dont do the right thing * re->ob->onebuf = 1; */ evas_software_xcb_outbuf_debug_set(re->ob, debug); re->tb = evas_common_tilebuf_new(w, h); if (!re->tb) { evas_software_xcb_outbuf_free(re->ob); free(re); return NULL; } /* in preliminary tests 16x16 gave highest framerates */ evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); return re; }