Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
impeller::android::testing Namespace Reference

Classes

class  FakeSurfaceControl
 
struct  UniqueAHardwareBufferTraits
 

Typedefs

using UniqueAHardwareBuffer = fml::UniqueObject< AHardwareBuffer *, UniqueAHardwareBufferTraits >
 

Functions

 TEST (AndroidAHBSwapchainTest, AHBSwapchainNoFenceWaitAfterAcquireNextImageFailure)
 
 TEST (AndroidAHBSwapchainTest, AHBSwapchainDtorCallsWaitIdle)
 
UniqueAHardwareBuffer AllocateAHardwareBuffer (const AHardwareBuffer_Desc &desc)
 
std::shared_ptr< ContextVKCreateContext ()
 
 TEST (AndroidVulkanTest, CanImportRGBA)
 
 TEST (AndroidVulkanTest, CanImportWithYUB)
 
 TEST (AndroidVulkanTest, CreateImageViewForOpaqueAlpha)
 
 TEST (AndroidVulkanTest, TextureSourceDeleteAfterContextDelete)
 
 FML_TEST_CLASS (AndroidAHBSwapchainTest, AHBSwapchainDtorCallsWaitIdle)
 
 FML_TEST_CLASS (AndroidAHBSwapchainTest, AHBSwapchainNoFenceWaitAfterAcquireNextImageFailure)
 
 TEST (ToolkitAndroidTest, CanCreateProcTable)
 
 TEST (ToolkitAndroidTest, GuardsAgainstZeroSizedDescriptors)
 
 TEST (ToolkitAndroidTest, CanCreateHardwareBuffer)
 
 TEST (ToolkitAndroidTest, CanGetHardwareBufferIDs)
 
 TEST (ToolkitAndroidTest, HardwareBufferNullIDIfAPIUnavailable)
 
 TEST (ToolkitAndroidTest, CanDescribeHardwareBufferHandles)
 
 TEST (ToolkitAndroidTest, CanApplySurfaceTransaction)
 
 TEST (ToolkitAndroidTest, SurfacControlsAreAvailable)
 
 TEST (ToolkitAndroidTest, ChoreographerIsAvailable)
 
 TEST (ToolkitAndroidTest, CanPostAndNotWaitForFrameCallbacks)
 
 TEST (ToolkitAndroidTest, CanPostAndWaitForFrameCallbacks)
 

Variables

const std::vector< std::string > kAndroidDeviceExtensions
 

Typedef Documentation

◆ UniqueAHardwareBuffer

Function Documentation

◆ AllocateAHardwareBuffer()

UniqueAHardwareBuffer impeller::android::testing::AllocateAHardwareBuffer ( const AHardwareBuffer_Desc &  desc)

Definition at line 32 of file ahb_texture_source_vk_unittests.cc.

33 {
34 AHardwareBuffer* buffer = nullptr;
35 EXPECT_EQ(AHardwareBuffer_allocate(&desc, &buffer), 0);
36 return UniqueAHardwareBuffer(buffer);
37}

Referenced by TEST(), TEST(), and TEST().

◆ CreateContext()

std::shared_ptr< ContextVK > impeller::android::testing::CreateContext ( )

Definition at line 40 of file ahb_texture_source_vk_unittests.cc.

40 {
41 auto vulkan_dylib = fml::NativeLibrary::Create("libvulkan.so");
42 auto instance_proc_addr =
43 vulkan_dylib->ResolveFunction<PFN_vkGetInstanceProcAddr>(
44 "vkGetInstanceProcAddr");
45
46 if (!instance_proc_addr.has_value()) {
47 VALIDATION_LOG << "Could not setup Vulkan proc table.";
48 return nullptr;
49 }
50
52 settings.proc_address_callback = instance_proc_addr.value();
53 settings.shader_libraries_data = {};
54 settings.enable_validation = false;
55 settings.enable_gpu_tracing = false;
56 settings.enable_surface_control = false;
57
58 return ContextVK::Create(std::move(settings));
59}
static fml::RefPtr< NativeLibrary > Create(const char *path)
std::vector< std::shared_ptr< fml::Mapping > > shader_libraries_data
Definition context_vk.h:85
PFN_vkGetInstanceProcAddr proc_address_callback
Definition context_vk.h:84
#define VALIDATION_LOG
Definition validation.h:91

