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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 settings.accelerate_painting = | 95 settings.accelerate_painting = |
96 cmd->HasSwitch(switches::kEnableAcceleratedPainting); | 96 cmd->HasSwitch(switches::kEnableAcceleratedPainting); |
97 settings.render_vsync_enabled = !cmd->HasSwitch(switches::kDisableGpuVsync); | 97 settings.render_vsync_enabled = !cmd->HasSwitch(switches::kDisableGpuVsync); |
98 settings.render_vsync_notification_enabled = | 98 settings.render_vsync_notification_enabled = |
99 cmd->HasSwitch(switches::kEnableVsyncNotification); | 99 cmd->HasSwitch(switches::kEnableVsyncNotification); |
100 settings.synchronously_disable_vsync = widget->SynchronouslyDisableVSync(); | 100 settings.synchronously_disable_vsync = widget->SynchronouslyDisableVSync(); |
101 settings.per_tile_painting_enabled = | 101 settings.per_tile_painting_enabled = |
102 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); | 102 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); |
103 settings.accelerated_animation_enabled = | 103 settings.accelerated_animation_enabled = |
104 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 104 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 105 settings.force_direct_layer_drawing = |
| 106 cmd->HasSwitch(cc::switches::kForceDirectLayerDrawing); |
105 | 107 |
106 int default_tile_width = settings.default_tile_size.width(); | 108 int default_tile_width = settings.default_tile_size.width(); |
107 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 109 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
108 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, | 110 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, |
109 std::numeric_limits<int>::max(), &default_tile_width); | 111 std::numeric_limits<int>::max(), &default_tile_width); |
110 } | 112 } |
111 int default_tile_height = settings.default_tile_size.height(); | 113 int default_tile_height = settings.default_tile_size.height(); |
112 if (cmd->HasSwitch(switches::kDefaultTileHeight)) { | 114 if (cmd->HasSwitch(switches::kDefaultTileHeight)) { |
113 GetSwitchValueAsInt(*cmd, switches::kDefaultTileHeight, 1, | 115 GetSwitchValueAsInt(*cmd, switches::kDefaultTileHeight, 1, |
114 std::numeric_limits<int>::max(), &default_tile_height); | 116 std::numeric_limits<int>::max(), &default_tile_height); |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 567 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
566 } | 568 } |
567 | 569 |
568 scoped_refptr<cc::ContextProvider> | 570 scoped_refptr<cc::ContextProvider> |
569 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 571 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
570 return RenderThreadImpl::current()-> | 572 return RenderThreadImpl::current()-> |
571 OffscreenContextProviderForCompositorThread(); | 573 OffscreenContextProviderForCompositorThread(); |
572 } | 574 } |
573 | 575 |
574 } // namespace content | 576 } // namespace content |
OLD | NEW |