-
Notifications
You must be signed in to change notification settings - Fork 30.6k
[Android] Add opaque hybrid composition mode #128198
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: solvedIssue is closed as solvedIssue is closed as solvedteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: solvedIssue is closed as solvedIssue is closed as solvedteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is there an existing issue for this?
Use case
This ticket provides a description of two pull requests in the Flutter repository:
PR framework: #128193
PR engine: flutter-team-archive/engine#42550
Use case: The current implementation of Hybrid Composition mode in Android involves splitting the Flutter UI into two views: the background and overlay views. The platform view is positioned at the center of these views. Additionally, the rasterization task has been moved from the raster thread to the platform thread using raster thread merge. However, this approach has certain drawbacks.
Rendering into each background and overlay view takes a considerable amount of time, especially when rasterization has to compete with other tasks on the platform thread. As a result, the performance of the application suffers when using this mode.
To address these performance issues, I propose a new mode that retains the same functionality as Hybrid Composition mode but offers improved performance.
Proposal
Opaque hybrid composition mode:
Some limitations:
Demo project:
https://github.com/XuanTung95/test_opaque_hybrid_composition
How to test:
XRecorder_04062023_172928.1.mp4