summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoabackingstore.mm
Commit message (Collapse)AuthorAgeFilesLines
* Remove codepaths and checks for unsupported Apple platformsTor Arne Vestbø2018-08-311-5/+0
| | | | | | | We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3. Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-081-5/+5
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoascreen.mm Change-Id: Iac965aea4867059dbf7bc401b71e8e8b5b259afb
| * macOS: Don't blend the backingstore unless the window has a backgroundTor Arne Vestbø2018-08-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | If there's no background, we should copy the backingstore, so that the backingstore is not blended with the result of the previous flush. The unified toolbar case is covered by the window having a textured background. Task-number: QTBUG-69773 Change-Id: I2f4eed9f44a60ebe7495ce68cf5a54d3d2424b0c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Add logging for QPlatformBackingStore::composeAndFlushTor Arne Vestbø2018-08-071-2/+0
| | | | | | | | | | Change-Id: I96778296480d2aaad5e01ed15353106bc90d4d2b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | macOS: Correctly scale CALayer contentsRect for child NSViewsTor Arne Vestbø2018-07-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When flushing parts of a QBackingStore onto child QWindows, and we're in layer-backed mode, we need to set the contentsRect of the layer so that the layer will only show the part of the top-level-owned backingstore image that's relevant for the child window. Since the contentsRect is in unit coordinate system, we need to apply a transform, but this must be based on the top level view's size, not the image size, as the latter will be twice as big on a retina screen, giving the wrong unit rect. Change-Id: I7d6f378ed46a98272efb13406a2878ec1efe734e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | macOS: Invalidate window shadow after flushing backingstore to CALayerTor Arne Vestbø2018-07-191-82/+83
| | | | | | | | | | | | | | | | | | | | The macOS bug preventing us from doing this has now been fixed: http://openradar.appspot.com/radar?id=4976602949615616 Change-Id: I3bfa75d6bf982a051a9b274f530529f4ec4351a0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-051-3/+5
|\| | | | | | | Change-Id: I954bd6418bc862a04691240c0f1766f6ce033640
| * Cocoa: Make QMacNativeWidget paint correctlyMorten Johan Sørvig2018-04-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | QWindows with transparent pixels (of which QMacNativeWidget is an example) must be composited, even if they are content views. This will display the NSWindow background instead of solid black for the areas where the Qt backingstore has transparent pixels. Change-Id: Ibee1327e11bc64975900b4c5d632dd5f103da4c8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | macOS: Remove 'cocoa' infix in QPA logging categoriesTor Arne Vestbø2018-03-141-3/+3
|/ | | | | | | | Makes the naming of QPA logging categories the same across different platforms, which makes it easier to debug an unfamiliar platform. Change-Id: I60ed34892d154e86723c8e4bcff3c28fcab1f7a1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* macOS: Prevent backingstore image detach during color space assignmentv5.10.0-beta1Tor Arne Vestbø2017-10-041-23/+11
| | | | | | | | | | | | | | | | | | | | | | | The call to CGImageCreateCopyWithColorSpace took a naked toCGImage(), which left the resulting CGImageRef without a release, causing the extra ref by toCGImage() to never be derefed, and a subsequent detach of the image data on the next paint event. Wrapping the call in a QCFType<CGImageRef> solves the problem. The code has also been moved directly into QCocoaBackingStore::flush(), as there is no need to keep the CGImageRef a member. A local autorelease pool has been added to QCocoaBackingStore::flush(), so that the NSImage used for blitting the backingstore is released upon exit of the function, thereby releasing the corresponding CGImageRef. Note that for layered mode, the QImage will still detach, as the view's layer.contents property keeps a reference to the image data until being replaced in a subsequent flush. Task-number: QTBUG-63559 Change-Id: I06b9298f65a84deae7cc2eff617ba75c92ec3b87 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Don’t color convert the backing storeMorten Johan Sørvig2017-09-051-1/+9
| | | | | | | | | | | | | | | | | | The backing store was assigned the sRGB color profile as an unintended side effect of the QImage -> CGImage conversion function refactoring in ac899f6d. This caused Core Graphics to add a color convert step, which in some cases caused performance issues. Restore fast, previous behavior by assigning the target display color profile to the backing store image. Color correctness is still a goal, but we’ll add API for it and make it opt-in. Task-number: QTBUG-61384 Change-Id: Ia36d29404c64d8030a100f6a71816d84e484308b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Modernize masking of windowsTor Arne Vestbø2017-09-011-9/+13
| | | | | | | | | | | | | | | | | | | Instead of masking window blitting via a CGImage mask, we use the window's mask directly to intersect the region that we blit during flushing of the QCocoaBackingStore. This approach also enables masking of child windows. We now also support setting a mask for layer-backed views, by setting a CAShapeLayer as the layer's mask. The window shadow invalidation has been moved out of QNSView, as the view should not be involved in that process. For layer-backed views, the shadow is not invalidated as expected after the initial mask has been set, but this bug has been left as a fix for a later stage as it requires more research. Change-Id: Ie0127d8df49d95b2d6144816b19559f3d3c95d13 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Restore support for layered modeTor Arne Vestbø2017-08-211-2/+33
| | | | | | | | | After 871966 we now do drawing as a result of drawRect calls, but layer backed mode was not taken into account. This restores support for both pull and push-mode drawing in layer-backed mode. Change-Id: I35039ee9eb4486206f9f92f8230df104473368c9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Redraw window bottom corners after synchronous backing store flushTor Arne Vestbø2017-08-181-1/+52
| | | | | | | | | | | | | | | | Flushing outside of the display cycle does not care about any ordering between views, including the NSThemeFrame responsible for drawing the rounded corners of the window. Since Qt Widgets is doing a lot of synchronous flushing (for now, until we plumb update() to requestUpdate(), or enable layer-backing), we add a workaround that explicitly draws the corners after flushing, just like the logic in [NSView displayIfNeeded]. This is the same workaround used by WebKit: https://trac.webkit.org/changeset/85376/webkit Change-Id: I884152cdb2685569704e577b64b5ae278ed82c21 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Log target view for backingstore flush without quotesTor Arne Vestbø2017-08-101-1/+1
| | | | | Change-Id: I0d5f9f9172aaa7b9b7575dce6ba59b23567b35ce Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* macOS: Modernize QCocoaBackingStore::flush()Tor Arne Vestbø2017-07-291-6/+139
| | | | | | | | | | | | | Instead of forwarding the flush to the view, using CoreGraphics to blit the backing store to the window, we do everything in flush(), and use higher level AppKit APIs to do the blit. This simplifies the flow and code quite a bit, and also supports blitting of individual regions in a flush instead of the whole bounding rect. Change-Id: I2173c1a7763fe652a94125c7e3ae93a655412cd3 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Fix crash in QCocoaBackingStore::format() after closing windowTor Arne Vestbø2016-10-271-1/+2
| | | | | | | | | | | | | | | | | | | Closing a window results in sending an expose event to obscure the window, which gets delivered after the corresponding QPlatformWindow has been destroyed. If the client application (wrongly) tries to render as a result of this expose event, using the existing QBackingStore, it will potentially result in a resize of the backing store, for example if the global device pixel ratio is different from what the window had when it still had a QPlatformWindow. The resize in turn requires the format() of the window, but since we no longer have a QPlatformWindow we can't base the format on that. Change-Id: Ied6a3a745f20087c2287ad86e1c66808467b6183 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Get rid of m_qtView member in QCocoaWindow that aliased m_viewTor Arne Vestbø2016-10-101-2/+3
| | | | | | | | | | | | | The member was mirroring m_view in all cases except for foreign windows. Instead of a member we now check window()->type() != Qt::ForeignWindow, which is more explicit, especially for people not normally working on the macOS platform. To call methods that are only implemented for our QNSView subclass, a new qnsview_cast() function has been introduced. Change-Id: I0a2cfe1a5e4502250c17e1c3ebdce19e9ee5e572 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* macOS: Implement QCocoaBackingStore in terms of QRasterBackingStoreTor Arne Vestbø2016-09-181-60/+12
| | | | | | | | | The previous detection of device pixel ratio changes in paintDevice() is not needed, as QBackingStore::beginPaint() already does this check and calls resize(). Change-Id: I9ee8410fa3a5404c5ec19d2cba4543a9e3359fe9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QtOpenGL/plugins/platformsupport: use new QRegion::begin()/end() instead of ↵Marc Mutz2016-03-021-6/+4
| | | | | | | | | | rect() Saves e.g. ~900b and ~2900b in text size in QtOpenGL and XcbQpa libs, resp., on optimized GCC 5.3 Linux AMD64 builds. Change-Id: Id904689164ca32df41118a23747c70048d8e6604 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Cocoa: Fix backing store performance regression.Morten Johan Sørvig2015-08-251-0/+2
| | | | | | | | | | | | | | | | | Commit 916dfcb8 introduced a regression where QNSView would hold a copy if the backing store QImage, which would cause a detach and deep copy if/when the image was painted on while the copy was held. Revert back to the previous share-by-pointer scheme. Make sure the following bugs stays fixed: QTBUG-38377 QTBUG-42206 QTBUG-44313 Change-Id: Ib8049051d51947113f23b66ee61dc34c22388914 Task-number: QTBUG-46959 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Clear backingstore for windows with alpha channel.Morten Johan Sørvig2015-03-121-0/+12
| | | | | | | | | Fixes painting artifacts in translucent windows. Change-Id: I89c198e5636c5387e67ad8839d32dffdc0a149cb Task-number: QTBUG-43017 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Remove unused CGImage in qcocoabackingstoreAllan Sandfeld Jensen2015-02-261-15/+0
| | | | | | | | | Since 916dfcb8275bcce6b39606cd0b930239a60dc5df m_cgImage has been unsed in the QCocoaBackingStore and can be removed. Change-Id: Ib289b1a3b848e05dda2dfc76ca5d857770883a0b Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* OS X - Cocoa backing store and drawRectTimur Pocheptsov2014-10-281-13/+0
| | | | | | | | | | | | | | | m_backingStore pointer has a limited 'lifetime' - usually it is set in -flushBackingStore:region:offset: method, then -drawRect: is invoked/forced by -setNeedsDisplayInRect:, after that it's dangerous to have a non-null pointer to a backing store (and we reset it). But if Cocoa invokes drawRect (due to some reason) our null backing store pointer is also not good. This patch instead is using a shared resource (QImage) from a backing store. This patch also makes getBackingStoreCGImage() redundant - -drawRect: was the only place we called it. Task-number: QTBUG-42206 Change-Id: Ie7726336f05d07c52f660f6326ae5cef114201dd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* OS X: Fix build with QT_NO_OPENGLSergio Martins2014-06-301-0/+2
| | | | | | Task-number: QTBUG-31151 Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Enable QQuickWidget on Mac OS X.Morten Johan Sørvig2014-03-201-0/+5
| | | | | Change-Id: I0635bf0bfcd49c20987a81c6f8895fc3343fbd20 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Repaint widgets on screen change.Morten Johan Sørvig2014-03-141-14/+9
| | | | | | | | | | | | | | | | | Add a screenChanged handler slot to QWidgetWindow, which calls markDirty() on the backing store with the BufferInvalid and UpdateNow flags set. Update CocoaBackingStore to create a new buffer on window devicePixelRatio change. Use the QCocoaWindow::devicePixelRatio() implementation instead of a duplicate implementation in the backing store. The plan is to replace this implementation with one based on QUpdateWindowRequestEvent for Qt 5.4 Change-Id: I8e521c53df4ac90815613e730fe821996334721f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Cocoa: QImage -> CGImage conversion cleanupMorten Johan Sørvig2014-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Move to one qt_mac_toCGImage function that has simple semantics and properly retains a copy of the QImage for the lifetime of the CGImage. Remove the old qt_mac_toCGImage function which had two problems: 1) It would not retain the QImage data (this was probably ok for its original use case: creating short-lived CGImages for the paint engine) 2) It had acquired a somewhat odd **datacopy out parameter for the cases where you _do_ want to retain the image data. This makes the exported image conversion function from QtMacExtras work: The CGImages it creates will no longer reference free'd memory once the QImage is deleted. Change-Id: I583040d16aefb17fc3d801d6b047a0b2a76c7f74 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Add setContentBorderThickness().Morten Johan Sørvig2014-01-111-1/+2
| | | | | | | | | | | | | | | | | | Add setContentBorderThickness() to the Cocoa platform plugin. This functions requests that the platform plugin draws a gradient in the unified title and toolbar area and/or the status bar area. The background gradient is drawn before and under the Qt backing store content. It is expected that parts of the backing store will be filled with transparent pixels to allow the gradient to be visible. To facilitate this the backing store image is created with an alpha channel. Task-number: QTBUG-34411 Change-Id: Iadc5e64ee9b9b42e92fb84a615817fdffd7a8802 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QCocoaBackingStore: Initialize non-opaque images with transparent colorGabriel de Dietrich2013-09-261-0/+2
| | | | | | | | In particular, this is needed when a QWidget has WA_TranslucentBackground set and nobody is painting anything behind it (except maybe some native view). Change-Id: Ib1f0714f85fa7eeced527617ecd09bb2ed6ddfc9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-051-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * Set correct image format for non-alpha windows.Morten Johan Sørvig2013-02-251-1/+3
| | | | | | | | | | | | | | | | Use QImage::Format_RGB32. Change-Id: I4be6b6271034be8dad5cfcb85f89fe33a817b78f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * QCococaWindow: Add NSView hosting support.Morten Johan Sørvig2013-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add and export QCCoocaView::setContentView(NSView *), making it possible to host a foreign NSView in a QWindow. Change QCoocaWindow::m_contentView to be a generic NSView, instead of a QNSView. Add a separate m_qtView for code paths that expect a QNSView. Change-Id: I47935b69705c70ea7efbb03d6d4bf489947c3487 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Cocoa: Remove qt_mac_toCGImage warningsGabriel de Dietrich2013-02-271-2/+4
|/ | | | | | | | We got these because we were flushing the backing store with a null QImage. Change-Id: I372cb3fc7c82d3bdcfe735fcadfa72806d0ef39b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: prevent scale factor value of 0.Morten Johan Sørvig2013-01-301-1/+1
| | | | | | | | Check that the NSWindow pointer is valid before calling backingScaleFactor. Change-Id: Ia23cbb4058b7d0fece008bc437f8bfec6c0ddebe Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Basic high-dpi "retina" support for Qt 5.Morten Johan Sørvig2012-12-011-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 5 on par with Qt 4, prepare for more comprehensive support later on. Introduce device independent pixels (dips), device pixels, and devicePixelRatio. Add high-dpi support to QPainter, QGLWidget, the cocoa platform plugin, mac and fusion styles. Dips are similar to CSS pixels, Apple points and Android density-independent pixels. Device pixels are pixels in the backing store/physical pixels on screen. devicePixelRatio is the ratio between them, which is 1.0 on standard displays and 2.0 on "retina" displays. New API: QImage::devicePixelRatio() and setDevicePixelRatio() QPixmap::devicePixelRatio() and setDevicePixelRatio() QWindow::devicePixelRatio() QScreen::devicePixelRatio() QGuiApplicaiton::devicePixelRatio() Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Cocoa: QGLWidget draws wrong within QMainWindow on Mac OSRichard Moe Gustavsen2012-11-231-27/+35
| | | | | | | | | | | | | | | | | | | | | | | | The resons for this bug is that Qt can share the same backingstore between several windows (if they exist in the same hierarchy), but this was just not supported by the Cocoa plugin. This patch will make sure that we pay attention to which window the QCocoaBackingStore is told to flush, and forward this information to the QNSView that backs it up. Inside the views drawRect function we then take some extra steps to get the correct sub-part of the possibly shared backingstore image. This patch also does some effort to ensure that we recreate the backingstore image as little as possible, as we can often get several resizes to the backingstore before we actually draw anything. Moreover, by being a bit careful on how we tell UiKit to update the view upon a flush, we can minimize the number of drawRect calls (and then CGImageRef creations) we need to do. This patch actually ends up improving resize/repaint performance a lot as well. QT-BUG: 27390 Change-Id: I2c2a26b149fa855411b6bff8b9cc9a61694ae72f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Use setImage workaround on all OS X versions.Morten Johan Sørvig2012-11-201-6/+3
| | | | | | | | | | The painting bug that we are working around/fixing here has been observed on 10.7 as well. Change-Id: Ic29421bcc84405afa085af2f0ed2bc554c684f98 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: fix backingstore flush for 10.8Teemu Katajisto2012-11-071-9/+6
| | | | | | | | | | Remove compile time version check to make flushing work correctly when building with other sdks than 10.8. Task-number: QTBUG-27862 Change-Id: I915ae80017be1c03d5217aa9bdb60991603f8d01 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Cocoa: Fix QCocoaBackingStore::flush on 10.8Morten Sorvig2012-06-061-1/+11
| | | | | | | | | | | | | | | | The call to displayRect works on 10.7 but does not update the pixels on screen on 10.8. Many Qt windows do not update properly. This is a workaround found by trail and error without fully understanding the underlying issue. I would like to have this in place until we can determine the cause of the bug. Change-Id: I1ecee745f42a93ded4f651cc8ad51963f250e78d Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix crash in QCocoaBackingStore.Morten Johan Sorvig2012-04-201-3/+7
| | | | | | | | | | QWindow->handle() may be null during construction, and also during calls to resize(). Get and check the pointer at each call instead of caching it in the constructor. Change-Id: Icd950b55e16fdd2077e3b7fe3c3393d8b89b5903 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Cocoa: silence warnings from QCocoaBackingStoreBradley T. Hughes2012-03-261-16/+1
| | | | | | | | Remove unused (and misspelled) flipedRect() function, as well as several unused variables. Change-Id: I48a5bf2eaad67686f60523a5c22262cad5314128 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: reimplement QPlatformBackingStore::scroll()Bradley T. Hughes2012-03-261-0/+12
| | | | | | | | Use qt_scrollImageInRect() from QtGui to accelerate scrolling in the Cocoa plugin. Change-Id: I8ad1377ed3307345f72d17c72049cec5472c97d3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>