References fml::NativeLibrary::Create(), impeller::ContextVK::Create(), impeller::ContextVK::Settings::enable_gpu_tracing, impeller::ContextVK::Settings::enable_surface_control, impeller::ContextVK::Settings::enable_validation, impeller::ContextVK::Settings::proc_address_callback, impeller::ContextVK::Settings::shader_libraries_data, and VALIDATION_LOG.

Referenced by TEST(), TEST(), and TEST().

◆ FML_TEST_CLASS() [1/2]

impeller::android::testing::FML_TEST_CLASS ( AndroidAHBSwapchainTest  ,
AHBSwapchainDtorCallsWaitIdle   
)

◆ FML_TEST_CLASS() [2/2]

impeller::android::testing::FML_TEST_CLASS ( AndroidAHBSwapchainTest  ,
AHBSwapchainNoFenceWaitAfterAcquireNextImageFailure   
)

◆ TEST() [1/17]

impeller::android::testing::TEST ( AndroidAHBSwapchainTest  ,
AHBSwapchainDtorCallsWaitIdle   
)

Definition at line 55 of file ahb_swapchain_vk_unittests.cc.

55 {
57 .SetDeviceExtensions(kAndroidDeviceExtensions)
58 .Build();
59
60 auto ahb_swapchain = std::shared_ptr<AHBSwapchainVK>(new AHBSwapchainVK(
61 context, std::make_shared<FakeSurfaceControl>(), {}, {100, 100}, false));
62
63 ahb_swapchain.reset();
64
65 auto called_functions = GetMockVulkanFunctions(context->GetDevice());
66 EXPECT_NE(std::find(called_functions->begin(), called_functions->end(),
67 "vkDeviceWaitIdle"),
68 called_functions->end());
69}
The implementation of a swapchain that uses hardware buffers presented to a given surface control on ...
MockVulkanContextBuilder & SetDeviceExtensions(const std::vector< std::string > &device_extensions)
Definition mock_vulkan.h:92
std::shared_ptr< ContextVK > Build()
Create a Vulkan context with Vulkan functions mocked. The caller is given a chance to tinker on the s...
std::shared_ptr< ContextGLES > context

References impeller::testing::MockVulkanContextBuilder::Build(), context, kAndroidDeviceExtensions, and impeller::testing::MockVulkanContextBuilder::SetDeviceExtensions().

◆ TEST() [2/17]

impeller::android::testing::TEST ( AndroidAHBSwapchainTest  ,
AHBSwapchainNoFenceWaitAfterAcquireNextImageFailure   
)

Definition at line 26 of file ahb_swapchain_vk_unittests.cc.

27 {
28 bool wait_for_fences_called = false;
29 auto const context =
31 .SetDeviceExtensions(kAndroidDeviceExtensions)
33 [](VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence,
34 uint32_t*) -> VkResult { return VK_ERROR_SURFACE_LOST_KHR; })
35 .SetWaitForFencesCallback([&](VkDevice, uint32_t, const VkFence*,
36 VkBool32, uint64_t) -> VkResult {
37 wait_for_fences_called = true;
38 return VK_SUCCESS;
39 })
40 .Build();
41
42 auto ahb_swapchain = std::shared_ptr<AHBSwapchainVK>(new AHBSwapchainVK(
43 context, std::make_shared<FakeSurfaceControl>(), {}, {100, 100}, false));
44
45 // Acquire a drawable but do not present it.
46 auto image = ahb_swapchain->AcquireNextDrawable();
47 EXPECT_TRUE(image);
48
49 // Call AcquireNextDrawable again. vkWaitForFences should not be called
50 // because no command was submitted and no fences are pending.
51 ahb_swapchain->AcquireNextDrawable();
52 EXPECT_FALSE(wait_for_fences_called);
53}
MockVulkanContextBuilder SetAcquireNextImageCallback(std::function< std::remove_pointer_t< PFN_vkAcquireNextImageKHR > > acquire_next_image_callback)
FlutterVulkanImage * image

References context, image, kAndroidDeviceExtensions, impeller::testing::MockVulkanContextBuilder::SetAcquireNextImageCallback(), and impeller::testing::MockVulkanContextBuilder::SetDeviceExtensions().

