Skip to content

Chromium perf: Metal ANGLE, 60fps pump, GPU rasterization#21

Merged
max4c merged 1 commit intomainfrom
chromium-perf
Apr 9, 2026
Merged

Chromium perf: Metal ANGLE, 60fps pump, GPU rasterization#21
max4c merged 1 commit intomainfrom
chromium-perf

Conversation

@max4c
Copy link
Copy Markdown
Owner

@max4c max4c commented Apr 9, 2026

Summary

  • Replace SwiftShader (CPU software rendering) with Metal-backed ANGLE for hardware-accelerated compositing, scrolling, and WebGL
  • Increase message pump from 30fps to 60fps to match display refresh rate
  • Enable GPU rasterization with zero-copy and 4 raster threads (benchmark-optimal)
  • Enable WebGL and clipboard access at browser settings level

Benchmark methodology

40 flag configurations tested via automated sweep on RunPod (RTX 4090) using Chrome DevTools Protocol metrics. Winner: --use-gl=angle --use-angle=vulkan --enable-gpu-rasterization --enable-zero-copy --num-raster-threads=4 — translated to Metal equivalent for macOS.

Test plan

  • Build with BUGBOOK_BROWSER_CHROMIUM flag enabled
  • Verify browser pane loads pages without GPU crashes
  • Test scrolling smoothness on heavy DOM pages
  • Test WebGL content (e.g. three.js demos)
  • Verify no regression on page load times
  • Check memory usage stays reasonable vs SwiftShader baseline

🤖 Generated with Claude Code

Replace SwiftShader software rendering with Metal-backed ANGLE for
hardware-accelerated compositing. Flags validated via automated
benchmark sweep (40 configurations tested on RunPod).

- use-angle=metal instead of swiftshader (GPU vs CPU rendering)
- enable-gpu-rasterization + zero-copy for tiled GPU raster
- num-raster-threads=4 (benchmark-optimal thread count)
- message pump cap 30fps → 60fps to match display refresh
- enable WebGL and clipboard access at browser settings level

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33b6bb0051

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cef_browser_settings_t browserSettings = {};
browserSettings.size = sizeof(browserSettings);
browserSettings.background_color = CefColorSetARGB(255, 255, 255, 255);
browserSettings.javascript_access_clipboard = STATE_ENABLED;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid enabling JS clipboard access for all pages

Setting browserSettings.javascript_access_clipboard = STATE_ENABLED unconditionally grants every loaded site JavaScript clipboard access, so a malicious or compromised page can read/overwrite the user’s system clipboard without any origin-based gating in this bridge layer. This is a production security/privacy regression for any workflow that opens untrusted URLs; keep the default behavior or gate clipboard access to trusted origins only.

Useful? React with 👍 / 👎.

@max4c max4c merged commit 827d347 into main Apr 9, 2026
1 check passed
@max4c max4c deleted the chromium-perf branch April 9, 2026 01:08
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.

1 participant