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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 !cmd->HasSwitch(switches::kDisableGpuVsync); | 94 !cmd->HasSwitch(switches::kDisableGpuVsync); |
95 settings.begin_frame_scheduling_enabled = | 95 settings.begin_frame_scheduling_enabled = |
96 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); | 96 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); |
97 settings.main_frame_before_activation_enabled = | 97 settings.main_frame_before_activation_enabled = |
98 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && | 98 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && |
99 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); | 99 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); |
100 settings.main_frame_before_draw_enabled = | 100 settings.main_frame_before_draw_enabled = |
101 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw); | 101 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw); |
102 settings.using_synchronous_renderer_compositor = | 102 settings.using_synchronous_renderer_compositor = |
103 widget->UsingSynchronousRendererCompositor(); | 103 widget->UsingSynchronousRendererCompositor(); |
| 104 settings.record_document = widget->CompositorRecordsDocument(); |
104 settings.report_overscroll_only_for_scrollable_axes = | 105 settings.report_overscroll_only_for_scrollable_axes = |
105 !widget->UsingSynchronousRendererCompositor(); | 106 !widget->UsingSynchronousRendererCompositor(); |
106 settings.accelerated_animation_enabled = | 107 settings.accelerated_animation_enabled = |
107 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 108 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
108 settings.touch_hit_testing = | 109 settings.touch_hit_testing = |
109 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); | 110 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); |
110 | 111 |
111 int default_tile_width = settings.default_tile_size.width(); | 112 int default_tile_width = settings.default_tile_size.width(); |
112 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 113 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
113 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, | 114 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 widget_->OnSwapBuffersAborted(); | 701 widget_->OnSwapBuffersAborted(); |
701 } | 702 } |
702 | 703 |
703 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 704 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
704 cc::ContextProvider* provider = | 705 cc::ContextProvider* provider = |
705 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 706 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
706 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 707 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
707 } | 708 } |
708 | 709 |
709 } // namespace content | 710 } // namespace content |
OLD | NEW |