-
Notifications
You must be signed in to change notification settings - Fork 16.9k
feat: add app.isHardwareAccelerationEnabled()
#47614
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
Conversation
bf13304 to
ee82128
Compare
jkleinsc
left a comment
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.
I think this API should only return true if hardware acceleration is currently turned off and the dependency on the flag disable_hw_acceleration_ means that it might not be true
ee82128 to
3ba2bd4
Compare
erickzhao
left a comment
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.
API LGTM
|
It sounds like there are more than two possible states for hardware acceleration:
If we just implement a single function that returns a boolean, we're dropping potentially useful information about the state of hardware acceleration. My suggestion would be to provide two functions which can be combined to get a richer snapshot of the state of hw acceleration. |
jkleinsc
left a comment
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.
API LGTM
3ba2bd4 to
b117b5c
Compare
|
Release Notes Persisted
|
|
I have automatically backported this PR to "37-x-y", please check out #48679 |
|
I have automatically backported this PR to "39-x-y", please check out #48680 |
|
I have automatically backported this PR to "38-x-y", please check out #48681 |
|
I have automatically backported this PR to "36-x-y", please check out #48682 |
* feat: add app.isHardwareAccelerationEnabled() * chore: address review feedback
* feat: add app.isHardwareAccelerationEnabled() * chore: address review feedback
* feat: add app.isHardwareAccelerationEnabled() * chore: address review feedback
* feat: add app.isHardwareAccelerationEnabled() * chore: address review feedback
Description of Change
This PR adds
app.isHardwareAccelerationEnabled(), which can be used to determine whether hardware acceleration has been disabled either on the machine or viaapp.disableHardwareAcceleration().Checklist
npm testpassesRelease Notes
Notes: Added
app.isHardwareAccelerationEnabled()