diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-08-27 16:23:28 +0300 |
---|---|---|
committer | Andrew Knight <andrew.knight@digia.com> | 2014-09-01 18:08:43 +0200 |
commit | 1cdcf64ad5c0f42d23ad1a53c965df5c69a6bb4b (patch) | |
tree | 1aba794e7125cea85e14376b1c078221fe283204 /src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp | |
parent | fc3acdd9d2766637e0410f7de83b63116df7e053 (diff) |
direct2d: Fix translucent/frameless window rendering
When using WA_TranslucentBackground/FramelessWindowHint, the backing
store must paint to an offscreen texture instead of the swap chain in
order to achieve the desired results. This texture is then presented to
the screen using UpdateLayeredWindowIndirect().
As the swap chain is not needed in this mode, its construction is skipped
if indirect rendering is active.
Furthermore, the layering options were updated to fix an issue with
transparent layers overpainting the background. The layer options were
switched to D2D1_LAYER_OPTIONS1_NONE, which appears to work for both
translucent and non-translucent rendering modes.
Task-number: QTBUG-40601
Change-Id: I656f7cdfb424d1eda6f82c2c69500e78d8c1726a
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp')
-rw-r--r-- | src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp index f131419140..a4e75f6571 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp @@ -343,7 +343,7 @@ public: D2D1::IdentityMatrix(), 1.0, NULL, - D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND), + D2D1_LAYER_OPTIONS1_NONE), NULL); pushedClips.push(LayerClip); } @@ -953,7 +953,7 @@ bool QWindowsDirect2DPaintEngine::begin(QPaintDevice * pdev) D2D1::IdentityMatrix(), 1.0, NULL, - D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND), + D2D1_LAYER_OPTIONS1_NONE), NULL); } else { QRect clip(0, 0, pdev->width(), pdev->height()); |