Hardware offscreen render support

Made a cool mod to CEF that you'd like to share with others? Discuss CEF modifications here, and view modifications that others have made.

Re: Hardware offscreen render support

Postby efrencd » Thu Oct 09, 2014 12:43 pm

Hi all,

Is there any place online where I can download a binary version of CEF with this patch already applied?

Thanks!
efrencd
Newbie
 
Posts: 5
Joined: Sun Apr 08, 2012 5:27 pm

Hardware offscreen render support?

Postby phil535 » Sat Mar 28, 2015 8:58 pm

Hello,

I'm new in here and I have some questions about the current state of hardware osr support in CEF3.
I want to use CEF3 for a games graficuserinterface (see Awesomium).
Currenty I'm using CEF3 (Branch 2272) in osr-mode on Linux_x64 but the rendering performance could be better.

My onPaint-Method looks like this:
Code: Select all
    if(SDL_LockTexture(m_texture, nullptr, reinterpret_cast<void**>(&pixels),
        &pitch) == 0)
    {
      // copies whole cef bitmap to sdl texture
      std::memcpy(pixels, buffer,
          resolution[Resolution::WIDTH] * resolution[Resolution::HEIGHT] * 4);
      SDL_UnlockTexture(m_texture);
    }


As you can see, I copy the whole image to my SDL texture. This are on my screen resolution about 10.5mb(2560x1080x4) of pixel data to be copied and this occures on every onPaint call.
I also know the costreduction over dirtyrects method, but this is not a perfect solution if GUI updates a lot.

To my questions now:

Is there already a solution for sharing the cef texture on opengl?
If no, are there any plans to officially support such a kind of mode?
And at all is CEF3 the right tool for my application?

Kind Regards,
Phil
phil535
Newbie
 
Posts: 1
Joined: Sat Mar 28, 2015 3:19 pm

Re: Hardware offscreen render support

Postby feliwir » Mon Nov 09, 2015 2:47 pm

Would be interest about the current state of this aswell (like the dude above me that asked in march)
Kind regards,
feliwir
feliwir
Newbie
 
Posts: 7
Joined: Wed Oct 28, 2015 8:15 am

Re: Hardware offscreen render support

Postby JohnM » Wed Apr 20, 2016 6:46 am

Hi,

Is there any update on this patch to work with CEF - 2526 version? I need off-screen render support for other requirements in project and need to avoid copy.
JohnM
Newbie
 
Posts: 1
Joined: Wed Apr 20, 2016 6:33 am

Re: Hardware offscreen render support

Postby flufy3d » Mon Dec 12, 2016 10:13 am

this patch is very important.
any progress on here?
flufy3d
Newbie
 
Posts: 1
Joined: Mon Dec 12, 2016 10:09 am

Re: Hardware offscreen render support

Postby rndbit » Tue Mar 07, 2017 4:14 am

Reading issue comments i noticed this:
The new implementation supports both GPU compositing and software compositing (used when GPU is not supported or when passing --disable-gpu --disable-gpu-compositing command-line flags). GPU-accelerated features that did not work with the previous off-screen rendering implementation do work with this implementation when GPU support is available.


So offscreen rendering does work by default with latest CEF? Examples still show copying of pixel buffer in OnPaint(). It makes me think that there is gpu(browser)->cpu(cef)->gpu(application) roundtrip every time pixel buffer is to be displayed. Couldnt we get access to a texture used for rendering by a browser so content could be displayed without extra copying?
rndbit
Newbie
 
Posts: 7
Joined: Sat Mar 23, 2013 8:56 am

Re: Hardware offscreen render support

Postby PathogenDavid » Sun Jul 02, 2017 1:40 pm

This thread is from 2014, as is the issue you linked, so I wouldn't consider anything in it completely representative of the current state of CEF. Also, CEF hasn't used Google Code for some time, you should really be looking at the Bitbucket issues if you want more up-to-date info.

As far as I know, your understanding is correct for current iterations of CEF. GPU accelerated content works, but there's still the GPU->CPU->GPU round trip for consumers of the rendered content.

Couldnt we get access to a texture used for rendering by a browser so content could be displayed without extra copying?


In theory, sure, but off-screen rendering is not really a goal of Chromium, so supporting this isn't as easy as it sounds.

The relevant issue for fixing this is #1006, so I'd recommend watching it if you want updates on this issue. Unfortunately it does not look like anyone has worked on it for some time. The feature was implemented at one point, but the API it used in Chromium was removed before it ever got merged into CEF.
User avatar
PathogenDavid
Newbie
 
Posts: 1
Joined: Sun Jul 02, 2017 1:09 pm

Re: Hardware offscreen render support

Postby Volker » Wed Sep 19, 2018 2:28 am

I haven't looked into the details of CEF yet, but I'm very interested in integrating a browser rendering into OpenGL where CEF seems quite interesting. Regarding sharing the rendering output I wonder if it would be possible to use DMABUF file descriptors. I have positive experience with that interface. Bascially you render to a texture created by eglCreateDRMImageMESA and glEGLImageTargetTexture2DOES. This texture is bound to an FBO where rendering takes place (hopefully that is already possible in chromium). That texture is exported using eglExportDMABUFImageQueryMESA and eglExportDMABUFImageMESA. In the main OpenGL process that want to use that rendered output you just import the DMABUF file descriptor again using eglCreateImage and glEGLImageTargetTexture2DOES. The only drawback might be that AFAIK Nvidia's proprietary driver does not support DMABUFs.
Volker
Newbie
 
Posts: 1
Joined: Wed Sep 19, 2018 2:11 am

Previous

Return to Modifications Forum

Who is online

Users browsing this forum: No registered users and 8 guests