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

Fix a leak of the resource EGL context on Android#26789

Merged
fluttergithubbot merged 1 commit into
flutter-team-archive:masterfrom
jason-simmons:bug_84702
Jun 17, 2021
Merged

Fix a leak of the resource EGL context on Android#26789
fluttergithubbot merged 1 commit into
flutter-team-archive:masterfrom
jason-simmons:bug_84702

Conversation

@jason-simmons

Copy link
Copy Markdown
Contributor

ResourceContextClearCurrent had been calling AndroidContextGL::ClearCurrent
using the primary context. However, AndroidContextGL::ClearCurrent
does nothing if the thread's current EGL context does not match the
expected context.
This was an attempt to avoid overwriting other EGL contexts that might
be used on the platform thread (see flutter/flutter#19566).
But the IO thread is owned by Flutter, and its context should always be
cleared.

Fixes flutter/flutter#84702

ResourceContextClearCurrent had been calling AndroidContextGL::ClearCurrent
using the primary context.  However, AndroidContextGL::ClearCurrent
does nothing if the thread's current EGL context does not match the
expected context.
This was an attempt to avoid overwriting other EGL contexts that might
be used on the platform thread (see flutter/flutter#19566).
But the IO thread is owned by Flutter, and its context should always be
cleared.

Fixes flutter/flutter#84702
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla google-cla Bot added the cla: yes label Jun 17, 2021

@blasten blasten left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@jason-simmons jason-simmons added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jun 17, 2021
@fluttergithubbot fluttergithubbot merged commit 42d391d into flutter-team-archive:master Jun 17, 2021
flar pushed a commit to flutter/flutter that referenced this pull request Jun 18, 2021
* 7e449ce Roll Skia from fab6ede2ec1d to 33da72d168d7 (24 revisions) (flutter-team-archive/engine#26790)

* 9d2ab41 Fix windows keyboard: Extended key, delegate order (flutter-team-archive/engine#26757)

* e3f4f2b Roll Dart SDK from 2084c5eeef79 to 914b1c6d1c88 (4 revisions) (flutter-team-archive/engine#26792)

* 4754a23 Roll Skia from 33da72d168d7 to 491282486e34 (1 revision) (flutter-team-archive/engine#26793)

* 6a7f1a9 Roll Skia from 491282486e34 to b2cb817d23d0 (4 revisions) (flutter-team-archive/engine#26795)

* 42d391d Fix a leak of the resource EGL context on Android (flutter-team-archive/engine#26789)

* 4f89b26 Roll Dart SDK from 914b1c6d1c88 to 369366069b83 (1 revision) (flutter-team-archive/engine#26799)

* 6e9444b Roll Skia from b2cb817d23d0 to e8502cc73c5d (5 revisions) (flutter-team-archive/engine#26801)

* 86dacc0 Revert "Support scrolling in iOS accessibility (#26671)" (flutter-team-archive/engine#26803)

* 0cbaa80 Disable Skia reduceOpsTaskSplitting option (flutter-team-archive/engine#26568)

* b9761b2 Roll Skia from e8502cc73c5d to 8e814b3be082 (6 revisions) (flutter-team-archive/engine#26805)

* e274d31 Remove autoninja calls from the analyze script. (flutter-team-archive/engine#26752)

* 399917c Revert "Remove autoninja calls from the analyze script. (#26752)" (flutter-team-archive/engine#26812)

* b9616ca Roll Dart SDK from 369366069b83 to 0796dd6c7bcf (1 revision) (flutter-team-archive/engine#26807)
wqyfavor pushed a commit to wqyfavor/engine that referenced this pull request Jun 21, 2021
naudzghebre pushed a commit to naudzghebre/engine that referenced this pull request Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Development

Successfully merging this pull request may close these issues.

We found a serious File descriptor Leak problem which causes application crash

3 participants