Repository navigation
Rfc410 prototype - #195336
Draft
mboetger wants to merge 32 commits into
Draft
Rfc410 prototype#195336mboetger wants to merge 32 commits into
mboetger wants to merge 32 commits into
Conversation
…shell surface hooks for RFC 410.0000
…exture, and semantics extensions
…nternal headers (RFC 410.0000)
…, and hybrid composition presubmit failures
knasher
added a commit
to knasher/flutter-sailfish
that referenced
this pull request
Oct 27, 2026
The engine patch added four physical_view_padding_* fields to FlutterWindowMetricsEvent. Flutter's RFC for moving the Android embedder to the embedder API (flutter/rfc#24) proposes the same thing as FlutterEdgeInsets physical_padding, and its draft prototype (flutter/flutter#195336) adds it in the same place. The engine patch and embedder patch 0014 now use that layout, read and checked as the prototype does, so our patch can be dropped once Flutter ships it. The runtime spec looks for the new field. Tested on Jolla Phone 2026, Sailfish 5.2.0.20, in a sandboxed copy of an app
…message routing, and order Hybrid Composition EGL presentation - Guard `extern "C" __attribute__((weak)) FlutterEngineGetProcAddresses` and its direct call with `#if defined(__ELF__)` in `android_engine_group.cc`, `android_vm_init.cc`, `android_vsync_waiter.cc`, and `flutter_embedder_native.cc` so Mach-O (`ld64.lld`) and PE/COFF host unit test binaries resolve the proc table via `fml::NativeLibrary::CreateForCurrentProcess()`. - Capture `weak_platform_view_` instead of retaining `ui_task_runner` directly in `Shell::OnEngineHandlePlatformMessage` when routing early unhandled platform messages through the platform thread, removing the `_WIN32` `FML_DCHECK(false)` abort in `EmbedderTest.EmbedderPlatformDispatchTableAndImageDecoderInProjectArgs`. - Defer `PresentOnscreenSurface` and `PresentOverlaySurface` into `execute_presentation()` in `AndroidPlatformViewsController::PresentView` so EGL swap buffers run after `OnBeginFrame()` and `OnDisplayPlatformView()` (`convertToImageView()`), and clear/present the onscreen `FlutterImageView` surface when no root layer is present or when `convertToImageView()` switches the onscreen `ANativeWindow*` mid-frame.
…nup, macOS shutdown deadlock, and clang-tidy
- Open the parent directory with `fml::FilePermission::kRead` in `CallbackCache::SaveCacheToDisk()` so `OpenDirectory` on Windows shares read/write/delete access (`GetShareFlags(kRead)`) instead of failing with `ERROR_SHARING_VIOLATION` (`32`) when `ScopedTemporaryDirectory` holds an open directory handle.
- Clean up `custom_asset_resolver_.user_data` in `FlutterEmbedderNative` and invoke `custom_asset_resolvers[i]->destruction_callback` and `PlatformMessageReleaseResponseHandle`'s `data_callback` in `flutter_embedder_native_unittests.cc` to resolve LeakSanitizer failures on `Linux linux_unopt`.
- Use `std::recursive_mutex`, retain `shared_from_this()`, and copy `std::function` callbacks onto the stack in `PlatformViewEmbedder::EmbedderPlatformMessageHandler` and `PlatformViewEmbedder` so synchronous engine teardown inside a platform message callback (`FlutterEngineTest.ResponseAfterEngineDied`) does not self-deadlock or access destroyed state.
- Value-initialize `flutter::GPUMTLTextureInfo texture_info = {}` and pass `on_make_current` / `on_clear_current` by `const&` in `MakeRenderTargetFromBackingStoreImpeller` in `embedder.cc` to satisfy `mac_clang_tidy`.
… shuts down engine
…remove nativeGetBitmap
… message response lifetime
…e, and merge UI/platform thread
# Conflicts: # engine/src/flutter/shell/platform/android/android_shell_holder.cc
…and support Vulkan validation layers
…in FlutterEngineGroup spawn
…ons, and cross-thread message dispatch - Marshal EmbedderEngine::SendPlatformMessage onto the platform task runner via fml::TaskRunner::RunNowOrPostTask so background JNI callers do not dereference the UI-thread-bound Engine WeakPtr during teardown. - Enable Impeller optional Vulkan device extensions (VK_EXT_image_compression_control, VK_EXT_image_compression_control_swapchain, VK_KHR_sampler_ycbcr_conversion, AHB/foreign queue) and chained feature structs in AndroidSurfaceControl::InitializeVulkan so root surface and SurfaceControl overlays use matching AFRC fixed-rate compression formats on Mali GPUs. - Destroy cached C++ overlay surfaces (10000+) and controller overlay state when the root window is destroyed or detached, and guard PlatformViewsController2.createOverlaySurface() when flutterView or rootSurfaceControl is null. - Drain expired platform fml::MessageLoop tasks in FlutterEmbedderNative::RunOnRasterThreadSynchronously while waiting on the raster latch to prevent AB-BA deadlocks with AndroidPlatformViewsController::PresentView.
# Conflicts: # engine/src/flutter/shell/platform/android/android_context_dynamic_impeller.cc # engine/src/flutter/shell/platform/android/android_context_vk_impeller.cc
- Fix clang-analyzer-core.StackAddressEscape in flutter_embedder_native_unittests.cc by storing FakeSpawnJniState and CrossThreadTestState::platform_task_executed by value in static test state instead of storing pointers to local stack variables. - Fix Android NDK jni.h compilation in flutter_shell_native_unittests by deducing the JNIEnv::functions table type via decltype instead of hardcoding JNINativeInterface_. - Reorder FlutterEmbedderNative private fields in flutter_embedder_native.h to match clang-analyzer-optin.performance.Padding optimal layout (2 padding bytes vs 34). - Merge upstream b5879a3 and update AndroidTaskRunners thread affinity back to fml::CpuAffinity::kNotEfficiency.
… using synthetic test_env_
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.