CHECK_XCB_CONN;
vis = (xcb_visualtype_t *)im->vis;
- if (!im->xim) _ecore_xcb_image_shm_create(im);
if (((vis->_class == XCB_VISUAL_CLASS_TRUE_COLOR) ||
(vis->_class == XCB_VISUAL_CLASS_DIRECT_COLOR)) &&
(vis->green_mask == 0x00ff00) &&
(vis->blue_mask == 0x0000ff))
{
+ const xcb_setup_t *setup = xcb_get_setup(_ecore_xcb_conn);
+
+ if (!setup) return EINA_FALSE;
#ifdef WORDS_BIGENDIAN
- if (im->xim->byte_order == XCB_IMAGE_ORDER_MSB_FIRST) return EINA_TRUE;
+ if (setup->image_byte_order == XCB_IMAGE_ORDER_MSB_FIRST) return EINA_TRUE;
#else
- if (im->xim->byte_order == XCB_IMAGE_ORDER_LSB_FIRST) return EINA_TRUE;
+ if (setup->image_byte_order == XCB_IMAGE_ORDER_LSB_FIRST) return EINA_TRUE;
#endif
}
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (im->shm)
{
-
- if (!im->xim)
- _ecore_x_image_shm_create(im);
+ if (!im->xim) _ecore_x_image_shm_create(im);
if (!im->xim)
return EINA_FALSE;
_ecore_x_image_err = 0;
-
+
ecore_x_sync();
// optimised path
ph = XSetErrorHandler((XErrorHandler)_ecore_x_image_error_handler);
ecore_x_image_is_argb32_get(Ecore_X_Image *im)
{
Visual *vis = im->vis;
- if (!im->xim)
- {
- if (im->shm) _ecore_x_image_shm_create(im);
- else _ecore_x_image_create(im);
- if (!im->xim) return EINA_FALSE;
- }
if (((vis->class == TrueColor) ||
(vis->class == DirectColor)) &&
(im->bpp == 4) &&
(vis->blue_mask == 0x0000ff))
{
#ifdef WORDS_BIGENDIAN
- if (im->xim->bitmap_bit_order == MSBFirst) return EINA_TRUE;
+ if (BitmapBitOrder(_ecore_x_disp) == MSBFirst) return EINA_TRUE;
#else
- if (im->xim->bitmap_bit_order == LSBFirst) return EINA_TRUE;
+ if (BitmapBitOrder(_ecore_x_disp) == LSBFirst) return EINA_TRUE;
#endif
}
return EINA_FALSE;