From 7f785ae660e62f99f293904c86d27e9b7a5252fb Mon Sep 17 00:00:00 2001 From: Alex Cristici Date: Wed, 18 Oct 2023 23:27:36 +0300 Subject: [PATCH] Moved requesting current drawable before presenting (#1779) --- platform/ios/src/MLNMapView+Metal.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/platform/ios/src/MLNMapView+Metal.mm b/platform/ios/src/MLNMapView+Metal.mm index d8614c920..c9635b6df 100644 --- a/platform/ios/src/MLNMapView+Metal.mm +++ b/platform/ios/src/MLNMapView+Metal.mm @@ -54,8 +54,6 @@ public: commandBuffer = [commandQueue commandBuffer]; commandBufferPtr = NS::RetainPtr((__bridge MTL::CommandBuffer*)commandBuffer); - - currentDrawable = [mtlView currentDrawable]; } const mbgl::mtl::RendererBackend& getBackend() const override { return backend; } @@ -78,6 +76,7 @@ public: } void swap() override { + id currentDrawable = [mtlView currentDrawable]; [commandBuffer presentDrawable:currentDrawable]; [commandBuffer commit]; @@ -105,7 +104,6 @@ private: public: MLNMapViewImplDelegate* delegate = nil; MTKView *mtlView = nil; - id currentDrawable; id commandBuffer; id commandQueue;