summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosbackingstore.mm
Commit message (Collapse)AuthorAgeFilesLines
* remove unnecessary beginPaint and endPaint overridesShawn Rutledge2013-09-161-6/+0
| | | | | | | | | | | | | QPlatformBackingStore::endPaint does not take a QRegion parameter. 6ce6b8a378b0d97ba950240ffb048a4b7e485235 set the API, but the platform implementations were not all synced up since then. There was anyway no point in overriding beginPaint and endPaint on platforms which don't need to do anything there. This fixes clang warnings of the form QXcbBackingStore::endPaint hides overloaded virtual function Change-Id: Id6cd0fc2c831a34576ac2c73eeb0d5741d26e622 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* iOS: Don't resize backing store twice in beginPaint()Tor Arne Vestbø2013-04-291-1/+0
| | | | | | | The first call to resize() was a left-over from before we had retina-support. Change-Id: I637e8d40f443f81fe7cfc367650bb28b917da2bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: QIOSBackingStore: enable FBO depth and stencil bufferRichard Moe Gustavsen2013-04-191-1/+5
| | | | | | | | | | | | | | Unless we enable those buffers for the FBO that backs the backingstore, setting a clip region on an associated QPainter will not work. One apparent bug from this was the menubar. Without this patch it appeared to never be drawn. The reason was that we ended up drawing the menubar background over the whole menubar instead of inside the clip region. Change-Id: I25660cec6ce9e43fe4cd693127dca6afeb8dcf65 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* iOS: Skip flushing child windows in QIOSBackingStoreRichard Moe Gustavsen2013-02-271-0/+7
| | | | | | | | | | | | We skip flushing raster-based child windows, to avoid the extra cost of copying from the parent FBO into the child FBO. Since the child is already drawn inside the parent FBO, it will become visible when flushing the parent. The only case we end up not supporting is if the child window overlaps a sibling window that's draws using a separate QOpenGLContext. Change-Id: Ib10414f4494747e5fe67f84b06575fe16ffddf96 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Retina display support.Morten Johan Sorvig2013-02-271-2/+8
| | | | | | | | Scale the OpenGL paint device size and physical dpi by the device pixel ratio. Change-Id: I8b576f23129aafc47371795151c548663e94ad52 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Keep QIOSBackingStore's paint device size in sync with the windowTor Arne Vestbø2013-02-271-5/+11
| | | | | | | | | | | | | Treating the paint-device as a thing wrapper around the OpenGL paint engine failed when the window was resized, as the paint engine would clip the drawing to the old size. We need to update the size in beginPaint. QBackingStore resize still behaves like before, and we emit a warning if the user tries to resize the backing-store to some other size than the window size, as that's not a supported use-case for our iOS backing store. Change-Id: I1a0eeb65fa9db8b5538dc69963d6fc84be6e63f1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Create QIOSBackingStore paint device lazily in paintDevice()Tor Arne Vestbø2013-02-271-2/+3
| | | | | | | Instead of constructor. Change-Id: I98cddd3f39add3e6f787c858b4d629325cc0f852 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't recreate paint device on beginPaint()Morten Johan Sørvig2013-02-271-3/+3
| | | | | | | | | This causes painting errors. Use one lazily-created device that is used for the lifetime of the backing store. Change-Id: Ib36b6f1d6c9f958304dc8403cf17e5d71136469a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Implement QIOSBackingStore in terms of a QOpenGLPaintDeviceTor Arne Vestbø2013-02-271-91/+56
| | | | | | | | | | | | | | | | We build on top of the QPlatformOpenGLContext implementation to get automatic support for QBackingStore-based painting. Since the OpenGL renderer does not clear the backingstore between frames, we actually also get support for partial updates, and we get the benefit of an accelerated paint engine for Qt Quick 1 without setting a GLWidget as the viewport, which would cause issues such as an extra QWindow. This patch also removes the dependency to QtOpenGL and QtWidgets, which were leftovers from the Qt4 platform plugin. In Qt5 the needed GL bits are in QtGui. Change-Id: Id9b736bfb2e4aec56c0fa9f5b7b4d8bff8e3d1dc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Implement QPlatformOpenGLContextTor Arne Vestbø2013-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The iOS platform GL context is an EAGLContext, which is wrapped by the new class QIOSContext. The class takes care of makeCurrent() and swapBuffers(), but defers framebuffer management to the corresponding QIOSWindow. At the moment only a single framebuffer is created, and changing the geometry of the QWindow does not trigger any sort of invalidation of the buffers. The implementation assumes OpenGL ES2.x support. Though strictly speaking we could support ES1 for QtGui, it serves little purpose as Qt Quick 2 requires ES2. This patch also disabled touch event synthesization until we have figured out where we will maintain the connection to UIWindow. QPlatformOpenGLContext::getProcAddress() for getting extensions is implemented by using dlsym() to look up the symbol. This should not present any issues for App Store deployment, like dlopen() would. Change-Id: I166f800f3ecc0d180133c590465371ac1642b0ec Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Change member variable style to be consistent with Qt's de facto standardTor Arne Vestbø2013-02-271-6/+6
| | | | | Change-Id: Idd65ad9cbb77114466c5b69a799b98a7fee5068f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: copy brute-force port of Qt4 uikit plugin into Qt5.Richard Moe Gustavsen2013-02-261-0/+139
The plugin has been renamed from uikit to ios. Other than that, the plugin will now build, but do nothing. Most of the Qt4 code is preserved, with a rough translation into the Qt5 qpa API. A lot of code has simply been commented out so far, and most lacking at the moment is the event dispatcher which will need to be rewritten, and the opengl paint device implementation. But it should suffice as a starting ground. Also: The plugin will currently not automatically build when building Qt, this needs to be enabled from configure first. Change-Id: I0d229a453a8477618e06554655bffc5505203b44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>