◆ TEST() [3/17]

impeller::android::testing::TEST ( AndroidVulkanTest  ,
CanImportRGBA   
)

Definition at line 61 of file ahb_texture_source_vk_unittests.cc.

61 {
62 if (!HardwareBuffer::IsAvailableOnPlatform()) {
63 GTEST_SKIP() << "Hardware buffers are not supported on this platform.";
64 }
65
67 desc.size = ISize{1, 1};
68 desc.format = HardwareBufferFormat::kR8G8B8A8UNormInt;
69 desc.usage = HardwareBufferUsageFlags::kSampledImage;
70
71 auto ahb = std::make_unique<HardwareBuffer>(desc);
72 ASSERT_TRUE(ahb);
73 auto context_vk = CreateContext();
74 ASSERT_TRUE(context_vk);
75
76 AHBTextureSourceVK source(context_vk, std::move(ahb),
77 /*is_swapchain_image=*/false);
78
79 EXPECT_TRUE(source.IsValid());
80 EXPECT_EQ(source.GetYUVConversion(), nullptr);
81
82 context_vk->Shutdown();
83}
A texture source that wraps an instance of AHardwareBuffer.
A descriptor use to specify hardware buffer allocations.

References CreateContext(), impeller::android::HardwareBufferDescriptor::format, impeller::AHBTextureSourceVK::GetYUVConversion(), impeller::android::HardwareBuffer::IsAvailableOnPlatform(), impeller::AHBTextureSourceVK::IsValid(), impeller::android::kR8G8B8A8UNormInt, impeller::android::kSampledImage, impeller::android::HardwareBufferDescriptor::size, and impeller::android::HardwareBufferDescriptor::usage.

◆ TEST() [4/17]

impeller::android::testing::TEST ( AndroidVulkanTest  ,
CanImportWithYUB   
)

Definition at line 85 of file ahb_texture_source_vk_unittests.cc.

85 {
86 if (!HardwareBuffer::IsAvailableOnPlatform()) {
87 GTEST_SKIP() << "Hardware buffers are not supported on this platform.";
88 }
89
90 AHardwareBuffer_Desc desc;
91 desc.width = 16;
92 desc.height = 16;
93 desc.format = AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420;
94 desc.stride = 0;
95 desc.layers = 1;
96 desc.rfu0 = 0;
97 desc.rfu1 = 0;
98 desc.usage = AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE |
99 AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK |
100 AHARDWAREBUFFER_USAGE_CPU_READ_MASK;
101
102 EXPECT_EQ(AHardwareBuffer_isSupported(&desc), 1);
103
104 UniqueAHardwareBuffer buffer = AllocateAHardwareBuffer(desc);
105 ASSERT_TRUE(buffer.is_valid());
106
107 auto context_vk = CreateContext();
108 ASSERT_TRUE(context_vk);
109
110 AHBTextureSourceVK source(context_vk, buffer.get(), desc);
111
112 EXPECT_TRUE(source.IsValid());
113 EXPECT_NE(source.GetYUVConversion(), nullptr);
114
115 context_vk->Shutdown();
116}

References AllocateAHardwareBuffer(), CreateContext(), impeller::AHBTextureSourceVK::GetYUVConversion(), impeller::android::HardwareBuffer::IsAvailableOnPlatform(), and impeller::AHBTextureSourceVK::IsValid().

◆ TEST() [5/17]

impeller::android::testing::TEST ( AndroidVulkanTest  ,
CreateImageViewForOpaqueAlpha   
)

Definition at line 118 of file ahb_texture_source_vk_unittests.cc.

