-
-
Notifications
You must be signed in to change notification settings - Fork 13
perf-test: check GPU feature compatibility #142
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
base: main
Are you sure you want to change the base?
perf-test: check GPU feature compatibility #142
Conversation
remove WebGPU option from option list if it is not available
be9507f
to
b663e09
Compare
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds runtime detection of WebGPU availability to conditionally display the ThorVG(WebGPU) option in the performance test interface. The change prevents users from selecting an unsupported rendering option when WebGPU is not available in their browser.
- Replaces static player options array with dynamic generation based on feature detection
- Adds WebGPU availability check using the Navigator API
- Filters out WebGPU option when the feature is not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check comment and copilot reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@Howl-Kim is attempting to deploy a commit to the thorvg-web Team on Vercel. A member of the Team first needs to authorize it. |
2196e6d
to
86ee654
Compare
//{ id: 4, name: `lottie-web@${reactLottiePlayerPkg.dependencies["lottie-web"]}` }, | ||
//{ id: 5, name: 'skia/skottie' }, | ||
]; | ||
const playerOptions = createAvailablePlayerOptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
const playerOptions = playerOptions = [
{ id: 1, name: 'ThorVG(Software)' }
];
if (navigator.gpu) {
playerOptions.push({ id: 2, name: 'ThorVG(WebGPU)' });
}
Changes
Result
Chrome (v139.0.7258.139)
Safari (v18.6)