Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 772142e

Browse files
author
Jonah Williams
authored
[Impeller] disable surface control on API 29. (#55708)
Fixes flutter/flutter#155877 Technically SurfaceControl is supported on API 29 but I've observed enough reported bugs that I'm bumping the constraint to 30. If we had more time to test all of these older devices maybe we could figure out if the problem is something that can be worked around.
1 parent 14b7e28 commit 772142e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

impeller/toolkit/android/surface_control.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ bool SurfaceControl::RemoveFromParent() const {
4848
}
4949

5050
bool SurfaceControl::IsAvailableOnPlatform() {
51-
return GetProcTable().IsValid() &&
51+
auto api_level = android_get_device_api_level();
52+
53+
// Technically SurfaceControl is supported on API 29 but I've observed
54+
// enough reported bugs that I'm bumping the constraint to 30. If
55+
// we had more time to test all of these older devices maybe we could
56+
// figure out what the problem is.
57+
// https://github.com/flutter/flutter/issues/155877
58+
return api_level >= 30 && GetProcTable().IsValid() &&
5259
GetProcTable().ASurfaceControl_createFromWindow.IsAvailable();
5360
}
5461

0 commit comments

Comments
 (0)