118 {
119 if (!HardwareBuffer::IsAvailableOnPlatform()) {
120 GTEST_SKIP() << "Hardware buffers are not supported on this platform.";
121 }
122
123 AHardwareBuffer_Desc desc;
124 desc.width = 16;
125 desc.height = 16;
126 desc.format = AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM;
127 desc.stride = 0;
128 desc.layers = 1;
129 desc.rfu0 = 0;
130 desc.rfu1 = 0;
131 desc.usage = AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE |
132 AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK |
133 AHARDWAREBUFFER_USAGE_CPU_READ_MASK;
134
135 EXPECT_EQ(AHardwareBuffer_isSupported(&desc), 1);
136
137 UniqueAHardwareBuffer buffer = AllocateAHardwareBuffer(desc);
138 ASSERT_TRUE(buffer.is_valid());
139
140 auto context_vk = CreateContext();
141 ASSERT_TRUE(context_vk);
142
144 ASSERT_EQ(context_vk->GetDevice().getAndroidHardwareBufferPropertiesANDROID(
145 buffer.get(), &ahb_props.get()),
146 vk::Result::eSuccess);
147
148 auto image = AHBTextureSourceVK::CreateVKImageWrapperForAndroidHarwareBuffer(
149 context_vk->GetDevice(), ahb_props, desc);
150 ASSERT_TRUE(image);
151
152 auto image_info = AHBTextureSourceVK::CreateImageViewInfo(
153 image.get(), nullptr, ahb_props, desc);
154
155 EXPECT_EQ(image_info.get().components.a, vk::ComponentSwizzle::eOne);
156
157 context_vk->Shutdown();
158}
vk::StructureChain< vk::AndroidHardwareBufferPropertiesANDROID, vk::AndroidHardwareBufferFormatPropertiesANDROID > AHBProperties

References AllocateAHardwareBuffer(), CreateContext(), impeller::AHBTextureSourceVK::CreateImageViewInfo(), impeller::AHBTextureSourceVK::CreateVKImageWrapperForAndroidHarwareBuffer(), image, and impeller::android::HardwareBuffer::IsAvailableOnPlatform().

◆ TEST() [6/17]

impeller::android::testing::TEST ( AndroidVulkanTest  ,
TextureSourceDeleteAfterContextDelete   
)

Definition at line 160 of file ahb_texture_source_vk_unittests.cc.

160 {
161 AHardwareBuffer_Desc desc;
162 desc.width = 16;
163 desc.height = 16;
164 desc.format = AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM;
165 desc.stride = 0;
166 desc.layers = 1;
167 desc.rfu0 = 0;
168 desc.rfu1 = 0;
169 desc.usage = AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE |
170 AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK |
171 AHARDWAREBUFFER_USAGE_CPU_READ_MASK;
172
173 EXPECT_EQ(AHardwareBuffer_isSupported(&desc), 1);
174
176 ASSERT_TRUE(buffer.is_valid());
177
179 .SetDeviceExtensions(kAndroidDeviceExtensions)
180 .Build();
181
182 ASSERT_TRUE(context);
183
184 auto texture =
185 std::make_shared<AHBTextureSourceVK>(context, buffer.get(), desc);
186 ASSERT_TRUE(texture->IsValid());
187
188 // Delete the context and its VkDevice.
189 context.reset();
190
191 // Delete the AHBTextureSourceVK and verify that the destructor does not call
192 // Vulkan APIs on a VkDevice that is no longer valid.
193 texture.reset();
194}
FlTexture * texture
UniqueAHardwareBuffer AllocateAHardwareBuffer(const AHardwareBuffer_Desc &desc)

References AllocateAHardwareBuffer(), impeller::testing::MockVulkanContextBuilder::Build(), context, kAndroidDeviceExtensions, impeller::testing::MockVulkanContextBuilder::SetDeviceExtensions(), and texture.

◆ TEST() [7/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
CanApplySurfaceTransaction   
)

Definition at line 82 of file toolkit_android_unittests.cc.

82 {
83 if (!SurfaceTransaction::IsAvailableOnPlatform()) {
84 GTEST_SKIP() << "Surface controls are not supported on this platform.";
85 }
86 ASSERT_TRUE(SurfaceTransaction::IsAvailableOnPlatform());
87 SurfaceTransaction transaction;
88 ASSERT_TRUE(transaction.IsValid());
90 ASSERT_TRUE(transaction.Apply([&event](auto) { event.Signal(); }));
91 event.Wait();
92}
A wrapper for ASurfaceTransaction. https://developer.android.com/ndk/reference/group/native-activity#...
bool Apply(OnCompleteCallback callback=nullptr)
Applies the updated encoded in the transaction and invokes the callback when the updated are complete...

