summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.h
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@digia.com>2014-01-17 12:01:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-27 09:09:13 +0100
commitbd9e1f3915ec45342f1cd9a70be3ee4dca4b322e (patch)
tree7186057fa5305cc1ec103e935d1a4a4054b444dc /src/plugins/platforms/windows/qwindowswindow.h
parent7d782d4cf9c958d31213ef186ac4013b955c8537 (diff)
Improve direct2d backing store implementation
Add a per-window swap chain to a QPlatformWindow subclass instead of tying it to the backing store. This is needed to support native widgets (as opposed to alien widgets). Change the backing store to draw to an intermediate pixmap and flush to the requested window by using the per-window swap chain. This also opens the door for faster window presentation later on by using the swap chain more intelligently. Also add a changelog entry for the direct2d plugin, which was omitted earlier. [ChangeLog][QtGui][Windows] Introduce experimental direct2d platform plugin for Windows. This plugin shares most code with the current windows plugin, but substitutes a direct2d-based paint engine for window backing stores and pixmaps. Change-Id: I5f54e7e4c1fb15b1639bd26b712fb40ac141e4ac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.h')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 61dc3e2dc2..3a9516e0e5 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -111,6 +111,22 @@ struct QWindowCreationContext
int frameHeight;
};
+struct QWindowsWindowData
+{
+ QWindowsWindowData() : hwnd(0), embedded(false) {}
+
+ Qt::WindowFlags flags;
+ QRect geometry;
+ QMargins frame; // Do not use directly for windows, see FrameDirty.
+ QMargins customMargins; // User-defined, additional frame for NCCALCSIZE
+ HWND hwnd;
+ bool embedded;
+
+ static QWindowsWindowData create(const QWindow *w,
+ const QWindowsWindowData &parameters,
+ const QString &title);
+};
+
class QWindowsWindow : public QPlatformWindow
{
public:
@@ -140,23 +156,7 @@ public:
WithinMaximize = 0x40000
};
- struct WindowData
- {
- WindowData() : hwnd(0) {}
-
- Qt::WindowFlags flags;
- QRect geometry;
- QMargins frame; // Do not use directly for windows, see FrameDirty.
- QMargins customMargins; // User-defined, additional frame for NCCALCSIZE
- HWND hwnd;
- bool embedded;
-
- static WindowData create(const QWindow *w,
- const WindowData &parameters,
- const QString &title);
- };
-
- QWindowsWindow(QWindow *window, const WindowData &data);
+ QWindowsWindow(QWindow *window, const QWindowsWindowData &data);
~QWindowsWindow();
virtual QSurfaceFormat format() const { return m_format; }
@@ -274,7 +274,7 @@ private:
inline void setGeometry_sys(const QRect &rect) const;
inline QRect frameGeometry_sys() const;
inline QRect geometry_sys() const;
- inline WindowData setWindowFlags_sys(Qt::WindowFlags wt, unsigned flags = 0) const;
+ inline QWindowsWindowData setWindowFlags_sys(Qt::WindowFlags wt, unsigned flags = 0) const;
inline bool isFullScreen_sys() const;
inline void setWindowState_sys(Qt::WindowState newState);
inline void setParent_sys(const QPlatformWindow *parent) const;
@@ -287,7 +287,7 @@ private:
inline void destroyIcon();
void fireExpose(const QRegion &region, bool force=false);
- mutable WindowData m_data;
+ mutable QWindowsWindowData m_data;
mutable unsigned m_flags;
HDC m_hdc;
Qt::WindowState m_windowState;