| 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 <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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 render_thread->is_gpu_rasterization_forced(); | 228 render_thread->is_gpu_rasterization_forced(); |
| 229 settings.gpu_rasterization_enabled = | 229 settings.gpu_rasterization_enabled = |
| 230 render_thread->is_gpu_rasterization_enabled(); | 230 render_thread->is_gpu_rasterization_enabled(); |
| 231 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled(); | 231 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled(); |
| 232 settings.use_distance_field_text = | 232 settings.use_distance_field_text = |
| 233 render_thread->is_distance_field_text_enabled(); | 233 render_thread->is_distance_field_text_enabled(); |
| 234 settings.use_zero_copy = render_thread->is_zero_copy_enabled(); | 234 settings.use_zero_copy = render_thread->is_zero_copy_enabled(); |
| 235 settings.use_one_copy = render_thread->is_one_copy_enabled(); | 235 settings.use_one_copy = render_thread->is_one_copy_enabled(); |
| 236 } | 236 } |
| 237 | 237 |
| 238 if (cmd->HasSwitch(switches::kEnableBleedingEdgeRenderingFastPaths)) { | |
| 239 settings.recording_mode = cc::LayerTreeSettings::RecordWithSkRecord; | |
| 240 } | |
| 241 | |
| 242 settings.calculate_top_controls_position = | 238 settings.calculate_top_controls_position = |
| 243 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 239 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
| 244 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 240 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
| 245 std::string controls_height_str = | 241 std::string controls_height_str = |
| 246 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 242 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
| 247 double controls_height; | 243 double controls_height; |
| 248 if (base::StringToDouble(controls_height_str, &controls_height) && | 244 if (base::StringToDouble(controls_height_str, &controls_height) && |
| 249 controls_height > 0) | 245 controls_height > 0) |
| 250 settings.top_controls_height = controls_height; | 246 settings.top_controls_height = controls_height; |
| 251 } | 247 } |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 widget_->OnSwapBuffersAborted(); | 871 widget_->OnSwapBuffersAborted(); |
| 876 } | 872 } |
| 877 | 873 |
| 878 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 874 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 879 cc::ContextProvider* provider = | 875 cc::ContextProvider* provider = |
| 880 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 876 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 881 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 877 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 882 } | 878 } |
| 883 | 879 |
| 884 } // namespace content | 880 } // namespace content |
| OLD | NEW |