Ejemplo n.º 1
0
 /// <summary>
 /// Enables Audio - by default audio is muted in the OffScreen implementatio.
 /// This removes the mute-audio command line flag
 /// </summary>
 public void EnableAudio()
 {
     if (CefCommandLineArgs.ContainsKey("mute-audio"))
     {
         CefCommandLineArgs.Remove("mute-audio");
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Intialize with default values
        /// </summary>
        public CefSettings() : base()
        {
            WindowlessRenderingEnabled = true;

            //For OffScreen it doesn't make much sense to enable audio by default, so we disable it.
            //this can be removed in user code if required
            CefCommandLineArgs.Add("mute-audio");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Intialize with default values
        /// </summary>
        public CefSettings() : base()
        {
            WindowlessRenderingEnabled = true;

            //Disable multithreaded, compositor scrolling of web content
            //With OSR rendering it's fairly common for this to improve scrolling performace
            //https://peter.sh/experiments/chromium-command-line-switches/#disable-threaded-scrolling
            //CefCommandLineArgs.Add("disable-threaded-scrolling");

            CefCommandLineArgs.Add("disable-gpu-compositing");
        }
Ejemplo n.º 4
0
 private void AddCommandLine(CefCommandLineArgment cefCommandLineArgment)
 {
     if (CefCommandLineArgs.ContainsKey(cefCommandLineArgment.Key))
     {
         CefCommandLineArgs[cefCommandLineArgment.Key] = cefCommandLineArgment.Value;
     }
     else
     {
         CefCommandLineArgs.Add(cefCommandLineArgment.Key, cefCommandLineArgment.Value.ToString());
     }
 }
Ejemplo n.º 5
0
        //TODO: This is duplicated with the Offscreen version
        public CefSettings() : base()
        {
            WindowlessRenderingEnabled = true;

            if (Cef.CefVersion.StartsWith("r3.3497"))
            {
                throw new System.Exception("Issue #2408 should have been resolved, remove the below code");
            }

            //https://github.com/cefsharp/CefSharp/issues/2408
            CefCommandLineArgs.Add("disable-features", "AsyncWheelEvents,TouchpadAndWheelScrollLatching");
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Intialize with default values
        /// </summary>
        public CefSettings() : base()
        {
            WindowlessRenderingEnabled = true;

            //Disable multithreaded, compositor scrolling of web content
            //With OSR rendering it's fairly common for this to improve scrolling performace
            //https://peter.sh/experiments/chromium-command-line-switches/#disable-threaded-scrolling
            //CefCommandLineArgs.Add("disable-threaded-scrolling", "1");

            //Disable GPU Compositing by default, it's causing all sorts of issues
            //with OSR rendering currently.
            //https://bitbucket.org/chromiumembedded/cef/issues/2696/delay-on-rendering-when-moving-mouse
            //https://bitbucket.org/chromiumembedded/cef/issues/2700/cef-high-memory-usage-when-offscreen
            CefCommandLineArgs.Add("disable-gpu-compositing", "1");
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Intialize with default values
        /// </summary>
        public CefSettings() : base()
        {
            WindowlessRenderingEnabled = true;

            //For OffScreen it doesn't make much sense to enable audio by default, so we disable it.
            //this can be removed in user code if required
            CefCommandLineArgs.Add("mute-audio", "1");

            if (Cef.CefVersion.StartsWith("r3.3497"))
            {
                throw new System.Exception("Issue #2408 should have been resolved, remove the below code");
            }

            //https://github.com/cefsharp/CefSharp/issues/2408
            CefCommandLineArgs.Add("disable-features", "AsyncWheelEvents,TouchpadAndWheelScrollLatching");
        }