Can i always use OSR mode?

Post Reply
ForestListener
Posts: 22
Joined: Sun Jul 07, 2019 1:46 pm

Can i always use OSR mode?

Post by ForestListener » Wed Jul 10, 2019 3:05 pm

Hello.

I think, i've turned OSR mode ON by adding this code:

Code: Select all

GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.EnableHighDPISupport       := True;
Is it enough?

And also i want to know, why OSR mode is not turned on by default? I mean, why not use it always, what is bad in this mode?

Thank you!

User avatar
salvadordf
Posts: 1950
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Can i always use OSR mode?

Post by salvadordf » Wed Jul 10, 2019 4:29 pm

The GlobalCEFApp.WindowlessRenderingEnabled property sets windowless_rendering_enabled in TCefSettings when CEF is initialized.

These are the code comments for windowless_rendering_enabled :
https://bitbucket.org/chromiumembedded/cef/src/45329d05a5e0d96047374decaa6170cdeac9e0d7/include/internal/cef_types.h#lines-206

Code: Select all

  ///
  // Set to true (1) to enable windowless (off-screen) rendering support. Do not
  // enable this value if the application does not use windowless rendering as
  // it may reduce rendering performance on some systems.
  ///

User avatar
salvadordf
Posts: 1950
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Can i always use OSR mode?

Post by salvadordf » Wed Jul 10, 2019 4:31 pm

To create a browser in OSR mode you also need to call TChromium.CreateBrowser without a TCEFWindowParent parameter, and you will need to implement most of the events found in the OSR demos.

ForestListener
Posts: 22
Joined: Sun Jul 07, 2019 1:46 pm

Re: Can i always use OSR mode?

Post by ForestListener » Wed Jul 10, 2019 4:52 pm

salvadordf wrote:
Wed Jul 10, 2019 4:31 pm
To create a browser in OSR mode you also need to call TChromium.CreateBrowser without a TCEFWindowParent parameter, and you will need to implement most of the events found in the OSR demos.
Got it. Thank you.

Post Reply