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

Address Comments for Timestamp example #481

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

greggman
Copy link
Collaborator

@greggman greggman commented Dec 5, 2024

It was mentioned that a previous PR did the wrong thing by possibly applying a time more than once per timer query. This PR addresses that issue by making the TimestampQueryManager take a callback at initialization time that is called, only when a value is available. The value is provided to the callback. This pattern is similar to ResizeObserver

I agree with another comment, I kind of feel like it would be more useful to support multiple queries. But, maybe as a sample it's fine to support just 1.

It was mentioned that a previous PR did the wrong thing
by possibly applying a time more than once per timer query.
This PR addresses that issue by making the TimestampQueryManager
take a callback at initialization time that is called, only when
a value is available. The value is provided to the callback.
This pattern is similar to ResizeObserver

I agree with another comment, I kind of feel like it would
be more useful to support multiple queries. But, maybe as a
sample it's fine to support just 1.
Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

LGTM

@kainino0x kainino0x merged commit b056bc1 into webgpu:main Dec 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants