From 985a5a0e4d73a85d267577472344ac44ef4538d0 Mon Sep 17 00:00:00 2001 From: kallaballa Date: Tue, 13 Dec 2022 11:47:21 +0100 Subject: [PATCH] use scopes for context lifetimes wherever possible --- src/common/nanovgcontext.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/nanovgcontext.cpp b/src/common/nanovgcontext.cpp index 196865076..5d20b7038 100644 --- a/src/common/nanovgcontext.cpp +++ b/src/common/nanovgcontext.cpp @@ -16,9 +16,8 @@ NanoVGContext::NanoVGContext(Viz2D &v2d, NVGcontext *context, CLGLContext &fbCon void NanoVGContext::render(std::function fn) { CLExecScope_t scope(clglContext_.getCLExecContext()); - begin(); + NanoVGContext::Scope nvgScope(*this); fn(context_, clglContext_.getSize()); - end(); } void NanoVGContext::begin() {