Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 14898002: Add LayerTreeHostSettings for synchronous compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove blank line Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 new RenderWidgetCompositor(widget)); 84 new RenderWidgetCompositor(widget));
85 85
86 CommandLine* cmd = CommandLine::ForCurrentProcess(); 86 CommandLine* cmd = CommandLine::ForCurrentProcess();
87 87
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.synchronously_disable_vsync = widget->SynchronouslyDisableVSync();
94 settings.per_tile_painting_enabled = 95 settings.per_tile_painting_enabled =
95 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); 96 cmd->HasSwitch(cc::switches::kEnablePerTilePainting);
96 settings.accelerated_animation_enabled = 97 settings.accelerated_animation_enabled =
97 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 98 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
98 99
99 int default_tile_width = settings.default_tile_size.width(); 100 int default_tile_width = settings.default_tile_size.width();
100 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { 101 if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
101 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, 102 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1,
102 std::numeric_limits<int>::max(), &default_tile_width); 103 std::numeric_limits<int>::max(), &default_tile_width);
103 } 104 }
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
559 } 560 }
560 561
561 scoped_refptr<cc::ContextProvider> 562 scoped_refptr<cc::ContextProvider>
562 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
563 return RenderThreadImpl::current()-> 564 return RenderThreadImpl::current()->
564 OffscreenContextProviderForCompositorThread(); 565 OffscreenContextProviderForCompositorThread();
565 } 566 }
566 567
567 } // namespace content 568 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698