当前位置: 首页 > news >正文

Chromium 硬件加速开关c++

选项页控制硬件加速开关   

1、前端代码

<settings-toggle-button id="hardwareAcceleration"pref="{{prefs.hardware_acceleration_mode.enabled}}"label="$i18n{hardwareAccelerationLabel}"><template is="dom-if" if="[[shouldShowRestart_(prefs.hardware_acceleration_mode.enabled.value)]]"><cr-button on-click="onRestartClick_" slot="more-actions">$i18n{restart}</cr-button></template></settings-toggle-button>

2、c++代码

​
// Set to true if hardware acceleration mode is enabled on this browser.inline constexpr char kHardwareAccelerationModeEnabled[] ="hardware_acceleration_mode.enabled";​

 chrome\browser\gpu\gpu_mode_manager.cc

// static
void GpuModeManager::RegisterPrefs(PrefRegistrySimple* registry) {registry->RegisterBooleanPref(prefs::kHardwareAccelerationModeEnabled, true);registry->RegisterBooleanPref(prefs::kHardwareAccelerationModePrevious, true);
}

修改此kHardwareAccelerationModeEnabled值即可控制。


http://www.mrgr.cn/news/42550.html

相关文章:

  • Redis: 集群高可用之MOVED转向和ASK转向解决方案
  • [云] DockerCoins 练习笔记
  • 电子电路元件器介绍与选型——晶振
  • 基于Apache和Tomcat的负载均衡实验报告
  • 考研论坛平台|考研论坛小程序系统|基于java和微信小程序的考研论坛平台小程序设计与实现(源码+数据库+文档)
  • (C语言贪吃蛇)14.用绝对值方式解决不合理的走位
  • Redis缓存
  • NVIDIA机密计算文档
  • AAA Mysql与redis的主从复制原理
  • 探索画中画视频剪辑:创意无限,轻松实现
  • vue3+vite@4+ts+elementplus创建项目详解
  • HTML详解
  • macos安装git并连接gitCode远程仓库
  • 创建实体类pojo实现Serializable接口
  • 全球最具影响力的思想家颜廷利在中国影响力地位
  • ubuntu * 表达的应用
  • I2C以及OLED屏幕的实际应用
  • 【C++】—— vector模拟实现
  • k8s-集群部署
  • 微智启yolo数据集划分工具免费分享下载