Page 1 of 1

CEF3 Choppy Fonts in Off-Screen

PostPosted: Mon Feb 03, 2014 6:20 am
by OrfeasZ
I just recently started using CEF3 for one of my projects, by basically leveraging the off-screen capabilities and then rendering using D3D11.
However, I appear to be having a problem where most fonts are really 'choppy', especially when applied CSS properties like -webkit-transform.

Initially, I thought it was a problem with my rendering pipeling, however I launched cefclient with the --off-screen-rendering-enabled flag, and I got the exact same result.
Other elements, like images and containers, don't seem to be affected so much, even though there's still some visible distortion.

To demonstrate what I am talking about, here's a screenshot of how it looks in non off-screen mode:
Image

And how it looks in off-screen mode:
Image

Any help would be greatly appreciated!

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Mon Feb 03, 2014 10:07 am
by magreenblatt
Off-screen rendering does not support hardware acceleration and consequently does not support 3D CSS. Try creating the off-screen browser without transparency to see if that resolves the font issue.

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Mon Feb 03, 2014 12:03 pm
by OrfeasZ
magreenblatt wrote:Off-screen rendering does not support hardware acceleration and consequently does not support 3D CSS. Try creating the off-screen browser without transparency to see if that resolves the font issue.

Thanks for your reply magreenblatt, however as I previously noted, the result is the same both when 'manually' rendering the buffer from the OnPaint calls, and when using the actual cefclient (which is what is depicted in those screenshots).

In any case, I tried setting the transparency to disable, but it didn't actually prove of any help.

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Mon Feb 03, 2014 12:46 pm
by magreenblatt
What CEF3 version and what OS?

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Mon Feb 03, 2014 12:51 pm
by OrfeasZ
CEF 3.1768.1591 on Windows 8.1.
I also tested this on Windows 7 with no visible difference.

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Mon Feb 03, 2014 1:54 pm
by magreenblatt
Does the problem occur in cefclient without off-screen rendering enabled? If so, does it also occur in Chrome?

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Mon Feb 03, 2014 2:07 pm
by OrfeasZ
The first screenshot is on cefclient without off-screen rendering enabled (also looks like this on regular chrome).
Second screenshot is on cefclient with off-screen rendering enabled.

- Edit -

I turned hw acceleration off in vanilla chrome to see how it would look like, and even though 3d transforms don't exactly work (like you stated), it's still way smoother.

Image

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Tue Jan 20, 2015 8:29 am
by BenjiSBRK
I'm experiencing the same issues, Has anyone found a solution to this ?

EDIT : from what I see, the latest builds of CEF have offscreen rendering working again, and it looks like the problem is fixed. Since I'm still using an old build, would there be much code to change to use the latest build ? (besides changing the class names, that apparently dropped the "Cef" prefix)

Re: CEF3 Choppy Fonts in Off-Screen

PostPosted: Tue Jan 20, 2015 1:02 pm
by magreenblatt
BenjiSBRK wrote:Since I'm still using an old build, would there be much code to change to use the latest build ? (besides changing the class names, that apparently dropped the "Cef" prefix)

That depends on the OS and how old the build you're currently using is. No prefixes have been removed from the C/C++ API.