From da2fd6487d521c05e6391b075ad58ee775b4109f Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 13 Nov 2024 18:15:12 -0800 Subject: [PATCH] Move Vulkan context to EmbedderTestContextVulkan In flutter/engine#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 ifdef guards. --- shell/platform/embedder/tests/embedder_test_context.h | 6 ------ .../platform/embedder/tests/embedder_test_context_vulkan.h | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/shell/platform/embedder/tests/embedder_test_context.h b/shell/platform/embedder/tests/embedder_test_context.h index b99d6b3534201..eb0deb4b767fa 100644 --- a/shell/platform/embedder/tests/embedder_test_context.h +++ b/shell/platform/embedder/tests/embedder_test_context.h @@ -116,12 +116,6 @@ class EmbedderTestContext { using NextSceneCallback = std::function image)>; -#ifdef SHELL_ENABLE_VULKAN - // The TestVulkanContext destructor must be called _after_ the compositor is - // freed. - fml::RefPtr vulkan_context_ = nullptr; -#endif - #ifdef SHELL_ENABLE_GL std::shared_ptr egl_context_ = nullptr; #endif diff --git a/shell/platform/embedder/tests/embedder_test_context_vulkan.h b/shell/platform/embedder/tests/embedder_test_context_vulkan.h index e7eb6906d9d16..18cceab4a28d4 100644 --- a/shell/platform/embedder/tests/embedder_test_context_vulkan.h +++ b/shell/platform/embedder/tests/embedder_test_context_vulkan.h @@ -38,6 +38,10 @@ class EmbedderTestContextVulkan : public EmbedderTestContext { const char* name); private: + // The TestVulkanContext destructor must be called _after_ the compositor is + // freed. + fml::RefPtr vulkan_context_ = nullptr; + std::unique_ptr surface_; SkISize surface_size_ = SkISize::MakeEmpty();