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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1413153014: Add a flag for enabling compositor property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 std::string top_threshold_str = 318 std::string top_threshold_str =
319 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); 319 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold);
320 double hide_threshold; 320 double hide_threshold;
321 if (base::StringToDouble(top_threshold_str, &hide_threshold) && 321 if (base::StringToDouble(top_threshold_str, &hide_threshold) &&
322 hide_threshold >= 0.f && hide_threshold <= 1.f) 322 hide_threshold >= 0.f && hide_threshold <= 1.f)
323 settings.top_controls_hide_threshold = hide_threshold; 323 settings.top_controls_hide_threshold = hide_threshold;
324 } 324 }
325 325
326 settings.verify_property_trees = 326 settings.verify_property_trees =
327 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification); 327 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification);
328 settings.use_property_trees =
329 cmd->HasSwitch(cc::switches::kEnableCompositorPropertyTrees);
328 settings.renderer_settings.allow_antialiasing &= 330 settings.renderer_settings.allow_antialiasing &=
329 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); 331 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing);
330 // The means the renderer compositor has 2 possible modes: 332 // The means the renderer compositor has 2 possible modes:
331 // - Threaded compositing with a scheduler. 333 // - Threaded compositing with a scheduler.
332 // - Single threaded compositing without a scheduler (for layout tests only). 334 // - Single threaded compositing without a scheduler (for layout tests only).
333 // Using the scheduler in layout tests introduces additional composite steps 335 // Using the scheduler in layout tests introduces additional composite steps
334 // that create flakiness. 336 // that create flakiness.
335 settings.single_thread_proxy_scheduler = false; 337 settings.single_thread_proxy_scheduler = false;
336 338
337 // These flags should be mirrored by UI versions in ui/compositor/. 339 // These flags should be mirrored by UI versions in ui/compositor/.
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 #endif 1081 #endif
1080 return actual; 1082 return actual;
1081 } 1083 }
1082 1084
1083 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1085 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1084 float device_scale) { 1086 float device_scale) {
1085 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1087 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1086 } 1088 }
1087 1089
1088 } // namespace content 1090 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698