forked from enlightenment/efl
Evas: Remove dependency on xcb-aux and add code to find the visual
based on id, as we were only using one function from there. SVN revision: 61171
This commit is contained in:
parent
090ab4805c
commit
2148b1d2f6
|
@ -187,10 +187,10 @@ evas_engine_[]$1[]_cflags=""
|
|||
evas_engine_[]$1[]_libs=""
|
||||
|
||||
PKG_CHECK_MODULES([XCB],
|
||||
[xcb xcb-shm xcb-image >= 0.2.1 xcb-aux pixman-1],
|
||||
[xcb xcb-shm xcb-image >= 0.2.1 pixman-1],
|
||||
[
|
||||
have_dep="yes"
|
||||
requirement="xcb xcb-shm xcb-image xcb-aux pixman-1"
|
||||
requirement="xcb xcb-shm xcb-image pixman-1"
|
||||
evas_engine_[]$1[]_cflags="${XCB_CFLAGS}"
|
||||
evas_engine_[]$1[]_libs="${XCB_LIBS}"
|
||||
],[
|
||||
|
@ -254,10 +254,10 @@ if test "x${have_dep}" = "xyes" ; then
|
|||
fi
|
||||
|
||||
PKG_CHECK_MODULES([XCB_GL],
|
||||
[x11-xcb xcb xcb-aux xcb-glx xcb-render xcb-renderutil],
|
||||
[x11-xcb xcb xcb-glx xcb-render xcb-renderutil],
|
||||
[
|
||||
have_dep="yes"
|
||||
requirement="x11-xcb xcb xcb-aux xcb-glx xcb-render xcb-renderutil"
|
||||
requirement="x11-xcb xcb xcb-glx xcb-render xcb-renderutil"
|
||||
evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS}"
|
||||
evas_engine_[]$1[]_libs="${XCB_GL_LIBS}"
|
||||
],[
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#include "evas_common.h"
|
||||
#include "evas_xcb_buffer.h"
|
||||
#include <xcb/xcb_aux.h>
|
||||
|
||||
/* local function prototypes */
|
||||
static void _xcbob_sync(xcb_connection_t *conn);
|
||||
static xcb_image_t *_xcbob_create_native(xcb_connection_t *conn, int w, int h, xcb_image_format_t format, uint8_t depth, void *base, uint32_t bytes, uint8_t *data);
|
||||
static xcb_format_t *_xcbob_find_format(const xcb_setup_t *setup, uint8_t depth);
|
||||
static xcb_visualtype_t *_xcbob_find_visual_by_id(xcb_screen_t *screen, xcb_visualid_t id);
|
||||
|
||||
void
|
||||
evas_software_xcb_write_mask_line(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int w, int y)
|
||||
|
@ -230,7 +230,7 @@ evas_software_xcb_can_do_shm(xcb_connection_t *conn, xcb_screen_t *screen)
|
|||
if (conn == cached_conn) return cached_result;
|
||||
cached_conn = conn;
|
||||
|
||||
visual = xcb_aux_find_visual_by_id(screen, screen->root_visual);
|
||||
visual = _xcbob_find_visual_by_id(screen, screen->root_visual);
|
||||
|
||||
xcbob =
|
||||
evas_software_xcb_output_buffer_new(conn, visual, screen->root_depth,
|
||||
|
@ -468,3 +468,23 @@ _xcbob_find_format(const xcb_setup_t *setup, uint8_t depth)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static xcb_visualtype_t *
|
||||
_xcbob_find_visual_by_id(xcb_screen_t *screen, xcb_visualid_t id)
|
||||
{
|
||||
xcb_depth_iterator_t diter;
|
||||
xcb_visualtype_iterator_t viter;
|
||||
|
||||
diter = xcb_screen_allowed_depths_iterator(screen);
|
||||
for (; diter.rem; xcb_depth_next(&diter))
|
||||
{
|
||||
viter = xcb_depth_visuals_iterator(diter.data);
|
||||
for (; viter.rem; xcb_visualtype_next(&viter))
|
||||
{
|
||||
if (viter.data->visual_id == id)
|
||||
return viter.data;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue