2018-03-16 19:03:45 +01:00
|
|
|
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
|
2018-07-25 20:58:25 +02:00
|
|
|
index f4789ebf3b0e..73d66e8f5165 100644
|
2018-03-16 19:03:45 +01:00
|
|
|
--- ui/gl/init/gl_initializer_mac.cc
|
|
|
|
+++ ui/gl/init/gl_initializer_mac.cc
|
2018-04-19 17:44:42 +02:00
|
|
|
@@ -47,11 +47,8 @@ bool InitializeOneOffForSandbox() {
|
2018-03-16 19:03:45 +01:00
|
|
|
// GPU-related stuff is very slow without this, probably because
|
|
|
|
// the sandbox prevents loading graphics drivers or some such.
|
|
|
|
std::vector<CGLPixelFormatAttribute> attribs;
|
|
|
|
- if (GLContext::SwitchableGPUsSupported()) {
|
|
|
|
- // Avoid switching to the discrete GPU just for this pixel
|
|
|
|
- // format selection.
|
|
|
|
- attribs.push_back(kCGLPFAAllowOfflineRenderers);
|
|
|
|
- }
|
|
|
|
+ // Avoid switching to the discrete GPU just for this pixel format selection.
|
|
|
|
+ attribs.push_back(kCGLPFAAllowOfflineRenderers);
|
|
|
|
if (GetGLImplementation() == kGLImplementationAppleGL) {
|
|
|
|
attribs.push_back(kCGLPFARendererID);
|
|
|
|
attribs.push_back(
|
2018-07-25 20:58:25 +02:00
|
|
|
@@ -146,8 +143,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
|
|
|
// as app bundles. In that case, the .dylib is next to the executable.
|
|
|
|
base::FilePath base_dir;
|
|
|
|
if (base::mac::AmIBundled()) {
|
|
|
|
- base_dir =
|
|
|
|
- base::mac::FrameworkBundlePath().Append("Versions/Current/Libraries/");
|
|
|
|
+ // Rely on symlinks to find the correct version.
|
|
|
|
+ base_dir = base::mac::FrameworkBundlePath().Append("Libraries/");
|
|
|
|
} else {
|
|
|
|
if (!base::PathService::Get(base::FILE_EXE, &base_dir)) {
|
|
|
|
LOG(ERROR) << "PathService::Get failed.";
|