mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-23 07:27:42 +01:00
macOS: Fix undesirable switch to discrete GPU during startup (issue #2398)
This commit is contained in:
parent
e030236c36
commit
4fb6e1ba29
@ -353,4 +353,9 @@ patches = [
|
|||||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=781966
|
# https://bugs.chromium.org/p/chromium/issues/detail?id=781966
|
||||||
'name': 'webkit_pointer_event_781966',
|
'name': 'webkit_pointer_event_781966',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# macOS: Fix undesirable switch to discrete GPU during startup.
|
||||||
|
# https://bitbucket.org/chromiumembedded/cef/issues/2398
|
||||||
|
'name': 'mac_gpu_2398',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
18
patch/patches/mac_gpu_2398.patch
Normal file
18
patch/patches/mac_gpu_2398.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
|
||||||
|
index 828ce9bb0138..1301e6cc1d14 100644
|
||||||
|
--- ui/gl/init/gl_initializer_mac.cc
|
||||||
|
+++ ui/gl/init/gl_initializer_mac.cc
|
||||||
|
@@ -40,11 +40,8 @@ bool InitializeOneOffForSandbox() {
|
||||||
|
// 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(
|
Loading…
x
Reference in New Issue
Block a user