Remove usage of deprecated class QSGEngine
authorAndy Nichols <andy.nichols@nokia.com>
Mon, 12 Dec 2011 13:25:00 +0000 (14:25 +0100)
committerJørgen Lind <jorgen.lind@nokia.com>
Mon, 12 Dec 2011 15:07:43 +0000 (16:07 +0100)
Replaced by direct calls in QQuickCanvas to createTextureFromId
and createTextureFromImage.

Change-Id: I8aad61f9c48ccd5c6ca703b32df9c2c5fb199f1c
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
src/compositor/compositor_api/waylandsurfaceitem.cpp

index 0de4f98..0d0a942 100644 (file)
@@ -41,8 +41,6 @@
 #include "waylandsurfaceitem.h"
 #include "waylandsurface.h"
 
-#include <QtQuick/QSGEngine>
-
 #include <QtGui/QKeyEvent>
 
 #include <QtQuick/QSGSimpleTextureNode>
@@ -227,12 +225,12 @@ QSGNode *WaylandSurfaceItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa
         if (m_surface->type() == WaylandSurface::Texture) {
             QOpenGLContext *context = QOpenGLContext::currentContext();
 
-            QSGEngine::TextureOption opt = useTextureAlpha() ? QSGEngine::TextureHasAlphaChannel : QSGEngine::TextureOption(0);
-            m_texture = canvas()->sceneGraphEngine()->createTextureFromId(m_surface->texture(context),
+            QQuickCanvas::CreateTextureOptions opt = useTextureAlpha() ? QQuickCanvas::TextureHasAlphaChannel : QQuickCanvas::CreateTextureOptions(0);
+            m_texture = canvas()->createTextureFromId(m_surface->texture(context),
                                                                           m_surface->geometry().size(),
                                                                           opt);
         } else {
-            m_texture = canvas()->sceneGraphEngine()->createTextureFromImage(m_surface->image());
+            m_texture = canvas()->createTextureFromImage(m_surface->image());
         }
         delete oldTexture;
         m_damaged = false;