Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Why Html5 game can't run smoothly in OSR mode?

Post Reply
tad.chen
Posts: 119
Joined: Fri Jan 04, 2019 1:39 am

Why Html5 game can't run smoothly in OSR mode?

Post by tad.chen »

I run the same Html5 game in SimpleBroser and SimpleOSRBrowser, the website is:
https://www.yikm.net/play?id=4137
Some noise is heard from the game when it runs in SimpleOSRBrowser, but no noise in SimpleBroser. It seems that Html5 game can't run smoothly in OSR mode. Why?
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Why Html5 game can't run smoothly in OSR mode?

Post by salvadordf »

Hi,

Try enabling hardware acceleration with the GlobalCEFApp.EnableGPU property.

Web browsers in OSR mode are always slower than browsers in normal mode because the web contents are rendered in a much different way.
tad.chen
Posts: 119
Joined: Fri Jan 04, 2019 1:39 am

Re: Why Html5 game can't run smoothly in OSR mode?

Post by tad.chen »

Hi,
It's the same no matter whether the GlobalCEFApp.EnableGPU property is enabled or not.
tad.chen
Posts: 119
Joined: Fri Jan 04, 2019 1:39 am

Re: Why Html5 game can't run smoothly in OSR mode?

Post by tad.chen »

Hi,

Can One Browser support both OSR mode and No-OSR mode? For example, one tab runs in OSR mode, but another tab runs in No-OSR mode.
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Why Html5 game can't run smoothly in OSR mode?

Post by salvadordf »

The PopupBrowser demo uses that configuration.
Lazarus has some issues destructing the browsers in that configuration.
tad.chen
Posts: 119
Joined: Fri Jan 04, 2019 1:39 am

Re: Why Html5 game can't run smoothly in OSR mode?

Post by tad.chen »

Thank you for your information! It do can run OSR based chrmosr with No-OSR based chrmosr in one app like PopupBrowser.

But, It seams that only popup chrmosr can change OSR mode. Can default chrmosr do that?
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Why Html5 game can't run smoothly in OSR mode?

Post by salvadordf »

You can only set a browser in OSR mode before the TChromiumCore.CreateBrowser call.
It's not possible to change the mode after the browser has been created.
tad.chen
Posts: 119
Joined: Fri Jan 04, 2019 1:39 am

Re: Why Html5 game can't run smoothly in OSR mode?

Post by tad.chen »

Thank you!
Post Reply