Skip to content

feat: accelerated paint for JOGL renderer - #547

Open
1zun4 wants to merge 12 commits into
chromiumembedded:masterfrom
CCBlueX:upstream/feat/accelerated-paint-jogl
Open

1zun4 wants to merge 12 commits into
chromiumembedded:masterfrom
CCBlueX:upstream/feat/accelerated-paint-jogl

Conversation

@1zun4

@1zun4 1zun4 commented Sep 23, 2026

Copy link
Copy Markdown

Since my original pull request gained no further attention, even though we've been using this in production for ages, I decided to implement the remaining TODO. This pull request has partially been hallucinated together by Claude Opus 5.5.

Adds renderer support for OnAcceleratedPaint in CefBrowserOsr, so the JOGL-based OSR browser draws accelerated frames when shared_texture_enabled is set.

JOGL does not expose the needed interop functions, so each platform gets a small JNI helper. The same import paths run in production in our MCEF renderer (LWJGL), while the JOGL implementation still needs testing on Windows and macOS:

Platform Import JOGL (this PR) MCEF (LWJGL)
Windows D3D11 handle via glImportMemoryWin32HandleEXT (EXT_external_objects_win32) untested production (NVIDIA; AMD beta)
Linux dmabuf; JOGL: DRI3 pixmap + GLX_EXT_texture_from_pixmap, MCEF: EGLImage tested (CEF 152.0.6, Intel Arc B580, Mesa 26.2.3) production (EGL context)
macOS IOSurface via CGLTexImageIOSurface2D untested beta

@magreenblatt macOS is included now.

Output is pixel-identical to the software path, popups included:

Software Accelerated
correct-soft-popup correct-shared-popup
720p 1080p 1440p 2160p
CPU per frame, onPaint 1.29 ms 2.52 ms 4.08 ms 7.21 ms
CPU per frame, onAcceleratedPaint 0.44 ms 0.47 ms 0.49 ms 0.58 ms
JVM CPU 25 → 9 % 29 → 9 % 27 → 9 % 28 → 11 %
cb-cpu cb-wall shots-shared

Use Squash And Merge.

@1zun4 1zun4 mentioned this pull request Sep 23, 2026

This branch has not been deployed

No deployments
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

3 participants