References impeller::android::SurfaceTransaction::Apply(), impeller::android::SurfaceTransaction::IsAvailableOnPlatform(), and impeller::android::SurfaceTransaction::IsValid().

◆ TEST() [8/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
CanCreateHardwareBuffer   
)

Definition at line 36 of file toolkit_android_unittests.cc.

36 {
37 if (!HardwareBuffer::IsAvailableOnPlatform()) {
38 GTEST_SKIP() << "Hardware buffers are not supported on this platform.";
39 }
40 ASSERT_TRUE(HardwareBuffer::IsAvailableOnPlatform());
41 auto desc = HardwareBufferDescriptor::MakeForSwapchainImage({100, 100});
42 ASSERT_TRUE(desc.IsAllocatable());
43 HardwareBuffer buffer(desc);
44 ASSERT_TRUE(buffer.IsValid());
45}

References impeller::android::HardwareBuffer::IsAvailableOnPlatform(), and impeller::android::HardwareBufferDescriptor::MakeForSwapchainImage().

◆ TEST() [9/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
CanCreateProcTable   
)

Definition at line 25 of file toolkit_android_unittests.cc.

25 {
26 ProcTable proc_table;
27 ASSERT_TRUE(proc_table.IsValid());
28}
The table of Android procs that are resolved dynamically.
Definition proc_table.h:102
bool IsValid() const
If a valid proc table could be setup. This may fail in case of setup on non-Android platforms.
Definition proc_table.cc:65

References impeller::android::ProcTable::IsValid().

◆ TEST() [10/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
CanDescribeHardwareBufferHandles   
)

Definition at line 67 of file toolkit_android_unittests.cc.

67 {
68 if (!HardwareBuffer::IsAvailableOnPlatform()) {
69 GTEST_SKIP() << "Hardware buffers are not supported on this platform.";
70 }
71 ASSERT_TRUE(HardwareBuffer::IsAvailableOnPlatform());
72 auto desc = HardwareBufferDescriptor::MakeForSwapchainImage({100, 100});
73 ASSERT_TRUE(desc.IsAllocatable());
74 HardwareBuffer buffer(desc);
75 ASSERT_TRUE(buffer.IsValid());
76 auto a_desc = HardwareBuffer::Describe(buffer.GetHandle());
77 ASSERT_TRUE(a_desc.has_value());
78 ASSERT_EQ(a_desc->width, 100u); // NOLINT
79 ASSERT_EQ(a_desc->height, 100u); // NOLINT
80}

References impeller::android::HardwareBuffer::Describe(), impeller::android::HardwareBuffer::IsAvailableOnPlatform(), and impeller::android::HardwareBufferDescriptor::MakeForSwapchainImage().

◆ TEST() [11/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
CanGetHardwareBufferIDs   
)

Definition at line 47 of file toolkit_android_unittests.cc.

47 {
48 if (!HardwareBuffer::IsAvailableOnPlatform()) {
49 GTEST_SKIP() << "Hardware buffers are not supported on this platform.";
50 }
51 ASSERT_TRUE(HardwareBuffer::IsAvailableOnPlatform());
52 if (!GetProcTable().AHardwareBuffer_getId.IsAvailable()) {
53 GTEST_SKIP() << "Hardware buffer IDs are not available on this platform.";
54 }
55 auto desc = HardwareBufferDescriptor::MakeForSwapchainImage({100, 100});
56 ASSERT_TRUE(desc.IsAllocatable());
57 HardwareBuffer buffer(desc);
58 ASSERT_TRUE(buffer.IsValid());
59 ASSERT_TRUE(buffer.GetSystemUniqueID().has_value());
60}
const ProcTable & GetProcTable()
Definition proc_table.cc:12

References impeller::android::GetProcTable(), impeller::android::HardwareBuffer::IsAvailableOnPlatform(), and impeller::android::HardwareBufferDescriptor::MakeForSwapchainImage().

◆ TEST() [12/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
CanPostAndNotWaitForFrameCallbacks   
)

Definition at line 108 of file toolkit_android_unittests.cc.

108 {
109 if (!Choreographer::IsAvailableOnPlatform()) {
110 GTEST_SKIP() << "Choreographer is not supported on this platform.";
111 }
112 const auto& choreographer = Choreographer::GetInstance();
113 ASSERT_TRUE(choreographer.IsValid());
114 ASSERT_TRUE(choreographer.PostFrameCallback([](auto) {}));
115}

