Skip to content

iOS: Deprecate and remove read/write FlutterEngine.isGpuDisabled from public API #191347

Open

Description

@cbracken

Background

FlutterEngine.isGpuDisabled is currently exposed as a public read/write property on FlutterEngine in the iOS framework API (FlutterEngine.h).

This property is used internally by the engine to track whether the app currently has access to the GPU. We update it on lifecycle transitions between foreground and background, as well as on startup and when the view is mounted/unmounted from the view hierarchy.

This state management was orginally added to prevent GPU work from running on the IO thread pool when the application loses access to the GPU. While we do need to expose a read/write property for tests, there was no clear need for it to be exposed as public API, and should have been exposed on FlutterEngine_Internal.h.

Why deprecate/delete?

Because isGpuDisabled is a public read/write property, end-users can interfere with the engine's automatically managed GPU state. Of the two (non-no-op) state transitions, both are bad:

  • Setting YES -> NO: If a user forces the GPU enabled while the app is backgrounded, it will crash (iOS kills apps attempting to use OpenGL/Metal in the background).
  • Setting NO -> YES: If a user disables the GPU while the app is foregrounded, the view will stop responding and hang.

We haven't been able to identify any legitimate use cases where an end user would need to control this property directly. If an app needs to know whether the app is backgrounded, they can determine this from first principles using standard iOS APIs (e.g. observing UIApplication or UIScene lifecycle events), rather than polling or modifying the engine's internal state.

Proposal

  1. Deprecate it: Mark the isGpuDisabled property as deprecated in FlutterEngine.h and expose in FlutterEngine_Internal.h for tests.
  2. Delete it: In a future major release, remove the property from the public API entirely.

Activity

  1. self-assigned this
    on Aug 19, 2026
  2. added
    platform-iosiOS applications specifically
    P2Important issues not at the top of the work list
    c: tech-debtTechnical debt, code quality, testing, etc.
    team-iosOwned by iOS platform team
    on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions