Skip to content

Commit

Permalink
Changing from QQuickCanvas to QQuickWindow
Browse files Browse the repository at this point in the history
Following Change Id34e2954

Change-Id: Ic0d0e860c954570408c39a8f0d9502183c624dd4
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
  • Loading branch information
Thomas Senyk authored and Robert Griebl committed Oct 16, 2012
1 parent 66e81cb commit 9399649
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/compositor/compositor_api/waylandsurfaceitem.cpp
Expand Up @@ -52,7 +52,7 @@
#include <QtGui/QScreen>

#include <QtQuick/QSGSimpleRectNode>
#include <QtQuick/QQuickCanvas>
#include <QtQuick/QQuickWindow>

#include <QtCore/QMutexLocker>
#include <QtCore/QMutex>
Expand Down Expand Up @@ -186,7 +186,7 @@ void WaylandSurfaceItem::ensureProvider()
{
if (!m_provider) {
m_provider = new WaylandSurfaceTextureProvider();
connect(canvas(), SIGNAL(sceneGraphInvalidated()), m_provider, SLOT(invalidate()), Qt::DirectConnection);
connect(window(), SIGNAL(sceneGraphInvalidated()), m_provider, SLOT(invalidate()), Qt::DirectConnection);
}
}

Expand Down Expand Up @@ -353,13 +353,13 @@ void WaylandSurfaceItem::updateTexture()
QSGTexture *oldTexture = texture;
if (m_surface->type() == WaylandSurface::Texture) {
QOpenGLContext *context = QOpenGLContext::currentContext();
QQuickCanvas::CreateTextureOptions opt = 0;
QQuickWindow::CreateTextureOptions opt = 0;
if (useTextureAlpha()) {
opt |= QQuickCanvas::TextureHasAlphaChannel;
opt |= QQuickWindow::TextureHasAlphaChannel;
}
texture = canvas()->createTextureFromId(m_surface->texture(context), m_surface->size(), opt);
texture = window()->createTextureFromId(m_surface->texture(context), m_surface->size(), opt);
} else {
texture = canvas()->createTextureFromImage(m_surface->image());
texture = window()->createTextureFromImage(m_surface->image());
}
texture->bind();
delete oldTexture;
Expand Down

0 comments on commit 9399649

Please sign in to comment.