1// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "quick3dmemorybarrier_p.h"
5
6QT_BEGIN_NAMESPACE
7
8namespace Qt3DRender {
9namespace Render {
10namespace Quick {
11
12
13Quick3DMemoryBarrier::Quick3DMemoryBarrier(QObject *parent)
14 : QObject(parent)
15{
16}
17
18Quick3DMemoryBarrier::~Quick3DMemoryBarrier()
19{
20}
21
22void Quick3DMemoryBarrier::setWaitFor(int barrierTypes)
23{
24 QMemoryBarrier::Operations types(QMemoryBarrier::All);
25 types &= barrierTypes; // Will only keep flags that are actually set
26 parentBarrier()->setWaitOperations(types);
27}
28
29int Quick3DMemoryBarrier::waitFor() const
30{
31 return QMemoryBarrier::Operations::Int(parentBarrier()->waitOperations());
32}
33
34} // namespace Quick
35} // namespace Render
36} // namespace Qt3DRender
37
38QT_END_NAMESPACE
39
40#include "moc_quick3dmemorybarrier_p.cpp"
41

source code of qt3d/src/quick3d/quick3drender/items/quick3dmemorybarrier.cpp