MapLibre Native Core
backend_scope.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
mbgl
{
4
namespace
gfx {
5
6
class
RendererBackend;
7
8
class
BackendScope
{
9
public
:
14
enum class
ScopeType
: bool {
15
Implicit
,
16
Explicit
,
17
};
18
19
BackendScope
(
RendererBackend
&,
ScopeType
=
ScopeType::Explicit
);
20
~BackendScope
();
21
22
// Returns true when there is currently a BackendScope active in this thread.
23
static
bool
exists
();
24
25
private
:
26
void
activate();
27
void
deactivate();
28
29
BackendScope
* priorScope;
30
BackendScope
* nextScope;
31
RendererBackend
& backend;
32
const
ScopeType
scopeType;
33
bool
activated =
false
;
34
};
35
36
}
// namespace gfx
37
}
// namespace mbgl
mbgl::gfx::BackendScope
Definition:
backend_scope.hpp:8
mbgl::gfx::BackendScope::ScopeType
ScopeType
Definition:
backend_scope.hpp:14
mbgl::gfx::BackendScope::ScopeType::Implicit
@ Implicit
mbgl::gfx::BackendScope::ScopeType::Explicit
@ Explicit
mbgl::gfx::BackendScope::exists
static bool exists()
mbgl::gfx::BackendScope::BackendScope
BackendScope(RendererBackend &, ScopeType=ScopeType::Explicit)
mbgl::gfx::BackendScope::~BackendScope
~BackendScope()
mbgl::gfx::RendererBackend
Definition:
renderer_backend.hpp:21
mbgl
Definition:
actor.hpp:15
include
mbgl
gfx
backend_scope.hpp
MapLibre website
|
GitHub repository