From cf4dddd1b949744d99ee34c60fdff9667ef0f410 Mon Sep 17 00:00:00 2001 From: Henry Dooley Date: Fri, 4 Mar 2016 10:23:09 -0800 Subject: [PATCH] Fixes an issue where rendering without Vertex Array Objects would cause a massive slowdown in the driver on Nvidia hardware. Unconfirmed if the issue is present on other GPUs. --- src/mbgl/map/map_context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index e6d8b389e..6a1779117 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -233,9 +233,6 @@ bool MapContext::renderSync(const TransformState& state, const FrameData& frame) transformState = state; - // Cleanup OpenGL objects that we abandoned since the last render call. - glObjectStore.performCleanup(); - if (!painter) painter = std::make_unique(data, transformState, glObjectStore); painter->render(*style, frame, data.getAnnotationManager()->getSpriteAtlas()); @@ -244,6 +241,9 @@ bool MapContext::renderSync(const TransformState& state, const FrameData& frame) callback = nullptr; } + // Cleanup OpenGL objects that we abandoned since the last render call. + glObjectStore.performCleanup(); + view.afterRender(); if (style->hasTransitions()) {