Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[embedder] Ensure FlutterMetalTexture cleanup call #38038

Merged
merged 2 commits into from
Dec 3, 2022

Commits on Dec 3, 2022

  1. [embedder] Ensure FlutterMetalTexture cleanup call

    This ensures FlutterMetalTexture.destruction_callback gets called.
    
    FlutterRendererConfig.get_next_drawable_callback` holds a callback used
    by the embedder API to request a drawable; in the case of Metal, this
    drawable is a FlutterMetalTexture.
    
    FlutterMetalTexture.destruction_callback should be called when it's safe
    to release resources associated with the FlutterMetalTexture. This
    callback is not currently invoked for textures returned via
    FlutterRendererConfig.get_next_drawable_callback; instead we unpack the
    returned struct and pass it on.
    
    In the compositor codepath, we do create an SkSurface that triggers the
    destruction callback, here:
    https://github.com/flutter/engine/blob/303e26e96561d9b76f2344e97a5fc32eb6dfdb9a/shell/platform/embedder/embedder.cc#L868-L881
    
    Issue: flutter/flutter#116381
    cbracken committed Dec 3, 2022
    Configuration menu
    Copy the full SHA
    7af0c70 View commit details
    Browse the repository at this point in the history
  2. Add destruction test

    cbracken committed Dec 3, 2022
    Configuration menu
    Copy the full SHA
    1e6ac95 View commit details
    Browse the repository at this point in the history