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.

Problem with CEFWindowParent resizing.

Post Reply
Alexeich
Posts: 18
Joined: Fri May 29, 2020 12:15 pm

Problem with CEFWindowParent resizing.

Post by Alexeich »

Hello. When I resize (increase) my form with CEFWindowParent on it there are the black edges flashing on the increasing sides. How can I avoid this or change the color to white?
GlobalCEFApp.BackgroundColor doesn't works on this edges.
The SimpleBrowser2 example shows the same issue.
If I don't call ChromiumMain.CreateBrowser(CEFWindowParent) there is no black edge when resizing.
And if CEFWindowParent is not alClient then the black edge is only within CEFWindowParent.
Thank you.
User avatar
salvadordf
Posts: 4083
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Problem with CEFWindowParent resizing.

Post by salvadordf »

Hi,

Those black borders are also visible in the official CEF sample application :
https://cef-builds.spotifycdn.com/cef_binary_103.0.12%2Bg8eb56c7%2Bchromium-103.0.5060.134_windows64_client.tar.bz2

There could also be some room for improvements in TCEFWindowParent and TCEFWinControl to avoid some redrawing but it would be very difficult to have better results that the official sample application.

Just in case, please make sure the graphics card drivers are fully updated. Sometimes outdated drivers can also cause these issues.

If you really need to remove them then consider using a browser in OSR mode.
Alexeich
Posts: 18
Joined: Fri May 29, 2020 12:15 pm

Re: Problem with CEFWindowParent resizing.

Post by Alexeich »

Yes, the same situation in that sample app. Well, thank you(
Alexeich
Posts: 18
Joined: Fri May 29, 2020 12:15 pm

Re: Problem with CEFWindowParent resizing.

Post by Alexeich »

salvadordf wrote: Wed Jul 27, 2022 8:06 pm There could also be some room for improvements in TCEFWindowParent and TCEFWinControl to avoid some redrawing but it would be very difficult to have better results that the official sample application.
By the way may be you could give some advices to decrease redrawing and speed up rendering?
User avatar
salvadordf
Posts: 4083
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Problem with CEFWindowParent resizing.

Post by salvadordf »

Try enabling the hardware acceleration with this code line :

Code: Select all

GlobalCEFApp.EnableGPU := True;
Add it before the GlobalCEFApp.StartMainProcess call in the DPR file.
Alexeich
Posts: 18
Joined: Fri May 29, 2020 12:15 pm

Re: Problem with CEFWindowParent resizing.

Post by Alexeich »

It works, thank you! Not related to black edges, but rendering is much more faster!
Post Reply