Skip to content

Commit ca85608

Browse files
committed
Make sure checking for --enable-gpu argument only happens initially
and not on subprocess launch
1 parent 575f16a commit ca85608

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

shared/browser-app.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ void BrowserApp::OnBeforeCommandLineProcessing(
3737
const CefString& process_type,
3838
CefRefPtr<CefCommandLine> command_line)
3939
{
40-
bool enablegpu = command_line->HasSwitch("enable-gpu");
41-
command_line->AppendSwitch("enable-system-flash");
42-
if (!enablegpu)
40+
bool enableGPU = command_line->HasSwitch("enable-gpu");
41+
42+
CefString type = command_line->GetSwitchValue("type");
43+
44+
if (!enableGPU && type.empty())
4345
{
4446
command_line->AppendSwitch("disable-gpu");
4547
command_line->AppendSwitch("disable-gpu-compositing");
4648
}
4749
command_line->AppendSwitch("enable-begin-frame-scheduling");
50+
51+
command_line->AppendSwitch("enable-system-flash");
4852
}

0 commit comments

Comments
 (0)