MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
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
BackendScope(RendererBackend &, ScopeType=ScopeType::Explicit)
Definition: actor.hpp:15