| OLD | NEW |
| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 web_settings.acceleratedAnimationEnabled; | 93 web_settings.acceleratedAnimationEnabled; |
| 94 settings.refreshRate = web_settings.refreshRate; | 94 settings.refreshRate = web_settings.refreshRate; |
| 95 settings.defaultTileSize = web_settings.defaultTileSize; | 95 settings.defaultTileSize = web_settings.defaultTileSize; |
| 96 settings.maxUntiledLayerSize = web_settings.maxUntiledLayerSize; | 96 settings.maxUntiledLayerSize = web_settings.maxUntiledLayerSize; |
| 97 | 97 |
| 98 settings.rightAlignedSchedulingEnabled = | 98 settings.rightAlignedSchedulingEnabled = |
| 99 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); | 99 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); |
| 100 settings.implSidePainting = cc::switches::IsImplSidePaintingEnabled(); | 100 settings.implSidePainting = cc::switches::IsImplSidePaintingEnabled(); |
| 101 settings.useCheapnessEstimator = | 101 settings.useCheapnessEstimator = |
| 102 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator); | 102 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator); |
| 103 settings.useColorEstimator = |
| 104 cmd->HasSwitch(cc::switches::kUseColorEstimator); |
| 105 settings.predictionBenchmarking = |
| 106 cmd->HasSwitch(cc::switches::kEnablePredictionBenchmarking); |
| 103 | 107 |
| 104 settings.calculateTopControlsPosition = | 108 settings.calculateTopControlsPosition = |
| 105 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 109 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
| 106 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 110 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
| 107 std::string controls_height_str = | 111 std::string controls_height_str = |
| 108 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 112 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
| 109 double controls_height; | 113 double controls_height; |
| 110 if (base::StringToDouble(controls_height_str, &controls_height) && | 114 if (base::StringToDouble(controls_height_str, &controls_height) && |
| 111 controls_height > 0) | 115 controls_height > 0) |
| 112 settings.topControlsHeight = controls_height; | 116 settings.topControlsHeight = controls_height; |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 529 |
| 526 scoped_refptr<cc::ContextProvider> | 530 scoped_refptr<cc::ContextProvider> |
| 527 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 531 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 528 if (!contexts_compositor_thread_ || | 532 if (!contexts_compositor_thread_ || |
| 529 contexts_compositor_thread_->DestroyedOnMainThread()) | 533 contexts_compositor_thread_->DestroyedOnMainThread()) |
| 530 contexts_compositor_thread_ = new CompositorThreadContextProvider; | 534 contexts_compositor_thread_ = new CompositorThreadContextProvider; |
| 531 return contexts_compositor_thread_; | 535 return contexts_compositor_thread_; |
| 532 } | 536 } |
| 533 | 537 |
| 534 } // namespace content | 538 } // namespace content |
| OLD | NEW |