From 9d369ec742f00e35fea97fe24415ecaaaad1f01a Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Tue, 16 Sep 2014 18:00:52 -0400 Subject: [PATCH] dont make_active when clearing buffers, call make_inactive at end of Map::prepare() --- common/headless_view.cpp | 4 ---- src/map/map.cpp | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/common/headless_view.cpp b/common/headless_view.cpp index 355206a3e..c2e402c0b 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -113,8 +113,6 @@ void HeadlessView::resize(int width, int height) { } void HeadlessView::clear_buffers() { - make_active(); - #if MBGL_USE_CGL glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); @@ -181,8 +179,6 @@ void HeadlessView::make_active() { } void HeadlessView::make_inactive() { - clear_buffers(); - #if MBGL_USE_CGL CGLError error = CGLSetCurrentContext(nullptr); if (error) { diff --git a/src/map/map.cpp b/src/map/map.cpp index 10310ee16..64940af9e 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -154,7 +154,6 @@ void Map::cleanup(uv_async_t *async, int status) { void Map::terminate() { view.make_active(); painter.terminate(); - view.make_inactive(); } void Map::render(uv_async_t *async, int status) { @@ -545,6 +544,8 @@ void Map::prepare() { spriteAtlas->update(*getSprite()); updateTiles(); + + view.make_inactive(); } void Map::render() {