Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qandroidplatformbackingstore.cpp
Go to the documentation of this file.
1// Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
8#include <qpa/qplatformscreen.h>
9
11
14{
15 if (window->handle())
17}
18
20{
21 return &m_image;
22}
23
25{
27
30
31 (static_cast<QAndroidPlatformWindow *>(window->handle()))->repaint(region);
32}
33
34void QAndroidPlatformBackingStore::resize(const QSize &size, const QRegion &staticContents)
35{
36 Q_UNUSED(staticContents);
37
38 if (m_image.size() != size)
40}
41
43{
45 (static_cast<QAndroidPlatformWindow *>(window->handle()))->setBackingStore(this);
46 m_backingStoreSet = true;
47 } else {
48 qWarning("QAndroidPlatformBackingStore does not support OpenGL-only windows.");
49 }
50}
51
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
void resize(const QSize &size, const QRegion &staticContents) override
void flush(QWindow *window, const QRegion &region, const QPoint &offset) override
Flushes the given region from the specified window.
\inmodule QtGui
Definition qimage.h:37
QSize size() const
Returns the size of the image, i.e.
The QPlatformBackingStore class provides the drawing area for top-level windows.
QWindow * window() const
Returns a pointer to the top-level window associated with this surface.
\inmodule QtCore\reentrant
Definition qpoint.h:23
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\inmodule QtCore
Definition qsize.h:25
@ RasterGLSurface
Definition qsurface.h:33
@ RasterSurface
Definition qsurface.h:31
\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.
#define qWarning
Definition qlogging.h:162
GLuint64 GLenum void * handle
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
QScreen * screen
[1]
Definition main.cpp:29
#define Q_UNUSED(x)
aWidget window() -> setWindowTitle("New Window Title")
[2]