static int Main(string[] args)
{
// generate a unique cache path to avoid problems when launching more than one process
// https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=19665
var cachePath = Path.Combine(Path.GetTempPath(), "CefGlue_" + Guid.NewGuid().ToString().Replace("-", null));
AppDomain.CurrentDomain.ProcessExit += delegate { Cleanup(cachePath); };
AppBuilder.Configure<App>()
.UsePlatformDetect()
.With(new Win32PlatformOptions())
.AfterSetup(_ => CefRuntimeLoader.Initialize(new CefSettings() {
RootCachePath = cachePath,
#if WINDOWLESS
// its recommended to leave this off (false), since its less performant and can cause more issues
WindowlessRenderingEnabled = true
#else
WindowlessRenderingEnabled = false
#endif
},
customSchemes: new[] {
new CustomScheme()
{
SchemeName = "test",
SchemeHandlerFactory = new CustomSchemeHandler()
}
}, flags: new Dictionary<string, string>
{
{"--disable-web-security", "1"},
{"disable-gpu", "1"},
{"disable-gpu-compositing", "1"},
{"disable-gpu-vsync", "1"}
}.ToArray()))
.StartWithClassicDesktopLifetime(args);
return 0;
}
include disable-gpu-compositing but not include disable-gpu
include disable-gpu-compositing but not include disable-gpu