| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 settings.throttle_frame_production = | 89 settings.throttle_frame_production = |
| 90 !cmd->HasSwitch(switches::kDisableGpuVsync); | 90 !cmd->HasSwitch(switches::kDisableGpuVsync); |
| 91 settings.begin_impl_frame_scheduling_enabled = | 91 settings.begin_impl_frame_scheduling_enabled = |
| 92 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); | 92 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); |
| 93 settings.using_synchronous_renderer_compositor = | 93 settings.using_synchronous_renderer_compositor = |
| 94 widget->UsingSynchronousRendererCompositor(); | 94 widget->UsingSynchronousRendererCompositor(); |
| 95 settings.accelerated_animation_enabled = | 95 settings.accelerated_animation_enabled = |
| 96 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 96 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 97 settings.touch_hit_testing = | 97 settings.touch_hit_testing = |
| 98 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); | 98 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting) && |
| 99 !cmd->HasSwitch(switches::kEnableBleedingEdgeRenderingFastPaths); |
| 99 | 100 |
| 100 int default_tile_width = settings.default_tile_size.width(); | 101 int default_tile_width = settings.default_tile_size.width(); |
| 101 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 102 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
| 102 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, | 103 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, |
| 103 std::numeric_limits<int>::max(), &default_tile_width); | 104 std::numeric_limits<int>::max(), &default_tile_width); |
| 104 } | 105 } |
| 105 int default_tile_height = settings.default_tile_size.height(); | 106 int default_tile_height = settings.default_tile_size.height(); |
| 106 if (cmd->HasSwitch(switches::kDefaultTileHeight)) { | 107 if (cmd->HasSwitch(switches::kDefaultTileHeight)) { |
| 107 GetSwitchValueAsInt(*cmd, switches::kDefaultTileHeight, 1, | 108 GetSwitchValueAsInt(*cmd, switches::kDefaultTileHeight, 1, |
| 108 std::numeric_limits<int>::max(), &default_tile_height); | 109 std::numeric_limits<int>::max(), &default_tile_height); |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 widget_->OnSwapBuffersAborted(); | 637 widget_->OnSwapBuffersAborted(); |
| 637 } | 638 } |
| 638 | 639 |
| 639 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 640 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 640 cc::ContextProvider* provider = | 641 cc::ContextProvider* provider = |
| 641 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 642 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 642 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 643 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 643 } | 644 } |
| 644 | 645 |
| 645 } // namespace content | 646 } // namespace content |
| OLD | NEW |