summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-08-09 14:45:13 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-08-09 16:10:28 +0200
commit44ad7a7f2bbec33e358d1fcfc444d762e59ffe7e (patch)
tree27c3875afa26dc3f6ec95d3876bf6116758aaa97 /src/opengl/qglframebufferobject.cpp
parentf66065f28140c998a4c7ad2e9a1f8063f7361bd6 (diff)
Removed QPaintDevice dependency in blitFramebuffer().
Change-Id: I7294be5c4447d7e24dda95b822a9ce7b2abbccc4 Reviewed-on: http://codereview.qt.nokia.com/2783 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r--src/opengl/qglframebufferobject.cpp6
1 files changed, 4 insertions, 2 deletions
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<QWindow *>(surface)->height();
const int sh = source ? source->height() : height;
const int th = target ? target->height() : height;