-
Notifications
You must be signed in to change notification settings - Fork 6k
Move Vulkan context to EmbedderTestContextVulkan #56571
Conversation
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 ifdef guards.
// freed. | ||
fml::RefPtr<TestVulkanContext> vulkan_context_ = nullptr; | ||
#endif | ||
|
||
#ifdef SHELL_ENABLE_GL | ||
std::shared_ptr<TestEGLContext> egl_context_ = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do this in a followup, but we don't yet have a GL subclass.
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... @bdero is the reason this wasn't pushed down due to the destruction order dependency between this and compositor_
? If so, any further details on this?
Context is that I'm doing a larger-scale refactor on the embedder test code to separate things out more cleanly by backend. This was a quick seemingly obvious pre-factoring patch I was thinking I could get out of the way, but if I can't due to an ordering issue that would be great to know so it can be accounted for in the broader refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it turns out it’s unsafe to move this, it’d be good if we could have a test that tests the underlying condition we’re concerned about since it looks like all tests pass on this patch. Happy to help to do so, once I understand the issue, presuming I’m not just being overly paranoid here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If it blends on CI, thatis good enough for me
Yeah I mean this is test code and it passes tests... so... good enough for me too. @bdero if you can think of a reason this is a super bad idea, please shout and we can find a way to write whatever test we need to write to ensure we don't regress it. |
…159015) Roll Flutter Engine from 619804c0fbb7 to f649330affa8 (47 revisions) flutter/engine@619804c...f649330 2024-11-16 [email protected] Roll Skia from 1ef3b910e064 to 6b0f264bde33 (6 revisions) (flutter/engine#56635) 2024-11-16 [email protected] Revert "Remove `android_jit_release_x86`." (flutter/engine#56634) 2024-11-15 [email protected] Move SetRenderTargetType to EmbedderTestCompositor (flutter/engine#56626) 2024-11-15 [email protected] Roll Dart SDK from b62dadb14d82 to eccb15756020 (2 revisions) (flutter/engine#56630) 2024-11-15 [email protected] [TextInput] Add TextInputType.webSearch (#15762) (flutter/engine#56428) 2024-11-15 [email protected] [web] Send the correct view ID with semantics actions (flutter/engine#56595) 2024-11-15 [email protected] [macos] early return to suppress clang-tidy warning (flutter/engine#56588) 2024-11-15 [email protected] [Impeller] libImpeller: Tinker on the README to cross reference the SDK and the example. (flutter/engine#56623) 2024-11-15 [email protected] [fuchsia] MaybeRunInitialVsyncCallback should only called once (flutter/engine#56429) 2024-11-15 [email protected] Move mac clangd build from x64 to arm (flutter/engine#56567) 2024-11-15 [email protected] Added assert for opengles thread safety (flutter/engine#56585) 2024-11-15 [email protected] [Impeller] enable OpenGL fallback on Android. (flutter/engine#56591) 2024-11-15 [email protected] [Impeller] Maintain separate queues of GLES operations for each thread in the reactor (flutter/engine#56573) 2024-11-15 [email protected] Roll Dart SDK from abe86ca4eb01 to b62dadb14d82 (2 revisions) (flutter/engine#56615) 2024-11-15 [email protected] Roll Skia from b730eb340852 to 1ef3b910e064 (4 revisions) (flutter/engine#56613) 2024-11-15 [email protected] Roll Fuchsia Linux SDK from JkpuAsLzcmYLzf1iX... to UpSQzyXGUhMfedYIh... (flutter/engine#56611) 2024-11-15 [email protected] Roll Dart SDK from bf0eeb9d929c to abe86ca4eb01 (1 revision) (flutter/engine#56610) 2024-11-15 [email protected] Roll Skia from e5fda8472b21 to b730eb340852 (1 revision) (flutter/engine#56608) 2024-11-15 [email protected] Roll Skia from 8ff65da4b8bf to e5fda8472b21 (1 revision) (flutter/engine#56603) 2024-11-15 [email protected] Move TestMetalContext/Surface to testing namespace (flutter/engine#56602) 2024-11-15 [email protected] Roll Dart SDK from 343b9fc6eafe to bf0eeb9d929c (1 revision) (flutter/engine#56604) 2024-11-15 [email protected] [Impeller] Don't enable KHR_debug on Angle. (flutter/engine#56601) 2024-11-15 [email protected] [Impeller] libImpeller: Reset the GL state when transitioning control back to the embedder. (flutter/engine#56597) 2024-11-15 [email protected] Roll Skia from 8946ea477b42 to 8ff65da4b8bf (2 revisions) (flutter/engine#56600) 2024-11-14 [email protected] [Impeller] Put test components in the testing namespace. (flutter/engine#56594) 2024-11-14 [email protected] [Impeller] libImpeller: Add a warning about OpenGL state being trampled. (flutter/engine#56599) 2024-11-14 [email protected] Embedder: Refactor EmbedderConfigBuilder by backend (flutter/engine#56598) 2024-11-14 [email protected] Migrate Metal translation units to Obj-C++ (flutter/engine#56592) 2024-11-14 [email protected] Roll Dart SDK from db4d7d52db48 to 343b9fc6eafe (1 revision) (flutter/engine#56590) 2024-11-14 [email protected] iOS,macOS: Build/test test_metal_surface_unittests (flutter/engine#56586) 2024-11-14 [email protected] Roll Skia from 3222456e63dc to 8946ea477b42 (2 revisions) (flutter/engine#56587) 2024-11-14 [email protected] Roll Skia from 16178bf63de7 to 3222456e63dc (3 revisions) (flutter/engine#56584) 2024-11-14 [email protected] [Android] Fix Slider semantics double tap behaviors (flutter/engine#56452) 2024-11-14 [email protected] Roll Dart SDK from a3b6652100c8 to db4d7d52db48 (1 revision) (flutter/engine#56581) 2024-11-14 [email protected] Move Vulkan context to EmbedderTestContextVulkan (flutter/engine#56571) 2024-11-14 [email protected] Roll Skia from a076435073fc to 16178bf63de7 (1 revision) (flutter/engine#56579) 2024-11-14 [email protected] Roll Skia from 70553189e4e8 to a076435073fc (1 revision) (flutter/engine#56577) 2024-11-14 [email protected] Roll Skia from fa52f2c1ddba to 70553189e4e8 (1 revision) (flutter/engine#56576) 2024-11-14 [email protected] Roll Dart SDK from 3f05b3540cb2 to a3b6652100c8 (3 revisions) (flutter/engine#56575) 2024-11-14 [email protected] Roll Skia from ddbd8d1cb8d8 to fa52f2c1ddba (3 revisions) (flutter/engine#56574) 2024-11-14 [email protected] [Android] choose 24 bit depth buffer. (flutter/engine#56553) 2024-11-14 [email protected] Roll Skia from 3750b8939c7f to ddbd8d1cb8d8 (1 revision) (flutter/engine#56562) 2024-11-14 [email protected] Move FlMouseCursorHandler from FlView to FlEngine (flutter/engine#56026) 2024-11-14 [email protected] [Impeller] force software resize usage for GLES backend. (flutter/engine#56511) 2024-11-14 [email protected] Roll Dart SDK from 66ab1774bfe9 to 3f05b3540cb2 (2 revisions) (flutter/engine#56564) 2024-11-14 [email protected] Embedder: Refactor EmbedderTestContext creation (flutter/engine#56563) ...
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
In #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.
Issue: flutter/flutter#158998
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.