References impeller::android::Choreographer::GetInstance(), and impeller::android::Choreographer::IsAvailableOnPlatform().

◆ TEST() [13/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
CanPostAndWaitForFrameCallbacks   
)

Definition at line 117 of file toolkit_android_unittests.cc.

117 {
118 if (!Choreographer::IsAvailableOnPlatform()) {
119 GTEST_SKIP() << "Choreographer is not supported on this platform.";
120 }
121 if ((true)) {
122 GTEST_SKIP()
123 << "Disabled till the test harness is in an Android activity. "
124 "Running it without one will hang because the choreographer "
125 "frame callback will never execute.";
126 }
127 const auto& choreographer = Choreographer::GetInstance();
128 ASSERT_TRUE(choreographer.IsValid());
130 ASSERT_TRUE(choreographer.PostFrameCallback(
131 [&event](auto point) { event.Signal(); }));
132 event.Wait();
133}

References impeller::android::Choreographer::GetInstance(), and impeller::android::Choreographer::IsAvailableOnPlatform().

◆ TEST() [14/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
ChoreographerIsAvailable   
)

Definition at line 101 of file toolkit_android_unittests.cc.

101 {
102 if (!Choreographer::IsAvailableOnPlatform()) {
103 GTEST_SKIP() << "Choreographer is not supported on this platform.";
104 }
105 ASSERT_TRUE(Choreographer::IsAvailableOnPlatform());
106}

References impeller::android::Choreographer::IsAvailableOnPlatform().

◆ TEST() [15/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
GuardsAgainstZeroSizedDescriptors   
)

Definition at line 30 of file toolkit_android_unittests.cc.

30 {
31 auto desc = HardwareBufferDescriptor::MakeForSwapchainImage({0, 0});
32 ASSERT_GT(desc.size.width, 0u);
33 ASSERT_GT(desc.size.height, 0u);
34}

References impeller::android::HardwareBufferDescriptor::MakeForSwapchainImage().

◆ TEST() [16/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
HardwareBufferNullIDIfAPIUnavailable   
)

Definition at line 62 of file toolkit_android_unittests.cc.

62 {
63 DISABLE_ANDROID_PROC(AHardwareBuffer_getId);
64 ASSERT_FALSE(HardwareBuffer::GetSystemUniqueID(nullptr).has_value());
65}
#define DISABLE_ANDROID_PROC(name)

References DISABLE_ANDROID_PROC, and impeller::android::HardwareBuffer::GetSystemUniqueID().

◆ TEST() [17/17]

impeller::android::testing::TEST ( ToolkitAndroidTest  ,
SurfacControlsAreAvailable   
)

Definition at line 94 of file toolkit_android_unittests.cc.

94 {
95 if (!SurfaceControl::IsAvailableOnPlatform()) {
96 GTEST_SKIP() << "Surface controls are not supported on this platform.";
97 }
98 ASSERT_TRUE(SurfaceControl::IsAvailableOnPlatform());
99}

References impeller::android::SurfaceControl::IsAvailableOnPlatform().

Variable Documentation

◆ kAndroidDeviceExtensions

const std::vector< std::string > impeller::android::testing::kAndroidDeviceExtensions
Initial value:
= {
"VK_KHR_swapchain",
"VK_ANDROID_external_memory_android_hardware_buffer",
"VK_KHR_sampler_ycbcr_conversion",
"VK_KHR_external_memory",
"VK_EXT_queue_family_foreign",
"VK_KHR_dedicated_allocation",
}

A list of Vulkan device extensions that are required by Android-specific services in the Impeller Vulkan back end. This can be used to configure the mock Vulkan framework to simulate Android's version of Vulkan.

Definition at line 9 of file android_test_utils.cc.

9 {
10 "VK_KHR_swapchain",
11 "VK_ANDROID_external_memory_android_hardware_buffer",
12 "VK_KHR_sampler_ycbcr_conversion",
13 "VK_KHR_external_memory",
14 "VK_EXT_queue_family_foreign",
15 "VK_KHR_dedicated_allocation",
16};

Referenced by TEST(), TEST(), and TEST().