Moved requesting current drawable before presenting (#1779)
This commit is contained in:
@@ -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<CAMetalDrawable> currentDrawable = [mtlView currentDrawable];
|
||||
[commandBuffer presentDrawable:currentDrawable];
|
||||
[commandBuffer commit];
|
||||
|
||||
@@ -105,7 +104,6 @@ private:
|
||||
public:
|
||||
MLNMapViewImplDelegate* delegate = nil;
|
||||
MTKView *mtlView = nil;
|
||||
id<CAMetalDrawable> currentDrawable;
|
||||
id <MTLCommandBuffer> commandBuffer;
|
||||
id <MTLCommandQueue> commandQueue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user