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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2854953006: Move disable_display_vsync out of RendererSettings (Closed)
Patch Set: Correct typo Created 3 years, 7 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 | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 23ba5e3cf3db70556acbc41e4e93403ec67fb6da..85e0057e544e0f0ba0b1bce401f678780048950d 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -199,6 +199,18 @@ GpuProcessTransportFactory::GpuProcessTransportFactory()
frame_sink_manager_host_ = base::MakeUnique<FrameSinkManagerHost>();
frame_sink_manager_host_->ConnectToFrameSinkManager();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kDisableGpuVsync)) {
+ std::string display_vsync_string =
+ command_line->GetSwitchValueASCII(switches::kDisableGpuVsync);
+ // See comments in gl_switches about this flag. The browser compositor
+ // is only unthrottled when "gpu" or no switch value is passed, as it
+ // is driven directly by the display compositor.
+ if (display_vsync_string != "beginframe") {
+ disable_display_vsync_ = true;
+ }
+ }
+
task_graph_runner_->Start("CompositorTileWorker1",
base::SimpleThread::Options());
#if defined(OS_WIN)
@@ -551,7 +563,7 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
std::unique_ptr<GpuVSyncBeginFrameSource> gpu_vsync_begin_frame_source;
if (!begin_frame_source) {
- if (!compositor->GetRendererSettings().disable_display_vsync) {
+ if (!disable_display_vsync_) {
if (gpu_vsync_control && IsGpuVSyncSignalSupported()) {
gpu_vsync_begin_frame_source =
base::MakeUnique<GpuVSyncBeginFrameSource>(gpu_vsync_control);
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698