24 CAMetalLayer* layer) {
26 std::async(std::launch::deferred, [layer]() -> id<CAMetalDrawable> {
27 id<CAMetalDrawable> current_drawable = nil;
30 current_drawable = [layer nextDrawable];
32 if (!current_drawable) {
36 return current_drawable;
38 return std::shared_future<id<CAMetalDrawable>>(std::move(future));
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...