5 #include "flutter/testing/testing.h"
19 #include "gtest/gtest.h"
28 const auto& transients = std::make_shared<SwapchainTransientsMTL>(
29 GetContext()->GetResourceAllocator());
33 auto resolve = transients->GetResolveTexture();
34 EXPECT_NE(resolve,
nullptr);
35 EXPECT_NE(transients->GetMSAATexture(),
nullptr);
36 EXPECT_NE(transients->GetDepthStencilTexture(),
nullptr);
39 EXPECT_EQ(resolve->GetTextureDescriptor().size,
ISize(1, 1));
40 EXPECT_EQ(resolve->GetTextureDescriptor().format,
43 EXPECT_EQ(resolve->GetTextureDescriptor().storage_mode,
47 auto msaa = transients->GetMSAATexture();
48 EXPECT_EQ(msaa->GetTextureDescriptor().size,
ISize(1, 1));
49 EXPECT_EQ(msaa->GetTextureDescriptor().format,
52 EXPECT_EQ(msaa->GetTextureDescriptor().storage_mode,
56 auto depth_stencil = transients->GetDepthStencilTexture();
57 EXPECT_EQ(depth_stencil->GetTextureDescriptor().size,
ISize(1, 1));
58 EXPECT_EQ(depth_stencil->GetTextureDescriptor().format,
60 EXPECT_EQ(depth_stencil->GetTextureDescriptor().sample_count,
62 EXPECT_EQ(depth_stencil->GetTextureDescriptor().storage_mode,
66 EXPECT_EQ(transients->GetResolveTexture(), resolve);
70 EXPECT_NE(resolve, transients->GetResolveTexture());
71 resolve = transients->GetResolveTexture();
75 EXPECT_NE(resolve, transients->GetResolveTexture());
TEST_P(AiksTest, DrawAtlasNoColor)
INSTANTIATE_METAL_PLAYGROUND_SUITE(AllocatorMTLTest)