| 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 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 83 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
| 84 | 84 |
| 85 cc::LayerTreeSettings settings; | 85 cc::LayerTreeSettings settings; |
| 86 | 86 |
| 87 // For web contents, layer transforms should scale up the contents of layers | 87 // For web contents, layer transforms should scale up the contents of layers |
| 88 // to keep content always crisp when possible. | 88 // to keep content always crisp when possible. |
| 89 settings.layer_transforms_should_scale_layer_contents = true; | 89 settings.layer_transforms_should_scale_layer_contents = true; |
| 90 | 90 |
| 91 settings.throttle_frame_production = | 91 settings.throttle_frame_production = |
| 92 !cmd->HasSwitch(switches::kDisableGpuVsync); | 92 !cmd->HasSwitch(switches::kDisableGpuVsync); |
| 93 settings.begin_impl_frame_scheduling_enabled = | 93 settings.begin_frame_scheduling_enabled = |
| 94 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); | 94 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); |
| 95 settings.main_frame_before_activation_enabled = | 95 settings.main_frame_before_activation_enabled = |
| 96 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 96 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
| 97 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 97 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
| 98 settings.main_frame_before_draw_enabled = | 98 settings.main_frame_before_draw_enabled = |
| 99 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw); | 99 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw); |
| 100 settings.using_synchronous_renderer_compositor = | 100 settings.using_synchronous_renderer_compositor = |
| 101 widget->UsingSynchronousRendererCompositor(); | 101 widget->UsingSynchronousRendererCompositor(); |
| 102 settings.accelerated_animation_enabled = | 102 settings.accelerated_animation_enabled = |
| 103 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 103 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 widget_->OnSwapBuffersAborted(); | 649 widget_->OnSwapBuffersAborted(); |
| 650 } | 650 } |
| 651 | 651 |
| 652 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 652 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 653 cc::ContextProvider* provider = | 653 cc::ContextProvider* provider = |
| 654 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 654 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 655 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 655 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 656 } | 656 } |
| 657 | 657 |
| 658 } // namespace content | 658 } // namespace content |
| OLD | NEW |