CEF - without rendering

Viewed 254

Please explain to me how you can use CEF without rendering pages?

That is, it is necessary that the memory buffer for rendering is not allocated at all.

It seems to write that there is a method CefBrowserHost::Was Hidden - which hides the browser window and the window rendering does not occur.

I use this method:

void OnAfterCreated(CefRefPtr<CefBrowser>my_CefRefPtr) override
{
    CEF_REQUIRE_UI_THREAD();

    CefRefPtr<CefBrowserHost> CefBrowserHost_ = (*my_CefRefPtr).GetHost();

    (*CefBrowserHost_).WasHidden(true);   //hiding the window
}

However, CEF fails:

[0211/221935.695:FATAL:alloy_browser_host_impl.cc(575)] Check failed: false. Window rendering is not disabled

I don't understand what's wrong? Why the error ?

1 Answers

The error is pretty clear. When you create a new cef browser, make it using off-screen rendering.

windowInfo.SetAsWindowless(nullptr);
my_CefRefPtr = CefBrowserHost::CreateBrowser(windowInfo, /* whatever */);
Related