Skip to content

Commit

Permalink
Option to disable hardware acceleration on Element Desktop (#22295)
Browse files Browse the repository at this point in the history
Override ElectronPlatform to support disableHardwareAcceleration
  • Loading branch information
novocaine authored May 23, 2022
1 parent 6c7f663 commit 11a3011
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/vector/platform/ElectronPlatform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
return this.ipcCall('setMinimizeToTrayEnabled', enabled);
}

public supportsTogglingHardwareAcceleration(): boolean {
return true;
}

public async getHardwareAccelerationEnabled(): Promise<boolean> {
return this.ipcCall('getHardwareAccelerationEnabled');
}

public async setHardwareAccelerationEnabled(enabled: boolean): Promise<void> {
return this.ipcCall('setHardwareAccelerationEnabled', enabled);
}

async canSelfUpdate(): Promise<boolean> {
const feedUrl = await this.ipcCall('getUpdateFeedUrl');
return Boolean(feedUrl);
Expand Down

0 comments on commit 11a3011

Please sign in to comment.