use scopes for context lifetimes wherever possible

pull/3471/head
kallaballa 2 years ago
parent 33ab611d6e
commit 985a5a0e4d
  1. 3
      src/common/nanovgcontext.cpp

@ -16,9 +16,8 @@ NanoVGContext::NanoVGContext(Viz2D &v2d, NVGcontext *context, CLGLContext &fbCon
void NanoVGContext::render(std::function<void(NVGcontext*, const cv::Size&)> fn) {
CLExecScope_t scope(clglContext_.getCLExecContext());
begin();
NanoVGContext::Scope nvgScope(*this);
fn(context_, clglContext_.getSize());
end();
}
void NanoVGContext::begin() {

Loading…
Cancel
Save