Skip to content

Commit 11a3011

Browse files
authored
Option to disable hardware acceleration on Element Desktop (#22295)
Override ElectronPlatform to support disableHardwareAcceleration
1 parent 6c7f663 commit 11a3011

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/vector/platform/ElectronPlatform.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
414414
return this.ipcCall('setMinimizeToTrayEnabled', enabled);
415415
}
416416

417+
public supportsTogglingHardwareAcceleration(): boolean {
418+
return true;
419+
}
420+
421+
public async getHardwareAccelerationEnabled(): Promise<boolean> {
422+
return this.ipcCall('getHardwareAccelerationEnabled');
423+
}
424+
425+
public async setHardwareAccelerationEnabled(enabled: boolean): Promise<void> {
426+
return this.ipcCall('setHardwareAccelerationEnabled', enabled);
427+
}
428+
417429
async canSelfUpdate(): Promise<boolean> {
418430
const feedUrl = await this.ipcCall('getUpdateFeedUrl');
419431
return Boolean(feedUrl);

0 commit comments

Comments
 (0)