Commit 09496182 authored by Alex Clarke's avatar Alex Clarke Committed by Commit Bot

Add --deterministic-mode which adds a number of flags needed for determinism

Change-Id: I827cb57345850d703431dc80c1236968737f6a43
Reviewed-on: https://chromium-review.googlesource.com/948542Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541934}
parent 9d0c67e8
include_rules = {
"+cc/base/switches.h",
"+components/viz/common/switches.h",
}
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "base/task_runner_util.h" #include "base/task_runner_util.h"
#include "base/task_scheduler/post_task.h" #include "base/task_scheduler/post_task.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "cc/base/switches.h"
#include "components/viz/common/switches.h"
#include "content/public/app/content_main.h" #include "content/public/app/content_main.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
...@@ -704,6 +706,21 @@ int HeadlessShellMain(int argc, const char** argv) { ...@@ -704,6 +706,21 @@ int HeadlessShellMain(int argc, const char** argv) {
builder.SetCrashDumpsDir(dumps_path); builder.SetCrashDumpsDir(dumps_path);
#endif #endif
if (command_line.HasSwitch(switches::kDeterministicMode)) {
command_line.AppendSwitch(switches::kEnableBeginFrameControl);
command_line.AppendSwitch(switches::kDeterministicFetch);
// Compositor flags
command_line.AppendSwitch(::switches::kRunAllCompositorStagesBeforeDraw);
command_line.AppendSwitch(::switches::kDisableNewContentRenderingTimeout);
command_line.AppendSwitch(::switches::kEnableSurfaceSynchronization);
// Renderer flags
command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation);
command_line.AppendSwitch(::switches::kDisableThreadedScrolling);
command_line.AppendSwitch(cc::switches::kDisableCheckerImaging);
}
if (command_line.HasSwitch(switches::kEnableBeginFrameControl)) if (command_line.HasSwitch(switches::kEnableBeginFrameControl))
builder.SetEnableBeginFrameControl(true); builder.SetEnableBeginFrameControl(true);
......
...@@ -26,6 +26,11 @@ const char kDisableCrashReporter[] = "disable-crash-reporter"; ...@@ -26,6 +26,11 @@ const char kDisableCrashReporter[] = "disable-crash-reporter";
// The directory breakpad should store minidumps in. // The directory breakpad should store minidumps in.
const char kCrashDumpsDir[] = "crash-dumps-dir"; const char kCrashDumpsDir[] = "crash-dumps-dir";
// A meta flag. This sets a number of flags which put the browser into
// deterministic mode where begin frames should be issued over DevToolsProtocol
// (experimental).
const char kDeterministicMode[] = "deterministic-mode";
// Instructs headless_shell to cause network fetches to complete in order of // Instructs headless_shell to cause network fetches to complete in order of
// creation. This removes a significant source of network related // creation. This removes a significant source of network related
// non-determinism at the cost of slower page loads. // non-determinism at the cost of slower page loads.
......
...@@ -12,6 +12,7 @@ namespace switches { ...@@ -12,6 +12,7 @@ namespace switches {
extern const char kCrashDumpsDir[]; extern const char kCrashDumpsDir[];
extern const char kDefaultBackgroundColor[]; extern const char kDefaultBackgroundColor[];
extern const char kDeterministicMode[];
extern const char kDeterministicFetch[]; extern const char kDeterministicFetch[];
extern const char kDisableCrashReporter[]; extern const char kDisableCrashReporter[];
extern const char kDumpDom[]; extern const char kDumpDom[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment