diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2013-10-27 16:46:41 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-14 16:01:30 (GMT) |
commit | 9afc8096fb5395216cd5813fb1859ff45b087d92 (patch) | |
tree | c5b423a460304d915dd31b32cdea534a70b2de0a /src/gui/kernel/qcocoawindowdelegate_mac.mm | |
parent | a18d932b09137bb0f20e254dec5bb2313863d3e4 (diff) | |
download | Qt-9afc8096fb5395216cd5813fb1859ff45b087d92.zip Qt-9afc8096fb5395216cd5813fb1859ff45b087d92.tar.gz Qt-9afc8096fb5395216cd5813fb1859ff45b087d92.tar.bz2 |
Optimize macDisplayColorSpace
On 10.9, getting the display based on the rect is slow(er).
Use a window -> color space cache instead of a
display -> color space cache.
Change-Id: If40a6d089019a54ceb724b8007adaffea89c96fb
Task-number: QTBUG-34358
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/gui/kernel/qcocoawindowdelegate_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoawindowdelegate_mac.mm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm index 355f9bf..f81e788 100644 --- a/src/gui/kernel/qcocoawindowdelegate_mac.mm +++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm @@ -51,6 +51,7 @@ #include <QMainWindow> #include <QToolBar> #include <private/qmainwindowlayout_p.h> +#include <private/qpaintengine_mac_p.h> QT_BEGIN_NAMESPACE extern QWidgetData *qt_qwidget_data(QWidget *); // qwidget.cpp @@ -392,6 +393,12 @@ static void cleanupCocoaWindowDelegate() m_drawerHash->remove(drawer); } +- (void)windowDidChangeScreen:(NSNotification*)notification +{ + QWidget *qwidget = m_windowHash->value([notification object]); + QCoreGraphicsPaintEngine::clearColorSpace(qwidget); +} + - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu { Q_UNUSED(menu); |