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 | |
6 | QT_BEGIN_NAMESPACE |
7 | |
8 | namespace Qt3DRender { |
9 | namespace Render { |
10 | namespace Quick { |
11 | |
12 | |
13 | Quick3DMemoryBarrier::Quick3DMemoryBarrier(QObject *parent) |
14 | : QObject(parent) |
15 | { |
16 | } |
17 | |
18 | Quick3DMemoryBarrier::~Quick3DMemoryBarrier() |
19 | { |
20 | } |
21 | |
22 | void 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 | |
29 | int Quick3DMemoryBarrier::waitFor() const |
30 | { |
31 | return QMemoryBarrier::Operations::Int(parentBarrier()->waitOperations()); |
32 | } |
33 | |
34 | } // namespace Quick |
35 | } // namespace Render |
36 | } // namespace Qt3DRender |
37 | |
38 | QT_END_NAMESPACE |
39 | |
40 | #include "moc_quick3dmemorybarrier_p.cpp" |
41 |