Skip to content

disable-gpu flags not works #237

@fallenleavesguy

Description

@fallenleavesguy
  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;
        }
Image Image

include disable-gpu-compositing but not include disable-gpu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions