Skip to content

Commit 0f26261

Browse files
committed
Move Vulkan context to EmbedderTestContextVulkan
In flutter#29391 we extracted EmbedderTestContextVulkan, but didn't move the vulkan_context_ to that class. Since it's no longer used in the base class, we push it down to avoid the precompiler macros.
1 parent f088600 commit 0f26261

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

shell/platform/embedder/tests/embedder_test_context.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,6 @@ class EmbedderTestContext {
116116

117117
using NextSceneCallback = std::function<void(sk_sp<SkImage> image)>;
118118

119-
#ifdef SHELL_ENABLE_VULKAN
120-
// The TestVulkanContext destructor must be called _after_ the compositor is
121-
// freed.
122-
fml::RefPtr<TestVulkanContext> vulkan_context_ = nullptr;
123-
#endif
124-
125119
#ifdef SHELL_ENABLE_GL
126120
std::shared_ptr<TestEGLContext> egl_context_ = nullptr;
127121
#endif

shell/platform/embedder/tests/embedder_test_context_vulkan.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class EmbedderTestContextVulkan : public EmbedderTestContext {
3838
const char* name);
3939

4040
private:
41+
// The TestVulkanContext destructor must be called _after_ the compositor is
42+
// freed.
43+
fml::RefPtr<TestVulkanContext> vulkan_context_ = nullptr;
44+
4145
std::unique_ptr<TestVulkanSurface> surface_;
4246

4347
SkISize surface_size_ = SkISize::MakeEmpty();

0 commit comments

Comments
 (0)