Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qrhibackingstore.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
7
10{
11}
12
14{
15}
16
18{
19 Q_UNUSED(region);
21
22 if (window != this->window())
23 return;
24
25 if (!rhi()) {
27 switch (window->surfaceType()) {
30 break;
33 break;
34 default:
35 Q_UNREACHABLE();
36 }
37 rhiConfig.setEnabled(true);
38 setRhiConfig(rhiConfig);
39 }
40
41 static QPlatformTextureList emptyTextureList;
42 bool translucentBackground = m_image.hasAlphaChannel();
43 rhiFlush(window, window->devicePixelRatio(), region, offset, &emptyTextureList, translucentBackground);
44}
45
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false.
Definition qimage.cpp:4571
void setRhiConfig(const QPlatformBackingStoreRhiConfig &config)
QWindow * window() const
Returns a pointer to the top-level window associated with this surface.
virtual FlushResult rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion &region, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground)
Flushes the given region from the specified window, and compositing it with the specified textures li...
\inmodule QtCore\reentrant
Definition qpoint.h:23
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
QRhiBackingStore(QWindow *window)
void flush(QWindow *window, const QRegion &region, const QPoint &offset) override
Flushes the given region from the specified window.
@ OpenGLSurface
Definition qsurface.h:32
@ MetalSurface
Definition qsurface.h:36
\inmodule QtGui
Definition qwindow.h:63
SurfaceType surfaceType() const override
Returns the surface type of the window.
Definition qwindow.cpp:628
Combined button and popup list for selecting options.
GLenum GLuint GLintptr offset
#define Q_UNUSED(x)
aWidget window() -> setWindowTitle("New Window Title")
[2]