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

Conversation

@gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Dec 4, 2024

issue: flutter/flutter#159745

#56927 introduced untracked handles, but naming them didn't work. This adds a test to make sure they work. I kept naming thread-safe since it isn't happening often anyways.

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 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.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke marked this pull request as draft December 4, 2024 22:00
@gaaclarke gaaclarke force-pushed the name-untracked-handles branch 2 times, most recently from fa7f8bf to d7eaf82 Compare December 4, 2024 22:12
@gaaclarke gaaclarke marked this pull request as ready for review December 4, 2024 22:13
@gaaclarke gaaclarke marked this pull request as draft December 4, 2024 22:16
@gaaclarke gaaclarke force-pushed the name-untracked-handles branch 2 times, most recently from dbe414f to 11189f6 Compare December 4, 2024 22:25
@gaaclarke gaaclarke force-pushed the name-untracked-handles branch from 11189f6 to d98c37e Compare December 4, 2024 22:26
@gaaclarke gaaclarke marked this pull request as ready for review December 4, 2024 22:28
handle.untracked_id_.value(), std::string(label)));
} else {
if (auto found = handles_.find(handle); found != handles_.end()) {
found->second.pending_debug_label = label;
Copy link
Member Author

Choose a reason for hiding this comment

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

We can't just store this in handles_to_name_ right now since the thing might not have been created yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the untracked handles are created immediately, why do we need to go through the reactor managed labeling at all? Can we use a different labeling function that calls the debug label methods directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can and I originally implemented it that way. I was thinking these would just get called once in a while so we might as well keep the same semantics, but there are things that we create each frame isn't there? So maybe I should switch it back.

Copy link
Contributor

Choose a reason for hiding this comment

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

We do a lot of a labeling. it should be mostly switched off in release mode but it will still get in the way for profile mode.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW I'm not sure where we will land on this. I am seeing code trying to create DeviceBufferGLES from threads that can't react. That's weird to me since we store ops based on the thread. I'm still sorting through this. This is good for now though.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 5, 2024
FML_DCHECK(CanReactOnCurrentThread());
const auto& gl = GetProcTable();
gl.SetDebugLabel(ToDebugResourceType(handle.GetType()),
handle.untracked_id_.value(), std::string(label));
Copy link
Contributor

Choose a reason for hiding this comment

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

oh wait, can we make this function use a string_view? Right now its using a const string ref, so it should be free to switch it out.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@gaaclarke gaaclarke removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 5, 2024
@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 5, 2024
@auto-submit auto-submit bot merged commit 4237b52 into flutter:main Dec 5, 2024
31 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 5, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Dec 5, 2024
…159836)

flutter/engine@8d3c718...05e2d65

2024-12-05 jonahwilliams@google.com [Impeller] store GLES bindings on
render pass w/ offsets instead of per-command. (flutter/engine#56910)
2024-12-05 jonahwilliams@google.com [Impeller] avoid re-binding winding
order and cull mode. (flutter/engine#56943)
2024-12-05 30870216+gaaclarke@users.noreply.github.com Implements the
naming of untracked gles handles (flutter/engine#56948)
2024-12-05 skia-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from
VilXq4eGH5A24wRWA... to r9Dc5VRF6sE3pJH20... (flutter/engine#56953)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero@google.com,zra@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
issue: flutter#159745

flutter/engine#56927 introduced untracked handles, but naming them didn't work.  This adds a test to make sure they work.  I kept naming thread-safe since it isn't happening often anyways.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants