要启用此模式,必须通过调用 app.disableHardwareAcceleration()
API 来禁用GPU加速。
使用
const {app, BrowserWindow} = require('electron') app.disableHardwareAcceleration() let win app.once('ready', () => { win = new BrowserWindow({ webPreferences: { offscreen: true } }) win.loadURL('http://github.com') win.webContents.on('paint', (event, dirty, image) => { // updateBitmap(dirty, image.getBitmap()) }) win.webContents.setFrameRate(30) })
标签:Electron
相关阅读 >>
更多相关阅读请进入《Electron》频道 >>

Vue.js 设计与实现 基于Vue.js 3 深入解析Vue.js 设计细节
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
相关推荐
评论
管理员已关闭评论功能...