From 44ad7a7f2bbec33e358d1fcfc444d762e59ffe7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 9 Aug 2011 14:45:13 +0200 Subject: Removed QPaintDevice dependency in blitFramebuffer(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7294be5c4447d7e24dda95b822a9ce7b2abbccc4 Reviewed-on: http://codereview.qt.nokia.com/2783 Reviewed-by: Qt Sanity Bot Reviewed-by: Jørgen Lind --- src/opengl/qglframebufferobject.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/opengl/qglframebufferobject.cpp') diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 682c26255d..8068410dc1 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -1370,10 +1370,12 @@ void QGLFramebufferObject::blitFramebuffer(QGLFramebufferObject *target, const Q return; const QGLContext *ctx = QGLContext::currentContext(); - if (!ctx) + if (!ctx || !ctx->contextHandle()) return; - const int height = ctx->device()->height(); + QSurface *surface = ctx->contextHandle()->surface(); + + const int height = static_cast(surface)->height(); const int sh = source ? source->height() : height; const int th = target ? target->height() : height; -- cgit v1.2.3