I've found that I can run two separate browser windows with this code
- Code: Select all
browser1 = CefBrowserHost::CreateBrowserSync(window_info1, simpleHandler, url, browser_settings1, nullptr, nullptr);
CefBrowserHost::CreateBrowser(window_info2, simpleHandler, url, browser_settings2, nullptr, nullptr);
But if I change to this
- Code: Select all
browser1 = CefBrowserHost::CreateBrowserSync(window_info1, simpleHandler, url, browser_settings1, nullptr, nullptr);
browser2 = CefBrowserHost::CreateBrowserSync(window_info2, simpleHandler, url, browser_settings2, nullptr, nullptr);
Then I'm back to the flickering and non return from CefDoMessageLoopWork()
I've also tried setting the second browser as a child of the first one but then it is not displayed, even if I change the first not to be a popup.
Am I flogging a dead horse or is it possible in any way to have multiple browsers in separate windows and get a reference to the browser for each?
Alternately is it possible to tile multiple browsers in a single window - with the ability to dynamically create, delete, resize and reposition them? That would actually be my ideal scenario.
The background to my question is that the shared textures patch
https://bitbucket.org/chromiumembedded/cef/issues/2575/viz-implementation-for-osr cannot be updated post Chromium 103 and I am investigating an alternative:
I can use the Windows Graphics Capture API to get the texture from a (Microsoft) window much much faster than I can copy pixels with off screen rendering. I've found it works well even with windows that are drawn off the visible screen so its looking like a viable scheme. But our app requires multiple browsers which we composite into a single frame buffer and I'm stuck on this aspect at the moment.
So any help would be very much appreciated.