Skip to content
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

android: fix broken rendering in emulators #31727

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/servo/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ where
webrender_gl.clone(),
render_notifier,
webrender::WebRenderOptions {
// We force the use of optimized shaders here because rendering is broken
// on Android emulators with unoptimized shaders. This is due to a known
// issue in the emulator's OpenGL emulation layer.
// See: https://github.com/servo/servo/issues/31726
use_optimized_shaders: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

I've manually tested the NixOS and Android builds but I'm no sure if this change could potentially break other platforms. WebRender does have fallback logic to use unoptimized versions if the optimized version is not present in the build. However, let me know if we should instead enable this only for android i.e use_optimized_shaders: cfg!(target_os = "android") instead.

resource_override_path: opts.shaders_dir.clone(),
enable_aa: !opts.debug.disable_text_antialiasing,
debug_flags: debug_flags,
Expand Down