Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qplatformsharedgraphicscache.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QPLATFORMSHAREDGRAPHICSCACHE_H
6
#
define
QPLATFORMSHAREDGRAPHICSCACHE_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is part of the QPA API and is not meant to be used
13
// in applications. Usage of this API may make your code
14
// source and binary incompatible with future versions of Qt.
15
//
16
17
#
include
<
QtGui
/
qtguiglobal
.
h
>
18
#
include
<
QtCore
/
qobject
.
h
>
19
#
include
<
QtGui
/
qimage
.
h
>
20
21
QT_BEGIN_NAMESPACE
22
23
class
Q_GUI_EXPORT
QPlatformSharedGraphicsCache
:
public
QObject
24
{
25
Q_OBJECT
26
public
:
27
enum
PixelFormat
28
{
29
Alpha8
30
};
31
32
enum
BufferType
33
{
34
OpenGLTexture
35
};
36
37
explicit
QPlatformSharedGraphicsCache(QObject *parent =
nullptr
) : QObject(parent) {}
38
39
virtual
void
beginRequestBatch() = 0;
40
virtual
void
ensureCacheInitialized(
const
QByteArray &cacheId, BufferType bufferType,
41
PixelFormat pixelFormat) = 0;
42
virtual
void
requestItems(
const
QByteArray &cacheId,
const
QList<quint32> &itemIds) = 0;
43
virtual
void
insertItems(
const
QByteArray &cacheId,
const
QList<quint32> &itemIds,
44
const
QList<QImage> &items) = 0;
45
virtual
void
releaseItems(
const
QByteArray &cacheId,
const
QList<quint32> &itemIds) = 0;
46
virtual
void
endRequestBatch() = 0;
47
48
virtual
bool
requestBatchStarted()
const
= 0;
49
50
virtual
uint textureIdForBuffer(
void
*bufferId) = 0;
51
virtual
void
referenceBuffer(
void
*bufferId) = 0;
52
virtual
bool
dereferenceBuffer(
void
*bufferId) = 0;
53
virtual
QSize sizeOfBuffer(
void
*bufferId) = 0;
54
virtual
void
*eglImageForBuffer(
void
*bufferId) = 0;
55
56
Q_SIGNALS:
57
void
itemsMissing(
const
QByteArray &cacheId,
const
QList<quint32> &itemIds);
58
void
itemsAvailable(
const
QByteArray &cacheId,
void
*bufferId,
const
QList<quint32> &itemIds,
59
const
QList<QPoint> &positionsInBuffer);
60
void
itemsInvalidated(
const
QByteArray &cacheId,
const
QList<quint32> &itemIds);
61
void
itemsUpdated(
const
QByteArray &cacheId,
void
*bufferId,
const
QList<quint32> &itemIds,
62
const
QList<QPoint> &positionsInBuffer);
63
};
64
65
QT_END_NAMESPACE
66
67
#
endif
// QPLATFORMSHAREDGRAPHICSCACHE_H
QPlatformSharedGraphicsCache
The QPlatformSharedGraphicsCache is an abstraction of a cross-process graphics cache.
Definition
qplatformsharedgraphicscache.h:24
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
gui
kernel
qplatformsharedgraphicscache.h
Generated on
for Qt by
1.18.0