Disable GPU on windows 7

https://github.com/cefsharp/CefSharp/issues/1634
This commit is contained in:
amaitland 2016-06-16 08:14:16 +10:00
parent c4d0605307
commit 5150ce34ef
2 changed files with 18 additions and 1 deletions

View File

@ -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);

View File

@ -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);
}
}