Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 607b47b

Browse files
author
George Wright
committed
Always build the Vulkan code for ShellTest
1 parent 2aaccd1 commit 607b47b

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

shell/common/BUILD.gn

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ template("shell_host_executable") {
166166

167167
if (enable_unittests) {
168168
declare_args() {
169-
test_enable_vulkan = is_fuchsia
169+
test_enable_vulkan = true
170170
test_enable_gl = !is_fuchsia
171171
test_enable_software = true
172172
test_enable_metal = false
@@ -196,6 +196,8 @@ if (enable_unittests) {
196196
"shell_test.h",
197197
"shell_test_platform_view.cc",
198198
"shell_test_platform_view.h",
199+
"shell_test_platform_view_vulkan.cc",
200+
"shell_test_platform_view_vulkan.h",
199201
"shell_unittests.cc",
200202
"vsync_waiters_test.cc",
201203
"vsync_waiters_test.h",
@@ -210,6 +212,8 @@ if (enable_unittests) {
210212
"//flutter/lib/ui:ui",
211213
"//flutter/shell",
212214
"//flutter/testing:dart",
215+
"//flutter/testing:vulkan",
216+
"//flutter/vulkan",
213217
]
214218

215219
if (!defined(defines)) {
@@ -228,20 +232,6 @@ if (enable_unittests) {
228232

229233
defines += [ "SHELL_ENABLE_GL" ]
230234
}
231-
232-
if (test_enable_vulkan) {
233-
sources += [
234-
"shell_test_platform_view_vulkan.cc",
235-
"shell_test_platform_view_vulkan.h",
236-
]
237-
238-
deps += [
239-
"//flutter/testing:vulkan",
240-
"//flutter/vulkan",
241-
]
242-
243-
defines += [ "SHELL_ENABLE_VULKAN" ]
244-
}
245235
}
246236
}
247237

shell/common/shell_test_platform_view.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
#ifdef SHELL_ENABLE_GL
88
#include "flutter/shell/common/shell_test_platform_view_gl.h"
99
#endif // SHELL_ENABLE_GL
10-
#ifdef SHELL_ENABLE_VULKAN
1110
#include "flutter/shell/common/shell_test_platform_view_vulkan.h"
12-
#endif // SHELL_ENABLE_VULKAN
1311

1412
namespace flutter {
1513
namespace testing {
@@ -28,11 +26,9 @@ std::unique_ptr<ShellTestPlatformView> ShellTestPlatformView::Create(
2826
return std::make_unique<ShellTestPlatformViewGL>(
2927
delegate, task_runners, vsync_clock, create_vsync_waiter);
3028
#endif // SHELL_ENABLE_GL
31-
#ifdef SHELL_ENABLE_VULKAN
3229
case BackendType::kVulkanBackend:
3330
return std::make_unique<ShellTestPlatformViewVulkan>(
3431
delegate, task_runners, vsync_clock, create_vsync_waiter);
35-
#endif // SHELL_ENABLE_VULKAN
3632
default:
3733
FML_LOG(FATAL) << "No backends supported for ShellTestPlatformView";
3834
return nullptr;

0 commit comments

Comments
 (0)