22 auto device = MTLCreateSystemDefaultDevice();
23 auto layer = [[CAMetalLayer alloc] init];
25 layer.drawableSize = CGSize{100, 100};
29 desc.size = {100, 100};
32 auto drawable_texture =
35 ASSERT_TRUE(drawable_texture->IsValid());
39 auto thread = std::thread([&drawable_texture]() {
41 drawable_texture->GetMTLTexture();
47 EXPECT_TRUE(drawable_texture->GetMTLTexture() != nil);
49 EXPECT_TRUE(drawable_texture->GetMTLTexture() != nil);
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...