Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgareaallocator_p.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
4#ifndef QSGAREAALLOCATOR_P_H
5#define QSGAREAALLOCATOR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qtquickglobal_p.h>
19#include <QtCore/qsize.h>
20
22
23class QRect;
24class QPoint;
26class Q_QUICK_EXPORT QSGAreaAllocator
27{
28public:
31
32 QRect allocate(const QSize &size);
33 bool deallocate(const QRect &rect);
34 bool isEmpty() const { return m_root == nullptr; }
35 QSize size() const { return m_size; }
36
37 QByteArray serialize();
38 const char *deserialize(const char *data, int size);
39
40private:
41 bool allocateInNode(const QSize &size, QPoint &result, const QRect &currentRect, QSGAreaAllocatorNode *node);
42 bool deallocateInNode(const QPoint &pos, QSGAreaAllocatorNode *node);
43 void mergeNodeWithNeighbors(QSGAreaAllocatorNode *node);
44
46 QSize m_size;
47};
48
50
51#endif
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
rect
[4]
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint64EXT * result
[6]