Skip to content

Update Flutter 3.47.5 - #48

Open
JSUYA wants to merge 29 commits into
flutter-tizen:flutter-3.47.5from
JSUYA:flutter-3.47.5-candidate
Open

JSUYA wants to merge 29 commits into
flutter-tizen:flutter-3.47.5from
JSUYA:flutter-3.47.5-candidate

Conversation

@JSUYA

@JSUYA JSUYA commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

JSUYA and others added 28 commits September 22, 2026 16:50
Stop generating the GLES3 impeller shader variants in shaders.gni.

Flutter 3.44 changed shell/platform/embedder/embedder_surface_gl_impeller.cc
to include the impeller/entity/gles3/* headers and select GLES3 shaders at
runtime via GetShaderMappings(is_gles3). With GLES3 generation disabled those
headers/symbols do not exist, so adapt that consumer here: drop the gles3
includes and always use the GLES2 shader set (valid on GLES3 contexts too).
This keeps the disable-gles3 patch self-consistent.
flutter-tizen/flutter-tizen#554

Added x64 artifacts for x64 emulator support
(Currently, x64 Release mode is only supported on Linux hosts.)
flutter engine's window build uses Window SDKs 10.0.22621.0. window-2025 runner in gitHub actions no longer supports the 10.0.22621.0 SDK.
Add new struct FlutterVulkanTexture  for embedder :
```
typedef struct {
  /// Handle to the VkImage that is owned by the embedder. The engine will
  /// bind this image for writing the frame.
  FlutterVulkanImageHandle image;
  /// The VkDeviceMemory that backs the iamge.
  FlutterVulkanDeviceMemoryHandle image_memory;
  /// The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
  uint32_t format;
  /// User data to be returned on the invocation of the destruction callback.
  void* user_data;
  /// Callback invoked (on an engine managed thread) that asks the embedder to
  /// collect the texture.
  VoidCallback destruction_callback;
  /// Optional parameters for texture height/width, default is 0, non-zero means
  /// the texture has the specified width/height.
  /// Width of the texture.
  size_t width;
  /// Height of the texture.
  size_t height;
} FlutterVulkanTexture;
```
The implement of [texture
source](https://github.com/flutter-tizen/flutter/pull/17/files#diff-7955a8522a753162869f2e8ca0017a83f4854b60800c844202e70c3aa00ff0c9R5-R204)
refer to the solution of android
platform(https://github.com/flutter-tizen/flutter/blob/flutter-3.35.3/engine/src/flutter/impeller/renderer/backend/vulkan/android/ahb_texture_source_vk.cc)

and I have submitted the code [Support render texture for
embedder](xiaowei-guan/embedder@6a94746),
I will create a new PR after[ support vulkan
backend](flutter-tizen/embedder#110) PR
released.
Because Tizen platform don't support hardware key, so we can't create a
cache source to store the gpu resource.
so we should reset the resouce before the frame end.
Inject a small compat header into the custom cross-toolchain command line
so Linux targets built with Tizen sysroots still see __NR_getrandom even
when the sysroot headers do not export it.

This keeps third_party/dart untouched and fixes builds across common Tizen
architectures:
- x86: 355
- x64: 318
- arm: 384
- arm64: 278
Adds artifact generation for x64 builds in a macOS environment.
I tested the build on macOS 26.3 (Tahoe) and M4 Pro (Arm64) using the x64 lib
Store the embedder's destruction_callback / user_data and invoke it in
the destructor to reclaim the VkImage; the Impeller path never released
it. Reset the image view before the callback frees the image.
Reject a null embedder image handle in the texture source constructor
and skip wrapping an invalid source into a TextureVK, returning nullptr
instead of rendering with a half-initialized texture.
The flutter-tizen embedder passes target=GL_TEXTURE_EXTERNAL_OES, so set
the descriptor type to kTextureExternalOES instead of the default 2D.
Download packages from download.tizen.org over HTTPS instead of
plain HTTP, and run the patch command with an argument list and
stdin redirection instead of shell=True string interpolation.
- Null-check the command buffer returned by CreateCommandBuffer()
  before dereferencing it in the Impeller path. It can be null when
  the context is being torn down.
- Fall back to the engine-provided size when the embedder does not
  populate the texture width/height, matching the Skia path.
Fix flutter-tizen/embedder#157
Impeller eagerly sets up the entire set of pipeline state objects (PSOs)
it may need during renderer setup. This works fine on mid to high-end
devices as the setup completes well before the first frame is rendered.

However on low-end devices, not all PSOs may be ready before the first
frame is rendered. Low-end device usually don't have as much available
concurrency and are slower to boot. On these devices, the rendering
thread had to wait for the background compile job to be completed. It
was also observed that the relatively higher priority render thread was
waiting on a background thread to finish a PSO compile job. The PSO
compile job could also be stuck behind another job that was not
immediately needed. This made the situation on low end devices less than
ideal.

flutter#180022, this PR fix PSO stuck
issue for Vulkan on low end devices.
Current PR can fix the PSO stuck issue for GLES on low end devices.
Related issue : flutter#176657

This PR can improve app startup time for impeller+GLES on low-end
devices.
flutter#180022 has provided solution for
impeller + vulkan.

Impeller+GLES has a special case: resource loading cannot be arbitrarily
placed on other threads; it needs to be done on the I/O thread because
this thread shares the context with the GPU thread. Therefore, this PR
introduces the I/O task runner into PipelineCompileQueueGLES. However,
since the I/O task runner may handle other tasks, we cannot put all jobs
into the I/O thread at once. My current solution is to wait for the
previous job to finish before putting the next one into the I/O thread.

Main changes:

Introduce fml::RefPtrfml::TaskRunner into PipelineCompileQueueGLES.
Extract new class PipelineCompileQueueVulkan for vulkan, because the
runners are on different threads.

(cherry picked from commit 92a8430)
- Return null instead of crashing when no rendering context is available
- Derive the Skia color type from the supplied VkFormat instead of
  hardcoding kRGB_888x
- Use kR8G8B8A8UNormInt as the descriptor format for YUV images so
  layout transitions emit a valid aspect mask
…m upstream (flutter#46)

Cherry-picks the 9 follow-up commits after `8274de2425bd` from upstream
PR
[flutter#185723](flutter#185723)
(applied cleanly, no conflicts).

Main changes:

- Avoid running shader compilation tasks after the `Shell` destructor
shuts down the IO thread (adds `fml/task_runner_util`).
- Release the EGL context on the raster and IO threads during engine
shutdown in the embedder library.
- Fix Android / iOS / Fuchsia test build failures and various clang-tidy
issues.
- Fix a race in
`PipelineCompileQueueGLESTest.DestroyQueueWithPendingTasks`.


[flutter#185723](flutter#185723)
will be landed from 3.48, so we won't need to merge this PR again when
upgrading.

---------

Co-authored-by: Jason Simmons <jsimmons@google.com>
@JSUYA
JSUYA marked this pull request as ready for review October 6, 2026 07:50
@JSUYA JSUYA self-assigned this Oct 6, 2026
@JSUYA JSUYA added the enhancement New feature or request label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants