Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: ui/compositor/compositor.cc

Issue 1888093002: mus: Turn off using BeginFrameSource in ui::Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 862b5fb3aee1f5eddc655530093e329357535334..7bb1f0957bd1a6948ecf3de60c9c07e6d4f7f9e6 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -45,6 +45,11 @@ namespace {
const double kDefaultRefreshRate = 60.0;
const double kTestRefreshRate = 200.0;
+bool IsRunningInMojoShell(base::CommandLine* command_line) {
+ const char kMojoShellFlag[] = "mojo-platform-channel-handle";
+ return command_line->HasSwitch(kMojoShellFlag);
+}
+
} // namespace
namespace ui {
@@ -175,7 +180,10 @@ Compositor::Compositor(ui::ContextFactory* context_factory,
// thread.
settings.image_decode_tasks_enabled = false;
- settings.use_output_surface_begin_frame_source = true;
+ // TODO(crbug.com/603600): This should always be turned on once mus tells its
+ // clients about BeginFrame.
+ settings.use_output_surface_begin_frame_source =
+ !IsRunningInMojoShell(command_line);
#if !defined(OS_ANDROID)
// TODO(sohanjg): Revisit this memory usage in tile manager.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698