Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
21
QT_BEGIN_NAMESPACE
22
23
class
QRect;
24
class
QPoint
;
25
struct
QSGAreaAllocatorNode
;
26
class
Q_QUICK_EXPORT
QSGAreaAllocator
27
{
28
public
:
29
QSGAreaAllocator(
const
QSize &size);
30
~QSGAreaAllocator();
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
40
private
:
41
bool
allocateInNode(
const
QSize &size, QPoint &result,
const
QRect ¤tRect, QSGAreaAllocatorNode *node);
42
bool
deallocateInNode(
const
QPoint &pos, QSGAreaAllocatorNode *node);
43
void
mergeNodeWithNeighbors(QSGAreaAllocatorNode *node);
44
45
QSGAreaAllocatorNode *m_root;
46
QSize m_size;
47
};
48
49
QT_END_NAMESPACE
50
51
#
endif
QPoint
\inmodule QtCore\reentrant
Definition
qpoint.h:29
QSGAreaAllocator
Definition
qsgareaallocator_p.h:27
QPlatformGraphicsBufferHelper
\inmodule QtGui
maxMargin
static const int maxMargin
Definition
qsgareaallocator.cpp:22
SplitType
SplitType
Definition
qsgareaallocator.cpp:17
HorizontalSplit
@ HorizontalSplit
Definition
qsgareaallocator.cpp:19
VerticalSplit
@ VerticalSplit
Definition
qsgareaallocator.cpp:18
QSGAreaAllocatorNode
Definition
qsgareaallocator.cpp:25
QSGAreaAllocatorNode::QSGAreaAllocatorNode
QSGAreaAllocatorNode(QSGAreaAllocatorNode *parent)
Definition
qsgareaallocator.cpp:38
QSGAreaAllocatorNode::~QSGAreaAllocatorNode
~QSGAreaAllocatorNode()
Definition
qsgareaallocator.cpp:46
QSGAreaAllocatorNode::isOccupied
bool isOccupied
Definition
qsgareaallocator.cpp:35
QSGAreaAllocatorNode::parent
QSGAreaAllocatorNode * parent
Definition
qsgareaallocator.cpp:30
QSGAreaAllocatorNode::left
QSGAreaAllocatorNode * left
Definition
qsgareaallocator.cpp:31
QSGAreaAllocatorNode::split
int split
Definition
qsgareaallocator.cpp:33
QSGAreaAllocatorNode::right
QSGAreaAllocatorNode * right
Definition
qsgareaallocator.cpp:32
QSGAreaAllocatorNode::splitType
SplitType splitType
Definition
qsgareaallocator.cpp:34
QSGAreaAllocatorNode::isLeaf
bool isLeaf()
Definition
qsgareaallocator.cpp:52
qtdeclarative
src
quick
scenegraph
util
qsgareaallocator_p.h
Generated on
for Qt by
1.14.0