Page 1 of 2

CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 5:25 am
by john123
Hello!

I want to build CEF for arm cortex-a7 GNU/Linux environment without GPU. DRI/DRM/KMS support. Use it for offscreen output to pixelbuf and do custom rendering via framebuffer.
Use case, that I want to try will be embedded UI for LCD/TV output, so I need html,css rendering engine + js VM for scripting, simple animation, etc.

The question is how to customize CEF (actually Chromium) build and exclude thing that I don`t need, like WebRTC, video, audio tags (+codecs) support, printing support and other things that will never be used.
Not all things can be customized via GYP_DEFINES. so I am looking for proper way for build customization, such as I don`t want to make fork, as I don`t have enough resources to keep it up to date.

I believe there are somebody who can point me. Thanks in advance.

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 6:15 am
by magreenblatt
This is generally not supported by Chromium.

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 7:17 am
by john123
Yes, seems so.
Ok. than what if I will build CEF+Chromium as set of dynamic libs. Are all of them will be loaded to RAM or will they be loaded by request? than I can try to use only needed libs.
Because embedded system is not only about small ROM space, it can be solved. but limited amount of RAM.

Or should I forget about CEF for such task at all and switch my attention to some other solution?

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 7:50 am
by magreenblatt
How small ROM/RAM are you talking about?

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 7:55 am
by john123
RAM from 128 Mb up to 512 Mb.
ROM typical 16/32 Mbytes, but here I can change to another hardware and get up to 1Gbyte.

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 8:00 am
by magreenblatt
john123 wrote:RAM from 128 Mb up to 512 Mb.
ROM typical 16/32 Mbytes, but here I can change to another hardware and get up to 1Gbyte.

I don't think you'll find a modern desktop browser that runs well (or at all) with these specs. You might want to look for software that is intentionally targeted at low-end embedded devices.

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 8:28 am
by john123
If ROM storage will be much bigger, what are min RAM size needed to run CEF?
Or do you want to point that Cortex-A7 is not powerful enough?

Idea was that I don`t want to use it as browser, but use as UI renderer. html+css+javascript VM integrated all together with C api easy can be embedded to other software.
Unfortunately there are not out-of-the-box such solution except CEF, WebKit and maybe FF.

I think from first view I didn`t understand CEF properly, it is not at all for embedded platforms, embedded in CEF means that I can embed to some other heavy application.

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 9:04 am
by magreenblatt
john123 wrote:If ROM storage will be much bigger, what are min RAM size needed to run CEF?

I've run Chromium/CEF on a dual-core 1.6Ghz CPU (like an Intel Atom 330) with 2GB RAM. Once Chromium has loaded the performance is decent. I would not recommend running on a single core CPU because Chromium makes heavy use of multiple threads. Even "low end" smartphones are substantially more powerful than that these days, and that's really the "low end" of devices that Chromium targets.

john123 wrote:I think from first view I didn`t understand CEF properly, it is not at all for embedded platforms, embedded in CEF means that I can embed to some other heavy application.

Right. "Embedded" in the case of CEF means that CEF is embedded in some other application.

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 9:09 am
by john123
Now, it is clear, Maybe I will make some experiment running Chromium via ozone/wayland/gtk+ on top of framebuffer, Just to evaluate performance on target platform.
Could you advice me some other solution? What do you think about WebKit and FireFox? Or can we think that it is mostly same in this case?

Re: CEF build customization (excluding not needed modules)

PostPosted: Wed Dec 26, 2018 9:38 am
by magreenblatt
john123 wrote:Could you advice me some other solution? What do you think about WebKit and FireFox? Or can we think that it is mostly same in this case?

There are some projects that claim to optimize WebKit for embedded devices (like https://www.zetakey.com/browser-linux.php) but I have not tried them. Using a Chromium build with just Ozone support (like a build targeting ChromeOS -- not something currently supported by CEF, see here) may offer similar performance.