[Solved] `--disable-features` breaks offscreen rendering

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

[Solved] `--disable-features` breaks offscreen rendering

Postby Benjamin » Tue Jan 07, 2020 12:05 pm

I am trying to make off-screen rendering work in an application where I have :

Code: Select all
    commandLine->AppendSwitchWithValue("disable-features", "NetworkService");


However, it seems this very line breaks the off-screen rendering. If I remove the line or replace "NetworkService" with an empty string ("") everything works.
However, if I replace "NetworkService" by any non-empty string, it does not work.

When it does not work the function OnPaint() is never called, however GetViewRect() is called very often.
Last edited by Benjamin on Wed Jan 08, 2020 5:00 am, edited 1 time in total.
Benjamin
Techie
 
Posts: 10
Joined: Mon Nov 04, 2019 6:05 am

Re: `--disable-features` breaks offscreen rendering

Postby magreenblatt » Tue Jan 07, 2020 12:18 pm

What OS and CEF version? Look at the renderer process command line to see what disable-features value is passed by default, and make sure you include that value when manually setting disable-features.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: `--disable-features` breaks offscreen rendering

Postby Czarek » Tue Jan 07, 2020 1:59 pm

Does it also break app in cefclient sample application? If you add it in OnBeforeCommandLineProcessing then you should check if there is already a switch with such name and append to its value, as Marshall said. Last time I've used OSR with NetworkService disabled I've used multi threaded message loop, so it's worth checking.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: `--disable-features` breaks offscreen rendering

Postby amaitland » Tue Jan 07, 2020 2:56 pm

My understanding was that 3770 was the only branch to support disabling of the network service. You need to disable the viz compositor as well .

NetworkService,VizDisplayCompositor

I'd also suggest disabling the gpu compositor for 3770.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: `--disable-features` breaks offscreen rendering

Postby Benjamin » Wed Jan 08, 2020 4:59 am

Thanks for your help.

Indeed "VizDisplayCompositor" was overwritten when I set "NetworkService".
I changed my code to preserve any value previously set in "disable-features" and it is working.
Benjamin
Techie
 
Posts: 10
Joined: Mon Nov 04, 2019 6:05 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 22 guests

cron