cefpython icon indicating copy to clipboard operation
cefpython copied to clipboard

is High Dpi supported on off-screen-rendering mode?

Open wangying3426 opened this issue 4 years ago • 1 comments

The off-screen-rendering mode: off-screen-rendering

The windows mode: window

as we can see, the off-screen-rendering mode is lower resolution than windows handle.

so is there a solution to support High Dpi on off-screen-rendering mode?

and I have try those methods but did not work.

   
    CefEnableHighDPISupport();
    
    command_line->AppendSwitchWithValue("--force-device-scale-factor", "2");

     SetRoomLevel(xx);

wangying3426 avatar Jul 30 '21 09:07 wangying3426

That switch probably affects only windowed rendering mode. It should not include the "--" at the beginning.

There is CefRenderHandler.GetScreenInfo callback in upstream CEF that we haven't yet exposed. It allows to set device scale factor for off-screen rendering.

When are you calling SetZoomLevel? Every time url origin changes it needs to be called again.

cztomczak avatar Jul 30 '21 09:07 cztomczak