diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-05-22 10:15:34 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-05-22 09:23:15 +0000 |
commit | 5336e061ece349f5622548f2cbbd7f7d88574d33 (patch) | |
tree | bed0821174e4880ee88b9cb8c7a939933d13e42f /src/gui/vulkan | |
parent | 85554be25fb0db4b26f8969c26d17e2a012b3780 (diff) |
QVulkanWindow: return QMatrix4x4 by value
The function never returns nullptr, so return the matrix by value.
Change-Id: I7c1eeb43b9693866049763565b575348ddd35548
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/vulkan')
-rw-r--r-- | src/gui/vulkan/qvulkanwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkanwindow.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/vulkan/qvulkanwindow.cpp b/src/gui/vulkan/qvulkanwindow.cpp index a9f5bb41df..bc82f5df08 100644 --- a/src/gui/vulkan/qvulkanwindow.cpp +++ b/src/gui/vulkan/qvulkanwindow.cpp @@ -2690,7 +2690,7 @@ QImage QVulkanWindow::grab() } /*! - Returns a pointer to a QMatrix4x4 that can be used to correct for coordinate + Returns a QMatrix4x4 that can be used to correct for coordinate system differences between OpenGL and Vulkan. By pre-multiplying the projection matrix with this matrix, applications can @@ -2704,7 +2704,7 @@ QImage QVulkanWindow::grab() front face being CCW), the correct winding order in the rasterization state after applying this matrix is clockwise (\c{VK_FRONT_FACE_CLOCKWISE}). */ -const QMatrix4x4 *QVulkanWindow::clipCorrectionMatrix() +QMatrix4x4 QVulkanWindow::clipCorrectionMatrix() { Q_D(QVulkanWindow); if (d->m_clipCorrect.isIdentity()) { @@ -2714,7 +2714,7 @@ const QMatrix4x4 *QVulkanWindow::clipCorrectionMatrix() 0.0f, 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f, 1.0f); } - return &d->m_clipCorrect; + return d->m_clipCorrect; } QT_END_NAMESPACE diff --git a/src/gui/vulkan/qvulkanwindow.h b/src/gui/vulkan/qvulkanwindow.h index bbeba15603..65249ecbfc 100644 --- a/src/gui/vulkan/qvulkanwindow.h +++ b/src/gui/vulkan/qvulkanwindow.h @@ -138,7 +138,7 @@ public: bool supportsGrab() const; QImage grab(); - const QMatrix4x4 *clipCorrectionMatrix(); + QMatrix4x4 clipCorrectionMatrix(); Q_SIGNALS: void frameGrabbed(const QImage &image); |