aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrendertarget.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2023-04-27 14:32:59 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2023-05-22 12:08:08 +0200
commitace43e1db17d1bfbf549a5c4c6ef49c3ccaf10fc (patch)
treea9d1c2c7decb224287b30c8d89ce1ae47695405e /src/quick/items/qquickrendertarget.cpp
parentab20d77522847f838d61f2267b29738f00a0bb63 (diff)
Adapt to the RHI API concept
Besides following the header naming changes, make the obvious API changes that are based on data that is already there but was hidden previously due to not wanting anything QRhi to shine through in the public API. This kind of hiding is no longer needed, even if qrhi.h and similar still cannot be included from a public header. Forward declarations are now perfectly fine however. Task-number: QTBUG-113331 Change-Id: I9a114082cf9218edc487df50956f5793d6b8bdb4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quick/items/qquickrendertarget.cpp')
-rw-r--r--src/quick/items/qquickrendertarget.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/quick/items/qquickrendertarget.cpp b/src/quick/items/qquickrendertarget.cpp
index 6c1d89b64a..16acf2dcb8 100644
--- a/src/quick/items/qquickrendertarget.cpp
+++ b/src/quick/items/qquickrendertarget.cpp
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qquickrendertarget_p.h"
-#include <QtGui/private/qrhi_p.h>
+#include <rhi/qrhi.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qquickwindow_p.h>
#include <QtQuick/private/qsgrhisupport_p.h>
@@ -592,7 +592,7 @@ QQuickRenderTarget QQuickRenderTarget::fromVulkanImage(VkImage image, VkImageLay
/*!
\overload
- \return a new QQuickRenderTarget referencing n Vulkan image object specified
+ \return a new QQuickRenderTarget referencing a Vulkan image object specified
by \a image. The image is assumed to have a format of
VK_FORMAT_R8G8B8A8_UNORM.
@@ -621,8 +621,21 @@ QQuickRenderTarget QQuickRenderTarget::fromVulkanImage(VkImage image, VkImageLay
#endif
/*!
- \internal
- */
+ \return a new QQuickRenderTarget referencing an existing \a renderTarget.
+
+ \a renderTarget will in most cases be a QRhiTextureRenderTarget, which
+ allows directing the Qt Quick scene's rendering into a QRhiTexture.
+
+ \note the resulting QQuickRenderTarget does not own \a renderTarget and any
+ underlying native resources, it merely contains references and the
+ associated metadata of the size and sample count. It is the caller's
+ responsibility to ensure that the referenced resources exists as long as
+ necessary.
+
+ \since 6.6
+
+ \sa QQuickWindow::setRenderTarget(), QQuickRenderControl
+*/
QQuickRenderTarget QQuickRenderTarget::fromRhiRenderTarget(QRhiRenderTarget *renderTarget)
{
QQuickRenderTarget rt;