Phonegap canvas low refresh rate
I am building a canvas based web game that runs at 60fps in chrome on the desktop. It also runs at 60fps in chrome on android. I loaded it into a phonegap application and the fps meter still reads 60fps, but the screen is only getting drawn every few ticks. Is there a refresh rate limiter that is forcing the webview to only draw every once a second or so? What other things could be limiting my drawing, even when the website says its redrawing at 60fps?
2 Solutions collect form web for “Phonegap canvas low refresh rate”
PhoneGap by default will use the built in default browser, which is not chrome, unless you are working with KitKat, but that is a different story.
Now I had problems myself with the default browser even on small canvas project like getting a user signature, but that was due to low rate of touchevent fires…
Anyway the possible solution will be to force phonegap to use WebChromeClient instead of the default one, you can do that by adding following line before the
Also if your game intend to use acceleration sensor, have a look at what is the native support for browsers: Can I Use resources
Also I will definitely read THIS and THIS
Hope it helped.
Sadly, the new Webview does not have all the same features as Chrome. One of these differences is the WebGL 3D canvas that Chrome uses. See here for a list of feature differences between the new Webview and Chrome.