Skip to content

'ExternalViewEmbedder::EndFrame' should not be called when layer tree pipeline is empty #98824

@ColdPaleLight

Description

@ColdPaleLight

When the Rasterizer is drawing an empty layer tree pipeline, we should set the RasterStatus to kFailed and not call ExternalViewEmbedder::EndFrame, otherwise there will be side effects.

Here's an example: Test hybrid_android_views failed when flutter/engine#29889 landed.
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_android%20hybrid_android_views_integration_test/3199/overview

Eventually I investigated and found that ExternalViewEmbedder::EndFrame was called when the layer tree pipeline was empty. It caused that the visibility of parentView is incorrectly set to gone:
https://github.com/flutter/engine/blob/b5f48f56bd4e2f5a440b99337636835edef19832/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java#L848

This issue explains why there is an empty layer tree
#98959

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions