Use Factory for GraphicsHardwareIntegration
authorJørgen Lind <jorgen.lind@nokia.com>
Mon, 14 Mar 2011 11:46:53 +0000 (12:46 +0100)
committerJørgen Lind <jorgen.lind@nokia.com>
Mon, 14 Mar 2011 11:46:53 +0000 (12:46 +0100)
src/qt-compositor/dri2_xcb/dri2xcbhwintegration.cpp
src/qt-compositor/mesa_egl/mesaeglintegration.cpp
src/qt-compositor/private/wlcompositor.cpp

index 21c0cd7..282f2f7 100644 (file)
 #include <xcb/xcb.h>
 #include <xcb/dri2.h>
 
+GraphicsHardwareIntegration * GraphicsHardwareIntegration::createGraphicsHardwareIntegration(WaylandCompositor *compositor)
+{
+    return new Dri2XcbHWIntegration(compositor);
+}
+
 class DrmObject : public Wayland::Object<struct wl_object>
 {
 public:
index f3d7d7a..4d3ae46 100644 (file)
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
+GraphicsHardwareIntegration * GraphicsHardwareIntegration::createGraphicsHardwareIntegration(WaylandCompositor *compositor)
+{
+    return new MesaEglIntegration(compositor);
+}
 
 class MesaEglIntegrationPrivate
 {
index 947b452..1e9aebe 100644 (file)
@@ -178,11 +178,7 @@ Compositor::Compositor(WaylandCompositor *qt_compositor)
     , m_last_queued_buf(-1)
     , m_qt_compositor(qt_compositor)
 {
-#if defined(QT_COMPOSITOR_MESA_EGL)
-    m_graphics_hw_integration = new MesaEglIntegration(qt_compositor);
-#elif defined(QT_COMPOSITOR_DRI2_XCB)
-    m_graphics_hw_integration = new Dri2XcbHWIntegration(qt_compositor);
-#elif defined (QT_COMPOSITOR_WAYLAND_GL)
+#if defined (QT_COMPOSITOR_WAYLAND_GL)
     m_graphics_hw_integration = GraphicsHardwareIntegration::createGraphicsHardwareIntegration(qt_compositor);
 #endif