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

Windows: Texture Registrar: Destroy textures on raster thread #33688

Conversation

jnschulze
Copy link
Member

Fixes an issue with FlutterWindowsTextureRegistrar::UnregisterTexture destructing external textures on the calling thread as opposed to the raster thread which causes a potential crash upon calling glDeleteTextures in the destructors of both ExternalTexturePixelBuffer and ExternalTextureD3d .

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

@jnschulze jnschulze force-pushed the windows-destroy-external-textures-on-raster-thread branch from 7592542 to 2848b11 Compare May 29, 2022 14:52
@jnschulze jnschulze requested a review from cbracken May 29, 2022 15:35
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for identifying the race condition. Left some notes and requests for thoughts from Stuart and Chinmay.

@jnschulze jnschulze force-pushed the windows-destroy-external-textures-on-raster-thread branch 3 times, most recently from 6806eca to a2dd035 Compare September 8, 2022 11:49
@jnschulze jnschulze requested a review from cbracken September 8, 2022 12:57
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM stamp from a Japanese personal seal

lgtm modulo one nit. Thanks!

@jnschulze jnschulze force-pushed the windows-destroy-external-textures-on-raster-thread branch from 3b96677 to 6e03fd3 Compare September 8, 2022 22:12
Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice work!

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 8, 2022
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 8, 2022
@auto-submit
Copy link
Contributor

auto-submit bot commented Sep 8, 2022

auto label is removed for flutter/engine, pr: 33688, due to - The status or check suite Mac iOS Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 9, 2022
@jnschulze jnschulze deleted the windows-destroy-external-textures-on-raster-thread branch September 10, 2022 08:42
stuartmorgan-g added a commit to flutter/plugins that referenced this pull request Sep 13, 2022
Rolls Flutter master to the version that first failed due to flutter/engine#33688

Updates the camera_windows mocks to include the new method so that the tests will compile on master.

Fixes the blocked roll.
cfontas pushed a commit to cfontas/engine that referenced this pull request Sep 14, 2022
Oleh-Sv pushed a commit to Oleh-Sv/engine that referenced this pull request Sep 28, 2022
adam-harwood pushed a commit to adam-harwood/flutter_plugins that referenced this pull request Nov 3, 2022
Rolls Flutter master to the version that first failed due to flutter/engine#33688

Updates the camera_windows mocks to include the new method so that the tests will compile on master.

Fixes the blocked roll.
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Rolls Flutter master to the version that first failed due to flutter/engine#33688

Updates the camera_windows mocks to include the new method so that the tests will compile on master.

Fixes the blocked roll.
engine-flutter-autoroll pushed a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 22, 2023
Rolls Flutter master to the version that first failed due to flutter/engine#33688

Updates the camera_windows mocks to include the new method so that the tests will compile on master.

Fixes the blocked roll.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants