qt5base-lts/src
Laszlo Agocs a5db072dc2 rhi: Add explicit subclass for RTs from swapchains
We want to enable gaining access to the underlying resource(s) by
inspecting a QRhiRenderTarget. This is not currently possible for
swapchains since there is nothing that references the actual
QRhiSwapChain. To clean this up, make an explicit, new
QRhiSwapChainRenderTarget subclass. Thus the logic already used in a
couple of places to examine the resources attached to a
QRhiTextureRenderTarget can now work with swapchain render targets too,
by branching based on the resourceType().

This eliminates the somewhat odd setup where a "RenderTarget" resource
is QRhiRenderTarget corresponding (but not exposing!) a swapchain,
whereas a "TextureRenderTarget" is a QRhiTextureRenderTarget which
is a subclass of QRhiRenderTarget. Now we correctly have an (abstract)
base and two subclasses, one for each type of render targets.

Besides, it allows us to clean up the oddly named
Q...ReferenceRenderTarget classes in the backends, which initially tried
to indicate that this "render target" merely references (or, in
practice, is) a swapchain. We can now have a nice and symmetrical
Q...SwapChainRenderTarget and Q...TextureRenderTarget naming scheme.

Change-Id: Ib07e9be99a316eec67b94de0860e08f5f4638959
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-04-05 19:40:17 +02:00
..
3rdparty Update bundled zlib to version 1.2.12 2022-03-31 08:43:56 +02:00
android Android: fix fullscreen handling 2022-03-29 13:56:14 +01:00
concurrent Do not highlight the Image Scaling Example anymore in Qt Creator 2022-02-17 18:16:42 +01:00
corelib QMetaType: Add qHash() overload 2022-04-05 17:24:28 +00:00
dbus QtDBus: optimize handling of isDebugging 2022-04-03 16:18:43 +02:00
entrypoint QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
gui rhi: Add explicit subclass for RTs from swapchains 2022-04-05 19:40:17 +02:00
network QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [1/2]: public API 2022-04-05 16:27:16 +02:00
opengl Misc: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
openglwidgets Compose render-to-texture widgets through QRhi 2022-03-11 21:25:00 +01:00
platformsupport Misc: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
plugins Reorganize work with graphical libraries on INTEGRITY 2022-04-05 17:27:15 +03:00
printsupport Windows: Fix potential crash when retrieving default printer 2022-03-29 13:56:14 +01:00
sql Sql: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
testlib Tidy up QTapTestLogger::addIncident()'s regex parsing 2022-03-29 22:21:58 +02:00
tools Android: Throw an error if project uses versioned shared library 2022-03-30 22:55:59 +02:00
widgets QSplitter: Don't move handle in non-pressed state 2022-04-05 17:03:40 +03:00
xml QDom: preserve empty CDATA sections 2022-03-26 12:01:14 +01:00
CMakeLists.txt Make it possible to disable the PrintSupport module 2021-02-09 09:17:21 +01:00