-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/engine
#55323Closed
Copy link
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: desktopRunning on desktopRunning on desktopc: regressionIt was better in the past than it is nowIt was better in the past than it is nowe: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Problem
flutter/engine#49726 breaks Windows's support for Impeller. We should update Impeller so that it can be used on Windows again. /cc @jonahwilliams
Crash call stack:
flutter::`anonymous namespace'::GetOpenGLRendererConfig::<lambda_27>::__invoke(void * user_data, const FlutterFrameInfo * info)
InferOpenGLPlatformViewCreationCallback::<lambda_4>::operator()(...)
...
flutter::EmbedderSurfaceGLImpeller::GLContextFBO(...)
flutter::GPUSurfaceGLImpeller::AcquireFrame(...)
flutter::Rasterizer::DrawToSurfaceUnsafe(...)
flutter::Rasterizer::DrawToSurfacesUnsafe(...)
flutter::Rasterizer::DrawToSurfaces(...)
flutter::Rasterizer::DoDraw(...)
flutter::Rasterizer::Draw::<lambda>(...)
...
flutter::Pipeline<flutter::FrameItem>::Consume(...)
flutter::Rasterizer::Draw(...)
flutter::Shell::OnAnimatorDraw::<lambda_37>::operator()()
...
The crashing lambda is Flutter Windows's FlutterOpenGLRendererConfig.fbo_with_frame_info_callback.
Root cause
GPUSurfaceGLImpeller::AcquireFrame always uses FlutterOpenGLRendererConfig.fbo_with_frame_info_callback to get an FBO.
This is incorrect if the embedder has registered a FlutterCompositor. Instead, GPUSurfaceGLImpeller should use backing stores (FlutterOpenGLTexture or FlutterOpenGLFramebuffer) created by the FlutterCompositor.
This fix is also necessary for Linux support as its embedder also registers a FlutterCompositor.
How to enable Impeller when launching a Flutter Windows app under a debugger
Update your .exe's launch configuration:
- Use
--enable-impeller=trueas your arguments - Add the following environment variables:
FLUTTER_ENGINE_SWITCHES:1FLUTTER_ENGINE_SWITCH_1:enable-impeller=true
ufrshubham, rshah-extron, chances, obiwanzenobi, adeshpande-extron and 3 moreRastislavMirek
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: desktopRunning on desktopRunning on desktopc: regressionIt was better in the past than it is nowIt was better in the past than it is nowe: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team