Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
chromium: fix GL support by not using the ANGLE GL implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan committed Dec 15, 2019
1 parent 14b40e2 commit 46d252f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/applications/networking/browsers/chromium/common.nix
Expand Up @@ -137,6 +137,7 @@ let
./patches/remove-webp-include-69.patch
./patches/no-build-timestamps.patch
./patches/widevine-79.patch
./patches/dont-use-ANGLE-by-default.patch
# Unfortunately, chromium regularly breaks on major updates and
# then needs various patches backported in order to be compiled with GCC.
# Good sources for such patches and other hints:
Expand Down
@@ -0,0 +1,26 @@
A field trial currently enables the passthrough command decoder, which causes
gl_factory.cc to try kGLImplementationEGLANGLE first, which causes Chromium to fail
to load libGLESv2.so on NixOS. It somehow does not try kGLImplementationDesktopGL,
and so there is no GL support at all.

Revert to using the validating command decoder, which prevents gl_factory.cc
from touching allowed_impls, allowing it to successfully use kGLImplementationDesktopGL.

diff --git a/ui/gl/gl_utils.cc b/ui/gl/gl_utils.cc
index 697cbed5fe2d..8419bdb21a2f 100644
--- a/ui/gl/gl_utils.cc
+++ b/ui/gl/gl_utils.cc
@@ -71,9 +71,10 @@ bool UsePassthroughCommandDecoder(const base::CommandLine* command_line) {
} else if (switch_value == kCmdDecoderValidatingName) {
return false;
} else {
- // Unrecognized or missing switch, use the default.
- return base::FeatureList::IsEnabled(
- features::kDefaultPassthroughCommandDecoder);
+ // Ignore the field trial that enables it; disable it until
+ // gl_factory.cc kGLImplementationEGLANGLE issues are sorted
+ // out on NixOS.
+ return false;
}
}
}

0 comments on commit 46d252f

Please sign in to comment.