Chrome version 80 fps of webgl downgrade in mac os

865 Views Asked by At

I have a game is made by Cocos js. In the previous version of chrome (79) fps always 60, but when I update new version chrome (80) the fps is slow down, and cpu usage is very high in mac. But when I turn off "Automatic graphics switching" in "Energy Saver", fps has 60.

I already download version 79 for reproduce it, and fps performance is ok.

Firefox don't have this issue.

So any one know how to fix it?

Thank you

1

There are 1 best solutions below

1
awhyte On

I was in the same boat. Adding powerPreference: 'high-performance' (hyphenated) to my context creation params fixed it.

Example:

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

This announcement has a lot more info: https://www.khronos.org/webgl/public-mailing-list/public_webgl/1912/msg00001.php

And there are more details about the powerPreference param here: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2.1