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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 cc::LayerTreeSettings settings; | 88 cc::LayerTreeSettings settings; |
89 settings.accelerate_painting = | 89 settings.accelerate_painting = |
90 cmd->HasSwitch(switches::kEnableAcceleratedPainting); | 90 cmd->HasSwitch(switches::kEnableAcceleratedPainting); |
91 settings.render_vsync_enabled = !cmd->HasSwitch(switches::kDisableGpuVsync); | 91 settings.render_vsync_enabled = !cmd->HasSwitch(switches::kDisableGpuVsync); |
92 settings.render_vsync_notification_enabled = | 92 settings.render_vsync_notification_enabled = |
93 cmd->HasSwitch(switches::kEnableVsyncNotification); | 93 cmd->HasSwitch(switches::kEnableVsyncNotification); |
94 settings.per_tile_painting_enabled = | 94 settings.per_tile_painting_enabled = |
95 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); | 95 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); |
96 settings.accelerated_animation_enabled = | 96 settings.accelerated_animation_enabled = |
97 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); | 97 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 98 settings.draw_layers_with_ganesh = |
| 99 cmd->HasSwitch(cc::switches::kDrawLayersWithGanesh); |
98 | 100 |
99 int default_tile_width = settings.default_tile_size.width(); | 101 int default_tile_width = settings.default_tile_size.width(); |
100 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { | 102 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { |
101 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, | 103 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, |
102 std::numeric_limits<int>::max(), &default_tile_width); | 104 std::numeric_limits<int>::max(), &default_tile_width); |
103 } | 105 } |
104 int default_tile_height = settings.default_tile_size.height(); | 106 int default_tile_height = settings.default_tile_size.height(); |
105 if (cmd->HasSwitch(switches::kDefaultTileHeight)) { | 107 if (cmd->HasSwitch(switches::kDefaultTileHeight)) { |
106 GetSwitchValueAsInt(*cmd, switches::kDefaultTileHeight, 1, | 108 GetSwitchValueAsInt(*cmd, switches::kDefaultTileHeight, 1, |
107 std::numeric_limits<int>::max(), &default_tile_height); | 109 std::numeric_limits<int>::max(), &default_tile_height); |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 561 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
560 } | 562 } |
561 | 563 |
562 scoped_refptr<cc::ContextProvider> | 564 scoped_refptr<cc::ContextProvider> |
563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 565 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
564 return RenderThreadImpl::current()-> | 566 return RenderThreadImpl::current()-> |
565 OffscreenContextProviderForCompositorThread(); | 567 OffscreenContextProviderForCompositorThread(); |
566 } | 568 } |
567 | 569 |
568 } // namespace content | 570 } // namespace content |
OLD | NEW |