From c3f2db4f73e93a3dafe0f52a5f9ca09ca78cc906 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 11 Jun 2009 15:18:55 +0100 Subject: [drm] Add an accelerated image surface. Use the DRM interface to h/w accelerate composition on image surfaces. The purpose of the backend is simply to explore what such a hardware interface might look like and what benefits we might expect. The use case that might justify writing such custom backends are embedded devices running a drm compositor like wayland - which would, for example, allow one to write applications that seamlessly integrated accelerated, dynamic, high quality 2D graphics using Cairo with advanced interaction (e.g. smooth animations in the UI) driven by a clutter framework... In this first step we introduce the fundamental wrapping of GEM for intel and radeon chipsets, and, for comparison, gallium. No acceleration, all we do is use buffer objects (that is use the kernel memory manager) to allocate images and simply use the fallback mechanism. This provides a suitable base to start writing chip specific drivers. --- configure.ac | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9b2f77f5..083b0ccf 100644 --- a/configure.ac +++ b/configure.ac @@ -171,6 +171,31 @@ CAIRO_ENABLE_SURFACE_BACKEND(beos, BeOS/Zeta, no, [ dnl =========================================================================== +CAIRO_ENABLE_SURFACE_BACKEND(drm, DRM, no, [ + drm_REQUIRES="libudev >= 136" + PKG_CHECK_MODULES(drm, $drm_REQUIRES, , [AC_MSG_RESULT(no) + use_drm="no (requires $drm_REQUIRES, udev is available from git://git.kernel.org/pub/scm/linux/hotplug/udev.git)"]) +]) + +CAIRO_ENABLE_SURFACE_BACKEND(gallium, Gallium3D, no, [ + if test "x$use_drm" = "xyes"; then + AC_ARG_WITH([gallium], + [AS_HELP_STRING([--with-gallium=/path/to/mesa], + [directory to find gallium enabled mesa])], + [mesa_DIR="$withval"], + [mesa_DIR="`pwd`/../mesa"]) + gallium_DIR="$mesa_DIR/src/gallium" + gallium_NONPKGCONFIG_CFLAGS="-I$mesa_DIR/include -I$mesa_DIR/src/mesa -I$gallium_DIR/include -I$gallium_DIR/auxiliary" + gallium_NONPKGCONFIG_LIBS="-lGL" + AC_SUBST(mesa_DIR) + AC_SUBST(gallium_DIR) + else + use_gallium="no (requires --enable-drm)" + fi +]) + +dnl =========================================================================== + CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [ use_png=no AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config]) -- cgit v1.2.3