【问题标题】:Chrome version 80 fps of webgl downgrade in mac osmac os 中的 Chrome 版本 80 fps 的 webgl 降级
【发布时间】:2020-03-11 10:06:48
【问题描述】:

我有一个游戏是用 Cocos js 做的。 在以前版本的 chrome (79) fps 始终为 60,但是当我更新新版本 chrome (80) 时 fps 变慢,并且在 mac 中 cpu 使用率非常高。但是当我在“节能”中关闭“自动图形切换”时,fps有60。

我已经下载了79版本进行复现,fps性能还可以。

Firefox 没有这个问题。

那么有人知道怎么解决吗?

谢谢

【问题讨论】:

  • 您是否尝试过将powerPreference: 'highPerformance' 传递给getContext

标签: google-chrome webgl frame-rate cocos2d-js


【解决方案1】:

我在同一条船上。将powerPreference: 'high-performance'(连字符)添加到我的上下文创建参数中修复了它。

例子:

canvas.getContext('webgl', { alpha: false, antialias: true, powerPreference: 'high-performance', });

此公告包含更多信息: https://www.khronos.org/webgl/public-mailing-list/public_webgl/1912/msg00001.php

这里有更多关于 powerPreference 参数的详细信息:https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2.1

【讨论】:

    猜你喜欢
    • 2014-09-12
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 1970-01-01
    • 2023-03-06
    • 1970-01-01
    • 2021-11-27
    • 2023-03-23
    相关资源
    最近更新 更多