Move Vulkan context to EmbedderTestContextVulkan (flutter/engine#56571)

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.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
Chris Bracken 2024-11-14 09:00:19 -08:00 committed by GitHub
parent 24eaa05108
commit d9bf6d5b8e
2 changed files with 4 additions and 6 deletions

View File

@ -116,12 +116,6 @@ class EmbedderTestContext {
using NextSceneCallback = std::function<void(sk_sp<SkImage> image)>;
#ifdef SHELL_ENABLE_VULKAN
// The TestVulkanContext destructor must be called _after_ the compositor is
// freed.
fml::RefPtr<TestVulkanContext> vulkan_context_ = nullptr;
#endif
#ifdef SHELL_ENABLE_GL
std::shared_ptr<TestEGLContext> egl_context_ = nullptr;
#endif

View File

@ -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<TestVulkanContext> vulkan_context_ = nullptr;
std::unique_ptr<TestVulkanSurface> surface_;
SkISize surface_size_ = SkISize::MakeEmpty();