From 975245b14672e3ab31629d22f30bccec83985a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Fri, 5 Apr 2019 11:00:56 +0200 Subject: [core] remove Renderer::flush --- include/mbgl/renderer/renderer.hpp | 2 -- platform/ios/src/MGLMapView.mm | 2 -- src/mbgl/gl/context.cpp | 4 ---- src/mbgl/gl/context.hpp | 5 ----- src/mbgl/renderer/renderer.cpp | 4 ---- src/mbgl/renderer/renderer_impl.cpp | 7 ------- src/mbgl/renderer/renderer_impl.hpp | 2 -- 7 files changed, 26 deletions(-) diff --git a/include/mbgl/renderer/renderer.hpp b/include/mbgl/renderer/renderer.hpp index f50946aed1..50483fcf4b 100644 --- a/include/mbgl/renderer/renderer.hpp +++ b/include/mbgl/renderer/renderer.hpp @@ -35,8 +35,6 @@ public: void render(const UpdateParameters&); - void flush(); - // Feature queries std::vector queryRenderedFeatures(const ScreenLineString&, const RenderedQueryOptions& options = {}) const; std::vector queryRenderedFeatures(const ScreenCoordinate& point, const RenderedQueryOptions& options = {}) const; diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 4d980655cc..8bfd161cdb 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1341,8 +1341,6 @@ public: // In iOS 12.2, CAEAGLLayer.presentsWithTransaction can cause dramatic // slow down. The exact cause of this is unknown, but this work around // appears to lessen the effects. - // - // Also, consider calling the new mbgl::Renderer::flush() CAEAGLLayer *eaglLayer = MGL_OBJC_DYNAMIC_CAST(_glView.layer, CAEAGLLayer); eaglLayer.presentsWithTransaction = NO; diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 458bf9b649..29675b0446 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -811,9 +811,5 @@ void Context::performCleanup() { } } -void Context::flush() { - MBGL_CHECK_ERROR(glFinish()); -} - } // namespace gl } // namespace mbgl diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp index 0fad92f3df..062cbd7b8a 100644 --- a/src/mbgl/gl/context.hpp +++ b/src/mbgl/gl/context.hpp @@ -107,11 +107,6 @@ public: // Only call this while the OpenGL context is exclusive to this thread. void reset(); - // Flush pending graphics commands. Will block until the pipeline - // is empty. Should be used only with a very good reason because - // it will have a performance impact. - void flush(); - bool empty() const { return pooledTextures.empty() && abandonedPrograms.empty() diff --git a/src/mbgl/renderer/renderer.cpp b/src/mbgl/renderer/renderer.cpp index 1c6d937237..49debb1530 100644 --- a/src/mbgl/renderer/renderer.cpp +++ b/src/mbgl/renderer/renderer.cpp @@ -36,10 +36,6 @@ void Renderer::render(const UpdateParameters& updateParameters) { impl->render(updateParameters); } -void Renderer::flush() { - impl->flush(); -} - std::vector Renderer::queryRenderedFeatures(const ScreenLineString& geometry, const RenderedQueryOptions& options) const { return impl->queryRenderedFeatures(geometry, options); } diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp index 9352fae471..345bd2f259 100644 --- a/src/mbgl/renderer/renderer_impl.cpp +++ b/src/mbgl/renderer/renderer_impl.cpp @@ -598,13 +598,6 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) { // CommandEncoder destructor submits render commands. } -void Renderer::Impl::flush() { - assert(gfx::BackendScope::exists()); - - gl::Context& glContext = static_cast(backend.getContext()); - glContext.flush(); -} - std::vector Renderer::Impl::queryRenderedFeatures(const ScreenLineString& geometry, const RenderedQueryOptions& options) const { std::vector layers; if (options.layerIDs) { diff --git a/src/mbgl/renderer/renderer_impl.hpp b/src/mbgl/renderer/renderer_impl.hpp index dc692fb8ce..ec65224cd2 100644 --- a/src/mbgl/renderer/renderer_impl.hpp +++ b/src/mbgl/renderer/renderer_impl.hpp @@ -55,8 +55,6 @@ public: void render(const UpdateParameters&); - void flush(); - std::vector queryRenderedFeatures(const ScreenLineString&, const RenderedQueryOptions&) const; std::vector querySourceFeatures(const std::string& sourceID, const SourceQueryOptions&) const; std::vector queryShapeAnnotations(const ScreenLineString&) const; -- cgit v1.2.1