summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-14 12:46:26 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-14 12:46:26 +0100
commit507b8abcf6326bbbe8c188016043b21438256b71 (patch)
treef839bdd97fb80fde51c3f8749d279097a89f6338
parent5d9da3decff06015d03413713714552095dfa616 (diff)
Excise xcb-drmHEADmaster
The experiment was at best a pyrrhic victory. Whilst it did show that you could successfully subvert cairo_xcb_surface_t and provide the rendering locally faster (than the xlib driver at that time), any performance benefits were lost in the synchronisation overheads and server-side buffer allocation. Once cairo-gl is mature, we need to look at how we can overcome these to improve client-side rendering In the meantime, cairo-xcb is no longer my playground for experimentation and is shaping up to become a stable backend... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--boilerplate/Makefile.win32.features12
-rw-r--r--build/Makefile.win32.features2
-rw-r--r--build/Makefile.win32.features-h6
-rw-r--r--build/configure.ac.features1
-rw-r--r--configure.ac11
-rw-r--r--src/Makefile.win32.features16
-rw-r--r--src/cairo-xcb-connection.c47
-rw-r--r--src/cairo-xcb-private.h2
-rw-r--r--src/cairo-xcb-screen.c88
-rw-r--r--src/cairo-xcb-surface-render.c73
-rw-r--r--src/cairo-xcb-surface.c104
-rw-r--r--src/drm/cairo-drm-i915-shader.c24
-rw-r--r--src/drm/cairo-drm-i965-shader.c24
13 files changed, 0 insertions, 410 deletions
diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index 14263a83..0cf7095b 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -211,18 +211,6 @@ enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_gallium_cxx_sources
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_gallium_sources)
endif
-unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_drm_headers)
-all_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_drm_headers)
-all_cairo_boilerplate_private += $(cairo_boilerplate_xcb_drm_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xcb_drm_cxx_sources)
-all_cairo_boilerplate_sources += $(cairo_boilerplate_xcb_drm_sources)
-ifeq ($(CAIRO_HAS_XCB_DRM_FUNCTIONS),1)
-enabled_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_drm_headers)
-enabled_cairo_boilerplate_private += $(cairo_boilerplate_xcb_drm_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xcb_drm_cxx_sources)
-enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xcb_drm_sources)
-endif
-
supported_cairo_boilerplate_headers += $(cairo_boilerplate_png_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_png_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_png_private)
diff --git a/build/Makefile.win32.features b/build/Makefile.win32.features
index 0d0261d0..5d75ba34 100644
--- a/build/Makefile.win32.features
+++ b/build/Makefile.win32.features
@@ -15,9 +15,7 @@ CAIRO_HAS_SKIA_SURFACE=0
CAIRO_HAS_OS2_SURFACE=0
CAIRO_HAS_BEOS_SURFACE=0
CAIRO_HAS_DRM_SURFACE=0
-CAIRO_HAS_DRM_XR_FUNCTIONS=0
CAIRO_HAS_GALLIUM_SURFACE=0
-CAIRO_HAS_XCB_DRM_FUNCTIONS=0
CAIRO_HAS_PNG_FUNCTIONS=1
CAIRO_HAS_GL_SURFACE=0
CAIRO_HAS_GLESV2_SURFACE=0
diff --git a/build/Makefile.win32.features-h b/build/Makefile.win32.features-h
index c1883b98..e35cc6c5 100644
--- a/build/Makefile.win32.features-h
+++ b/build/Makefile.win32.features-h
@@ -50,15 +50,9 @@ endif
ifeq ($(CAIRO_HAS_DRM_SURFACE),1)
@echo "#define CAIRO_HAS_DRM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
-ifeq ($(CAIRO_HAS_DRM_XR_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_DRM_XR_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
-endif
ifeq ($(CAIRO_HAS_GALLIUM_SURFACE),1)
@echo "#define CAIRO_HAS_GALLIUM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
-ifeq ($(CAIRO_HAS_XCB_DRM_FUNCTIONS),1)
- @echo "#define CAIRO_HAS_XCB_DRM_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
-endif
ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
@echo "#define CAIRO_HAS_PNG_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
endif
diff --git a/build/configure.ac.features b/build/configure.ac.features
index 352003b8..4cccd9cf 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -400,7 +400,6 @@ AC_DEFUN([CAIRO_REPORT],
echo " WGL functions: $use_wgl"
echo " EGL functions: $use_egl"
echo " X11-xcb functions: $use_xlib_xcb"
- echo " XCB-drm functions: $use_xcb_drm"
echo " XCB-shm functions: $use_xcb_shm"
echo ""
echo "The following features and utilities:"
diff --git a/configure.ac b/configure.ac
index 60960078..9748f083 100644
--- a/configure.ac
+++ b/configure.ac
@@ -259,17 +259,6 @@ CAIRO_ENABLE_SURFACE_BACKEND(gallium, Gallium3D, no, [
fi
])
-CAIRO_ENABLE_FUNCTIONS(xcb_drm, XCB/DRM, no, [
- if test "x$use_xcb" = "xyes" -a "x$use_drm" = "xyes"; then
- xcb_drm_REQUIRES="xcb-dri2"
- PKG_CHECK_MODULES(xcb_drm, $xcb_drm_REQUIRES, ,
- [AC_MSG_RESULT(no)
- use_xcb_drm="no (requires $xcb_drm_REQUIRES http://xcb.freedesktop.org)"])
- else
- use_xcb_drm="no (requires both --enable-xcb and --enable-drm)"
- fi
-])
-
dnl ===========================================================================
CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
diff --git a/src/Makefile.win32.features b/src/Makefile.win32.features
index d36bacfd..640df730 100644
--- a/src/Makefile.win32.features
+++ b/src/Makefile.win32.features
@@ -277,22 +277,6 @@ ifeq ($(CAIRO_HAS_GALLIUM_SURFACE),1)
enabled_cairo_pkgconf += cairo-gallium.pc
endif
-unsupported_cairo_headers += $(cairo_xcb_drm_headers)
-all_cairo_headers += $(cairo_xcb_drm_headers)
-all_cairo_private += $(cairo_xcb_drm_private)
-all_cairo_cxx_sources += $(cairo_xcb_drm_cxx_sources)
-all_cairo_sources += $(cairo_xcb_drm_sources)
-ifeq ($(CAIRO_HAS_XCB_DRM_FUNCTIONS),1)
-enabled_cairo_headers += $(cairo_xcb_drm_headers)
-enabled_cairo_private += $(cairo_xcb_drm_private)
-enabled_cairo_cxx_sources += $(cairo_xcb_drm_cxx_sources)
-enabled_cairo_sources += $(cairo_xcb_drm_sources)
-endif
-all_cairo_pkgconf += cairo-xcb-drm.pc
-ifeq ($(CAIRO_HAS_XCB_DRM_FUNCTIONS),1)
-enabled_cairo_pkgconf += cairo-xcb-drm.pc
-endif
-
supported_cairo_headers += $(cairo_png_headers)
all_cairo_headers += $(cairo_png_headers)
all_cairo_private += $(cairo_png_private)
diff --git a/src/cairo-xcb-connection.c b/src/cairo-xcb-connection.c
index de1bb179..19d54629 100644
--- a/src/cairo-xcb-connection.c
+++ b/src/cairo-xcb-connection.c
@@ -41,10 +41,6 @@
#include <xcb/bigreq.h>
#include <errno.h>
-#if CAIRO_HAS_XCB_DRM_FUNCTIONS
-#include <xcb/dri2.h>
-#endif
-
#if CAIRO_HAS_XCB_SHM_FUNCTIONS
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -446,32 +442,10 @@ _cairo_xcb_connection_query_shm (cairo_xcb_connection_t *connection)
}
#endif
-#if CAIRO_HAS_XCB_DRM_FUNCTIONS
-static void
-_cairo_xcb_connection_query_dri2 (cairo_xcb_connection_t *connection)
-{
- xcb_connection_t *c = connection->xcb_connection;
- xcb_dri2_query_version_reply_t *version;
-
- version = xcb_dri2_query_version_reply (c,
- xcb_dri2_query_version (c,
- XCB_DRI2_MAJOR_VERSION,
- XCB_DRI2_MINOR_VERSION),
- 0);
- if (version == NULL)
- return;
-
- free (version);
-
- connection->flags |= CAIRO_XCB_HAS_DRI2;
-}
-#endif
-
static cairo_status_t
_device_flush (void *device)
{
cairo_xcb_connection_t *connection = device;
- cairo_xcb_screen_t *screen;
cairo_status_t status;
status = cairo_device_acquire (&connection->device);
@@ -482,15 +456,6 @@ _device_flush (void *device)
_cairo_xcb_connection_shm_mem_pools_flush (connection);
#endif
- CAIRO_MUTEX_LOCK (connection->screens_mutex);
- cairo_list_foreach_entry (screen, cairo_xcb_screen_t,
- &connection->screens, link)
- {
- if (screen->device != NULL)
- cairo_device_flush (screen->device);
- }
- CAIRO_MUTEX_UNLOCK (connection->screens_mutex);
-
xcb_flush (connection->xcb_connection);
cairo_device_release (&connection->device);
@@ -675,9 +640,6 @@ _cairo_xcb_connection_get (xcb_connection_t *xcb_connection)
#if 0
xcb_prefetch_extension_data (xcb_connection, &xcb_cairo_id);
#endif
-#if CAIRO_HAS_XCB_DRM_FUNCTIONS
- xcb_prefetch_extension_data (xcb_connection, &xcb_dri2_id);
-#endif
xcb_prefetch_maximum_request_length (xcb_connection);
@@ -711,15 +673,6 @@ _cairo_xcb_connection_get (xcb_connection_t *xcb_connection)
}
#endif
- connection->dri2 = NULL;
-#if CAIRO_HAS_XCB_DRM_FUNCTIONS
- ext = xcb_get_extension_data (xcb_connection, &xcb_dri2_id);
- if (ext != NULL && ext->present) {
- _cairo_xcb_connection_query_dri2 (connection);
- connection->dri2 = ext;
- }
-#endif
-
CAIRO_MUTEX_UNLOCK (connection->device.mutex);
cairo_list_add (&connection->link, &connections);
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h
index 3f085e0d..ec6aeb51 100644
--- a/src/cairo-xcb-private.h
+++ b/src/cairo-xcb-private.h
@@ -173,7 +173,6 @@ struct _cairo_xcb_screen {
cairo_xcb_connection_t *connection;
xcb_screen_t *xcb_screen;
- cairo_device_t *device;
xcb_gcontext_t gc[4];
int gc_depths; /* 4 x uint8_t */
@@ -211,7 +210,6 @@ struct _cairo_xcb_connection {
const xcb_setup_t *root;
const xcb_query_extension_reply_t *render;
const xcb_query_extension_reply_t *shm;
- const xcb_query_extension_reply_t *dri2;
cairo_list_t free_xids;
cairo_freepool_t xid_pool;
diff --git a/src/cairo-xcb-screen.c b/src/cairo-xcb-screen.c
index efe42cf9..20974756 100644
--- a/src/cairo-xcb-screen.c
+++ b/src/cairo-xcb-screen.c
@@ -84,9 +84,6 @@ _cairo_xcb_screen_finish (cairo_xcb_screen_t *screen)
_cairo_cache_fini (&screen->radial_pattern_cache);
_cairo_freelist_fini (&screen->pattern_cache_entry_freelist);
- cairo_device_finish (screen->device);
- cairo_device_destroy (screen->device);
-
free (screen);
}
@@ -124,85 +121,6 @@ _pattern_cache_entry_destroy (void *closure)
_cairo_freelist_free (&entry->screen->pattern_cache_entry_freelist, entry);
}
-#if CAIRO_HAS_DRM_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
-#include "drm/cairo-drm-private.h"
-
-#include <drm/drm.h>
-#include <sys/ioctl.h>
-#include <xcb/dri2.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-static int drm_magic (int fd, uint32_t *magic)
-{
- drm_auth_t auth;
-
- if (ioctl (fd, DRM_IOCTL_GET_MAGIC, &auth))
- return -errno;
-
- *magic = auth.magic;
- return 0;
-}
-
-static cairo_device_t *
-_xcb_drm_device (xcb_connection_t *xcb_connection,
- xcb_screen_t *xcb_screen)
-{
- cairo_device_t *device = NULL;
- xcb_dri2_connect_reply_t *connect;
- drm_magic_t magic;
- int fd;
-
- connect = xcb_dri2_connect_reply (xcb_connection,
- xcb_dri2_connect (xcb_connection,
- xcb_screen->root,
- 0),
- 0);
- if (connect == NULL)
- return NULL;
-
- fd = open (xcb_dri2_connect_device_name (connect), O_RDWR);
- free (connect);
-
- if (fd < 0)
- return NULL;
-
- device = cairo_drm_device_get_for_fd (fd);
- close (fd);
-
- if (device != NULL) {
- xcb_dri2_authenticate_reply_t *authenticate;
-
- if (drm_magic (((cairo_drm_device_t *) device)->fd, &magic) < 0) {
- cairo_device_destroy (device);
- return NULL;
- }
-
- authenticate = xcb_dri2_authenticate_reply (xcb_connection,
- xcb_dri2_authenticate (xcb_connection,
- xcb_screen->root,
- magic),
- 0);
- if (authenticate == NULL) {
- cairo_device_destroy (device);
- return NULL;
- }
-
- free (authenticate);
- }
-
- return device;
-}
-#else
-static cairo_device_t *
-_xcb_drm_device (xcb_connection_t *xcb_connection,
- xcb_screen_t *xcb_screen)
-{
- return NULL;
-}
-#endif
-
cairo_xcb_screen_t *
_cairo_xcb_screen_get (xcb_connection_t *xcb_connection,
xcb_screen_t *xcb_screen)
@@ -245,11 +163,6 @@ _cairo_xcb_screen_get (xcb_connection_t *xcb_connection,
cairo_list_init (&screen->surfaces);
cairo_list_init (&screen->pictures);
- if (connection->flags & CAIRO_XCB_HAS_DRI2)
- screen->device = _xcb_drm_device (xcb_connection, xcb_screen);
- else
- screen->device = NULL;
-
screen->gc_depths = 0;
memset (screen->gc, 0, sizeof (screen->gc));
@@ -284,7 +197,6 @@ error_linear:
_cairo_cache_fini (&screen->linear_pattern_cache);
error_screen:
CAIRO_MUTEX_UNLOCK (connection->screens_mutex);
- cairo_device_destroy (screen->device);
free (screen);
return NULL;
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 4f4b1dc9..5a0bb224 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -40,10 +40,6 @@
#include "cairo-surface-subsurface-private.h"
#include "cairo-xcb-private.h"
-#if CAIRO_HAS_XCB_DRM_FUNCTIONS && CAIRO_HAS_DRM_SURFACE
-#include "drm/cairo-drm-private.h"
-#endif
-
#define PIXMAN_MAX_INT ((pixman_fixed_1 >> 1) - pixman_fixed_e) /* need to ensure deltas also fit */
/**
@@ -1117,75 +1113,6 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
}
}
#endif
-#if CAIRO_HAS_XCB_DRM_FUNCTIONS && CAIRO_HAS_DRM_SURFACE
- else if (source->type == CAIRO_SURFACE_TYPE_DRM &&
- target->drm != NULL &&
- target->drm->device == source->device)
- {
- cairo_drm_surface_t *drm = (cairo_drm_surface_t *) source;
- cairo_xcb_surface_t *tmp;
- xcb_pixmap_t pixmap;
- pixman_format_code_t pixman_format;
- cairo_surface_pattern_t pattern;
- cairo_status_t status;
-
- /* XXX XRenderCreatePictureForNative:
- * Copy the source to a temporary pixmap if possible.
- * Still cheaper than pushing the image via the CPU.
- */
-
- switch (drm->format) {
- case CAIRO_FORMAT_A1:
- pixman_format = PIXMAN_a1;
- break;
- case CAIRO_FORMAT_A8:
- pixman_format = PIXMAN_a8;
- break;
- case CAIRO_FORMAT_RGB24:
- pixman_format = PIXMAN_x8r8g8b8;
- break;
- default:
- case CAIRO_FORMAT_ARGB32:
- pixman_format = PIXMAN_a8r8g8b8;
- break;
- }
-
- pixmap =
- _cairo_xcb_connection_create_pixmap (target->connection,
- PIXMAN_FORMAT_DEPTH (pixman_format),
- target->drawable,
- drm->width, drm->height);
-
- tmp = (cairo_xcb_surface_t *)
- _cairo_xcb_surface_create_internal (target->screen,
- pixmap, TRUE,
- pixman_format,
- target->connection->standard_formats[drm->format],
- drm->width, drm->height);
- if (unlikely (tmp->base.status)) {
- _cairo_xcb_connection_free_pixmap (target->connection, pixmap);
- return (cairo_xcb_picture_t *) tmp;
- }
-
- _cairo_pattern_init_for_surface (&pattern, source);
- status = _cairo_surface_paint (&tmp->base,
- CAIRO_OPERATOR_SOURCE,
- &pattern.base,
- NULL);
- _cairo_pattern_fini (&pattern.base);
-
- if (unlikely (status)) {
- cairo_surface_destroy (&tmp->base);
- return (cairo_xcb_picture_t *) _cairo_surface_create_in_error (status);
- }
-
- picture = _copy_to_picture (tmp);
- cairo_surface_destroy (&tmp->base);
-
- if (unlikely (picture->base.status))
- return picture;
- }
-#endif
#if CAIRO_HAS_GL_FUNCTIONS
else if (source->type == CAIRO_SURFACE_TYPE_GL)
{
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 261e6f33..bba7a9c7 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -43,10 +43,6 @@
#include "cairo-xcb.h"
#include "cairo-xcb-private.h"
-#if CAIRO_HAS_XCB_DRM_FUNCTIONS
-#include <xcb/dri2.h>
-#endif
-
#define AllPlanes ((unsigned) -1)
#define CAIRO_ASSUME_PIXMAP 20
#define XLIB_COORD_MAX 32767
@@ -57,10 +53,6 @@ slim_hidden_proto (cairo_xcb_surface_create_for_bitmap);
slim_hidden_proto (cairo_xcb_surface_create_with_xrender_format);
#endif
-#if CAIRO_HAS_DRM_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
-#include "drm/cairo-drm-private.h"
-#endif
-
/**
* SECTION:cairo-xcb
* @Title: XCB Surfaces
@@ -191,16 +183,6 @@ _cairo_xcb_surface_create_similar (void *abstract_other,
height <= 0))
return _cairo_xcb_surface_create_similar_image (other, content, width, height);
-#if CAIRO_HAS_DRM_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
- if (other->drm != NULL) {
- cairo_surface_t *drm;
-
- drm = other->drm->backend->create_similar (other->drm, content, width, height);
- if (drm != NULL)
- return drm;
- }
-#endif
-
if ((other->flags & CAIRO_XCB_HAS_RENDER) == 0)
return _cairo_xcb_surface_create_similar_image (other, content, width, height);
@@ -277,16 +259,6 @@ _cairo_xcb_surface_finish (void *abstract_surface)
cairo_list_del (&surface->link);
-#if CAIRO_HAS_DRM_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
- if (surface->drm != NULL) {
- cairo_surface_finish (surface->drm);
- cairo_surface_destroy (surface->drm);
-
- xcb_dri2_destroy_drawable (surface->connection->xcb_connection,
- surface->drawable);
- }
-#endif
-
status = _cairo_xcb_connection_acquire (surface->connection);
if (status == CAIRO_STATUS_SUCCESS) {
if (surface->picture != XCB_NONE) {
@@ -982,74 +954,6 @@ const cairo_surface_backend_t _cairo_xcb_surface_backend = {
_cairo_xcb_surface_glyphs,
};
-#if CAIRO_HAS_DRM_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
-static cairo_surface_t *
-_xcb_drm_create_surface_for_drawable (cairo_xcb_connection_t *connection,
- cairo_xcb_screen_t *screen,
- xcb_drawable_t drawable,
- pixman_format_code_t pixman_format,
- int width, int height)
-{
- uint32_t attachments[] = { XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT };
- xcb_dri2_get_buffers_reply_t *buffers;
- xcb_dri2_dri2_buffer_t *buffer;
- cairo_surface_t *surface;
-
- if (! _cairo_drm_size_is_valid (screen->device, width, height))
- return NULL;
-
- xcb_dri2_create_drawable (connection->xcb_connection,
- drawable);
-
- buffers = xcb_dri2_get_buffers_reply (connection->xcb_connection,
- xcb_dri2_get_buffers (connection->xcb_connection,
- drawable, 1,
- ARRAY_LENGTH (attachments),
- attachments),
- 0);
- if (buffers == NULL) {
- xcb_dri2_destroy_drawable (connection->xcb_connection,
- drawable);
- return NULL;
- }
-
- /* If the drawable is a window, we expect to receive an extra fake front,
- * which would involve copying on each flush - contrary to the user
- * expectations. But that is likely to be preferable to mixing drm/xcb
- * operations.
- */
- buffer = xcb_dri2_get_buffers_buffers (buffers);
- if (buffers->count == 1 && buffer[0].attachment == XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT) {
- assert (buffer[0].cpp == PIXMAN_FORMAT_BPP (pixman_format) / 8);
- surface = cairo_drm_surface_create_for_name (screen->device,
- buffer[0].name,
- _cairo_format_from_pixman_format (pixman_format),
- width, height,
- buffer[0].pitch);
- } else {
- xcb_dri2_destroy_drawable (connection->xcb_connection,
- drawable);
- surface = NULL;
- }
- free (buffers);
-
- return surface;
-}
-
-#else
-
-static cairo_surface_t *
-_xcb_drm_create_surface_for_drawable (cairo_xcb_connection_t *connection,
- cairo_xcb_screen_t *screen,
- xcb_drawable_t drawable,
- pixman_format_code_t pixman_format,
- int width, int height)
-{
- return NULL;
-}
-
-#endif
-
cairo_surface_t *
_cairo_xcb_surface_create_internal (cairo_xcb_screen_t *screen,
xcb_drawable_t drawable,
@@ -1095,14 +999,6 @@ _cairo_xcb_surface_create_internal (cairo_xcb_screen_t *screen,
surface->flags = screen->connection->flags;
surface->marked_dirty = FALSE;
- surface->drm = NULL;
- if (screen->device != NULL) {
- surface->drm = _xcb_drm_create_surface_for_drawable (surface->connection,
- surface->screen,
- drawable,
- pixman_format,
- width, height);
- }
return &surface->base;
}
diff --git a/src/drm/cairo-drm-i915-shader.c b/src/drm/cairo-drm-i915-shader.c
index b67608ae..a1911d0a 100644
--- a/src/drm/cairo-drm-i915-shader.c
+++ b/src/drm/cairo-drm-i915-shader.c
@@ -39,11 +39,6 @@
#include "cairo-surface-subsurface-private.h"
#include "cairo-surface-snapshot-private.h"
-#if CAIRO_HAS_XCB_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
-/* for DRI2/DRM interoperability */
-#include "cairo-xcb-private.h"
-#endif
-
#if 0
static cairo_status_t
i915_packed_pixel_surface_finish (void *abstract_surface)
@@ -1531,25 +1526,6 @@ i915_shader_acquire_surface (i915_shader_t *shader,
src->base.matrix = pattern->base.matrix;
filter = sampled_area (pattern, extents, &sample);
-#if CAIRO_HAS_XCB_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
- if (surface->type == CAIRO_SURFACE_TYPE_XCB) {
- cairo_surface_t *xcb = surface;
-
- if (xcb->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) {
- xcb = ((cairo_surface_subsurface_t *) surface)->target;
- } else if (xcb->backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
- xcb = ((cairo_surface_snapshot_t *) surface)->target;
- }
-
- /* XXX copy windows (IncludeInferiors) to a pixmap/drm surface
- * xcb = _cairo_xcb_surface_to_drm (xcb)
- */
- xcb = ((cairo_xcb_surface_t *) xcb)->drm;
- if (xcb != NULL)
- drm = xcb;
- }
-#endif
-
if (surface->type == CAIRO_SURFACE_TYPE_DRM) {
if (surface->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) {
drm = ((cairo_surface_subsurface_t *) surface)->target;
diff --git a/src/drm/cairo-drm-i965-shader.c b/src/drm/cairo-drm-i965-shader.c
index 03d7d443..f88e5a43 100644
--- a/src/drm/cairo-drm-i965-shader.c
+++ b/src/drm/cairo-drm-i965-shader.c
@@ -43,11 +43,6 @@
#include "cairo-drm-intel-brw-eu.h"
-#if CAIRO_HAS_XCB_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
-/* for DRI2/DRM interoperability */
-#include "cairo-xcb-private.h"
-#endif
-
/* Theory of shaders:
*
* 3 types of rectangular inputs:
@@ -400,25 +395,6 @@ i965_shader_acquire_surface (i965_shader_t *shader,
assert (src->type.fragment == FS_NONE);
drm = surface = pattern->surface;
-#if CAIRO_HAS_XCB_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
- if (surface->type == CAIRO_SURFACE_TYPE_XCB) {
- cairo_surface_t *xcb = surface;
-
- if (xcb->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) {
- xcb = ((cairo_surface_subsurface_t *) surface)->target;
- } else if (xcb->backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
- xcb = ((cairo_surface_snapshot_t *) surface)->target;
- }
-
- /* XXX copy windows (IncludeInferiors) to a pixmap/drm surface
- * xcb = _cairo_xcb_surface_to_drm (xcb)
- */
- xcb = ((cairo_xcb_surface_t *) xcb)->drm;
- if (xcb != NULL)
- drm = xcb;
- }
-#endif
-
if (surface->type == CAIRO_SURFACE_TYPE_DRM) {
if (surface->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) {
drm = ((cairo_surface_subsurface_t *) surface)->target;