clients icon indicating copy to clipboard operation
clients copied to clipboard

[PS-1196] Add option to disable hardware acceleration

Open evelez7 opened this issue 3 years ago • 2 comments

Type of change

- [ ] Bug fix
- [x] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Address #2615 which requests an option to disable hardware acceleration in the desktop application.

Code changes

Desktop

  • /accounts/settings.component.html - Add checkbox to toggle hardware acceleration in application settings
  • /accounts/settings.component.ts - Add enableHardwareAcceleration member boolean and text variables. Also initialize along with other members and add a save function for when checkbox is used in settings. It is initialized as true by default.
  • locales/en(/en_GB/en_IN)/messages.json - Add text for the checkbox option
  • main.ts - Add an async function to toggle hardware acceleration. The function must wait for the Promise from stateService for the setting on hardware acceleration. It is called as the first line in main.bootstrap().

Common

  • /abstractions/state.service.ts - Add get/set enableHardwareAcceleration declarations.
  • /models/domain/globalState.ts - Add enableHardwareAcceleration boolean.
  • /services/stateMigration.service.ts - Add enableHardwareDeclaration string key and line to initialize the variable in globals.
  • /services/state.service.ts - Define get/set enableHardwareAcceleration, similar to other functions in that file.

Screenshots

bitwarden_toggled bitwarden_toggled_off bitwarden_zoomed

Before you submit

- [x] I have checked for **linting** errors (`npm run lint`) (required)
- [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required)
- [ ] This change requires a **documentation update** (notify the documentation team)
- [ ] This change has particular **deployment requirements** (notify the DevOps team)

evelez7 avatar Jun 11 '22 17:06 evelez7

Hi @evelez7,

Apologies for the late review, I think this change in general is appriciated but the number of people that have issuse with hardware acceleration is far outnumbered by those it helps. Can we invert the condition, and have HW acceleration be enabled by default.

Hinton avatar Oct 07 '22 06:10 Hinton

Can we invert the condition, and have HW acceleration be enabled by default.

Just pushed a commit to fix this @Hinton.

evelez7 avatar Oct 07 '22 23:10 evelez7

We can’t merge your pull request until you make the changes we’ve requested. As we haven’t heard from you recently, this pull request will be closed.

If you’re still working on this, please respond here after you’ve made the changes we’ve requested and our team will re-open it for further review.

Please make sure to resolve any conflicts with the master branch before requesting another review.

github-actions[bot] avatar Jan 10 '23 05:01 github-actions[bot]