Skip to content

feat: accelerated paint #509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

1zun4
Copy link

@1zun4 1zun4 commented Jun 26, 2025

CEF supports hardware-accelerated off-screen rendering by enabling shared_texture_enabled via WindowInfo and passing --off-screen-rendering-enabled --shared-texture-enabled as arguments.

Unfortunately, Java CEF lacks bindings for OnAcceleratedPaint, meaning we cannot make use of this feature. This pull request enables this feature when turning shared_texture_enabled to true.

The changes were tested on a forked JCEF version (on Update to CEF 135.0.20+ge7de5c3+chromium-135.0.7049.85) by converting the D3D11 shared texture handle using ImportMemoryWin32HandleEXT using OpenGL's EXT_external_objects_win32 which is supported by LWJGL3.

image

Ignore the inverted colors. It was still missing the shader for the color conversion.

Fixes #506

Please "Squash And Merge" (!!!).

@sqlerrorthing
Copy link

Please "Squash And Merge" (!!!).

why this specifically? whats wrong with other merge methods

@1zun4
Copy link
Author

1zun4 commented Jun 27, 2025

Please "Squash And Merge" (!!!).

why this specifically? whats wrong with other merge methods

It bloats up the commit history, and my changes are so small that they wouldn't benefit from a traditional merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hardware accelerated off-screen rendering
2 participants