MCPcopy Create free account
hub / github.com/DISTRHO/DPF / ScopedGraphicsContext

Method ScopedGraphicsContext

dgl/src/Window.cpp:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37Window::ScopedGraphicsContext::ScopedGraphicsContext(Window& win, Window& transientWin)
38 : window(win),
39 ppData(transientWin.pData),
40 active(false),
41 reenter(window.pData->view != nullptr)
42{
43 if (reenter)
44 {
45 puglBackendLeave(ppData->view);
46 active = puglBackendEnter(window.pData->view);
47 if (active)
48 window.pData->createContextIfNeeded();
49 }
50}
51
52Window::ScopedGraphicsContext::~ScopedGraphicsContext()
53{

Callers

nothing calls this directly

Calls 3

puglBackendLeaveFunction · 0.85
puglBackendEnterFunction · 0.85
createContextIfNeededMethod · 0.45

Tested by

no test coverage detected