cef icon indicating copy to clipboard operation
cef copied to clipboard

docs: win: OnAcceleratedPaint should use OpenSharedResource1

Open Ono-Sendai opened this issue 1 month ago • 2 comments

Hi, Working on video playback using on-GPU textures. OnAcceleratedPaint is documented to require OpenResource to open the HANDLE on Windows (see https://github.com/chromiumembedded/cef/blob/7087113239f0ef0f929a9404b2807aa65d95b79e/include/cef_render_handler.h#L156) , but that doesn't work (returns E_INVALIDARG).

Instead ID3D11Device1::OpenSharedResource1 seems to be needed.

Is this just a case of the documentation being wrong?

Ono-Sendai avatar Nov 11 '25 10:11 Ono-Sendai

Looks like the documentation is wrong. See https://github.com/chromiumembedded/cef/blob/7087113239f0ef0f929a9404b2807aa65d95b79e/tests/cefclient/browser/osr_d3d11_win.cc#L581

magreenblatt avatar Nov 11 '25 14:11 magreenblatt

And the doc should be appended with the handle can be opened with d3d12 OpenSharedHandle too cc https://github.com/tauri-apps/cef-rs/blob/31962ffefa298d70c8f4a7570399b06be895b082/cef/src/osr_texture_import/d3d11.rs#L221

csmoe avatar Nov 14 '25 02:11 csmoe

Can someone submit a PR with the necessary changes at https://bitbucket.org/chromiumembedded/cef/pull-requests/? Thanks.

magreenblatt avatar Nov 17 '25 18:11 magreenblatt

I created my bitbucket account, but no permission to create pull request.

csmoe avatar Nov 18 '25 10:11 csmoe

See “Creating a Pull Request” for instructions: https://bitbucket.org/chromiumembedded/cef/wiki/ContributingWithGit.md#markdown-header-creating-a-pull-request

magreenblatt avatar Nov 18 '25 20:11 magreenblatt