Disable GPU on windows 7
https://github.com/cefsharp/CefSharp/issues/1634
This commit is contained in:
parent
c4d0605307
commit
5150ce34ef
@ -24,6 +24,14 @@ namespace CefSharp.MinimalExample.OffScreen
|
||||
|
||||
var settings = new CefSettings();
|
||||
|
||||
var osVersion = Environment.OSVersion;
|
||||
//Disable GPU for Windows 7
|
||||
if (osVersion.Version.Major == 6 && osVersion.Version.Minor == 1)
|
||||
{
|
||||
// Disable GPU in WPF and Offscreen examples until #1634 has been resolved
|
||||
settings.CefCommandLineArgs.Add("disable-gpu", "1");
|
||||
}
|
||||
|
||||
//Perform dependency check to make sure all relevant resources are in our output directory.
|
||||
Cef.Initialize(settings, shutdownOnProcessExit: false, performDependencyCheck: true);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Windows;
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace CefSharp.MinimalExample.Wpf
|
||||
{
|
||||
@ -10,6 +11,14 @@ namespace CefSharp.MinimalExample.Wpf
|
||||
var settings = new CefSettings();
|
||||
settings.EnableInternalPdfViewerOffScreen();
|
||||
|
||||
var osVersion = Environment.OSVersion;
|
||||
//Disable GPU for Windows 7
|
||||
if (osVersion.Version.Major == 6 && osVersion.Version.Minor == 1)
|
||||
{
|
||||
// Disable GPU in WPF and Offscreen examples until #1634 has been resolved
|
||||
settings.CefCommandLineArgs.Add("disable-gpu", "1");
|
||||
}
|
||||
|
||||
Cef.Initialize(settings, shutdownOnProcessExit: false, performDependencyCheck: true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user