summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioscontext.mm
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-11-20 12:18:23 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-20 12:18:23 +0100
commitc83c08d84fe00a4033d7ba61fd95c150f643736d (patch)
tree088927e1b2e9d67300253c29ba73be6be6d8ae31 /src/plugins/platforms/ios/qioscontext.mm
parent1e446fc99167a992b1a8342168b6254f43b097fe (diff)
parent72ea7900858a31c1c6b93e6fed9f2f4dc30291e4 (diff)
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Diffstat (limited to 'src/plugins/platforms/ios/qioscontext.mm')
-rw-r--r--src/plugins/platforms/ios/qioscontext.mm9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm
index d7b9314ae0..7310d2904f 100644
--- a/src/plugins/platforms/ios/qioscontext.mm
+++ b/src/plugins/platforms/ios/qioscontext.mm
@@ -113,7 +113,7 @@ void QIOSContext::swapBuffers(QPlatformSurface *surface)
{
Q_ASSERT(surface && surface->surface()->surfaceType() == QSurface::OpenGLSurface);
Q_ASSERT(surface->surface()->surfaceClass() == QSurface::Window);
- QWindow *window = static_cast<QWindow *>(surface->surface());
+ QIOSWindow *window = static_cast<QIOSWindow *>(surface);
Q_ASSERT(m_framebufferObjects.contains(window));
[EAGLContext setCurrentContext:m_eaglContext];
@@ -124,7 +124,7 @@ void QIOSContext::swapBuffers(QPlatformSurface *surface)
GLuint QIOSContext::defaultFramebufferObject(QPlatformSurface *surface) const
{
Q_ASSERT(surface && surface->surface()->surfaceClass() == QSurface::Window);
- QWindow *window = static_cast<QWindow *>(surface->surface());
+ QIOSWindow *window = static_cast<QIOSWindow *>(surface);
FramebufferObject &framebufferObject = m_framebufferObjects[window];
@@ -155,8 +155,7 @@ GLuint QIOSContext::defaultFramebufferObject(QPlatformSurface *surface) const
}
// Ensure that the FBO's buffers match the size of the layer
- QIOSWindow *platformWindow = static_cast<QIOSWindow *>(surface);
- UIView *view = reinterpret_cast<UIView *>(platformWindow->winId());
+ UIView *view = reinterpret_cast<UIView *>(window->winId());
CAEAGLLayer *layer = static_cast<CAEAGLLayer *>(view.layer);
if (framebufferObject.renderbufferWidth != (layer.frame.size.width * layer.contentsScale) ||
framebufferObject.renderbufferHeight != (layer.frame.size.height * layer.contentsScale)) {
@@ -191,7 +190,7 @@ GLuint QIOSContext::defaultFramebufferObject(QPlatformSurface *surface) const
void QIOSContext::windowDestroyed(QObject *object)
{
- QWindow *window = static_cast<QWindow *>(object);
+ QIOSWindow *window = static_cast<QIOSWindow *>(object);
if (m_framebufferObjects.contains(window)) {
EAGLContext *originalContext = [EAGLContext currentContext];
[EAGLContext setCurrentContext:m_eaglContext];