chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.36k stars 467 forks source link

CEF3: Support rendering to a hardware GL/D3D texture/surface provided by the client #1006

Closed magreenblatt closed 6 months ago

magreenblatt commented 11 years ago

Original report by me.


Original issue 1006 created by magreenblatt on 2013-06-27T17:50:13.000Z:

CEF3 off-screen rendering does not currently support hardware acceleration. This means that some features like 3D CSS which require hardware acceleration do not currently work when using off-screen rendering.

See issue comment 51.8 for related comments.

magreenblatt commented 5 years ago

Original comment by Joshua Chen (Bitbucket: gpbeta, GitHub: gpbeta).


@xforce_dev Thank you for the responsive reply! I just tried --shared-texture-enabled --off-screen-rendering-enabled with cefclient on a Windows 7 virtual machine but it fell back to gl_osr implementation. So I'm a little bit worry about how much it could be compatible with some old devices. I'll keep my eyes on #2575, appreciate for the great work!

magreenblatt commented 5 years ago

Original comment by Alexander Guettler (Bitbucket: xforce, GitHub: xforce).


@renatoc8 Neither chromium nor CEF support Windows XP.

magreenblatt commented 5 years ago

Original comment by Renato Ciuffo (Bitbucket: renatoc8, GitHub: renatoc8).


That’s true, I forgot about that.

magreenblatt commented 5 years ago

Linux: Add OSR use_external_begin_frame support (see issue #1006)

→ <<cset a48e0720762a (bb)>>

magreenblatt commented 5 years ago

Linux: Add OSR use_external_begin_frame support (see issue #1006)

→ <<cset 2ff59af42954 (bb)>>

magreenblatt commented 5 years ago

Linux: Add OSR use_external_begin_frame support (see issue #1006)

→ <<cset ce74f0ae4dff (bb)>>

magreenblatt commented 5 years ago

Original comment by Romain Caire (Bitbucket: Romain Caire).


Hi,

I’d like to help implementing Accelerated Paint in OSR mode on Linux.

Is there any work being done on this end I could look at ?

magreenblatt commented 5 years ago

Original comment by Alexander Guettler (Bitbucket: xforce, GitHub: xforce).


As part of #2575/viz-implementation-for-osr I am investigating the possibility of supporting more platforms.

As part of the last chromium update my WIP part of Viz OSR was merged without any shared surface, because the old implementation doesn’t work with Viz.

I will be publishing a new early work PR sometime this week to add shared surface again for Windows and go from there.

magreenblatt commented 5 years ago

Original comment by Romain Caire (Bitbucket: Romain Caire).


Hi @{557058:f07fe0c3-2eef-4563-993e-dcdb7d76e546} ,

Did you had some time to work on this ?

Feel free to DM me on Twitter @RomainCaire if you need any help or If i can be any useful :slight_smile:

magreenblatt commented 3 years ago

Issue #3216 was marked as a duplicate of this issue.

magreenblatt commented 2 years ago

Issue #3263 is likely the best way to implement this for Linux (and possibly other platforms in the future).

magreenblatt commented 2 years ago

Original comment by Joshua Chen (Bitbucket: gpbeta, GitHub: gpbeta).


Hi, again! Just a quick question:

Can we create the staging texture with D3D11_BIND_RENDER_TARGET bind flag? (libcef/browser/gpu/external_texture_manager.cc)

We want to make use of the shared texture provided by CEF3 with ANGLE backed by Direct 3D 11.

So the only choice is eglCreatePbufferFromClientBuffer(), however, when we pass the shared handle it fails with EGL_BAD_SURFACE.

After some digging into ANGLE’s source codes, we found that eglCreatePbufferFromClientBuffer() requires the client buffer to be render-able, even if we only read the frame buffer later:

EGLint SwapChain11::resetOffscreenColorBuffer(const gl::Context *context,
                                              int backbufferWidth,
                                              int backbufferHeight)
{
...
        // Fail if the offscreen texture is not renderable.
        if ((offscreenTextureDesc.BindFlags & D3D11_BIND_RENDER_TARGET) == 0)
        {
            ERR() << "Could not use provided offscreen texture, texture not renderable.";
            release();
            return EGL_BAD_SURFACE;
        }
...
}

It’s both reasonable that a PBuffer should be render-able and a shared texture from CEF should be read-only, but I think it should be safe to make the staging texture render-able?

magreenblatt commented 10 years ago

Original changes by Anonymous.


magreenblatt commented 9 years ago

Original changes by Cef Gluist (Bitbucket: cefgluist).


magreenblatt commented 7 years ago
magreenblatt commented 6 years ago

Original changes by Isaac Richards (Bitbucket: irichardsnv).