Asynchronous GeometryTile deletion (#2051)
Co-authored-by: Tim Sylvester <tim@wetdogweather.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <mbgl/util/traits.hpp>
|
||||
#include <mbgl/util/std.hpp>
|
||||
#include <mbgl/util/logging.hpp>
|
||||
#include <mbgl/util/thread_pool.hpp>
|
||||
|
||||
#if MLN_DRAWABLE_RENDERER
|
||||
#include <mbgl/gl/drawable_gl.hpp>
|
||||
@@ -81,6 +82,8 @@ Context::Context(RendererBackend& backend_)
|
||||
|
||||
Context::~Context() noexcept {
|
||||
if (cleanupOnDestruction) {
|
||||
Scheduler::GetBackground()->runRenderJobs();
|
||||
|
||||
reset();
|
||||
#if !defined(NDEBUG)
|
||||
Log::Debug(Event::General, "Rendering Stats:\n" + stats.toString("\n"));
|
||||
@@ -90,6 +93,8 @@ Context::~Context() noexcept {
|
||||
}
|
||||
|
||||
void Context::beginFrame() {
|
||||
Scheduler::GetBackground()->runRenderJobs();
|
||||
|
||||
#if MLN_DRAWABLE_RENDERER
|
||||
frameInFlightFence = std::make_shared<gl::Fence>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user