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

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

Issue 12472015: Add implementation of WebWidgetClient::initializeLayerTreeView() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: null check compositor_, initialization can fail Created 7 years, 9 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 | « content/renderer/gpu/render_widget_compositor.h ('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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 string_value; 72 string_value;
73 return false; 73 return false;
74 } 74 }
75 } 75 }
76 76
77 77
78 } // namespace 78 } // namespace
79 79
80 // static 80 // static
81 scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create( 81 scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
82 RenderWidget* widget, 82 RenderWidget* widget) {
83 WebKit::WebLayerTreeView::Settings web_settings) {
84 scoped_ptr<RenderWidgetCompositor> compositor( 83 scoped_ptr<RenderWidgetCompositor> compositor(
85 new RenderWidgetCompositor(widget)); 84 new RenderWidgetCompositor(widget));
86 85
87 CommandLine* cmd = CommandLine::ForCurrentProcess(); 86 CommandLine* cmd = CommandLine::ForCurrentProcess();
88 87
89 cc::LayerTreeSettings settings; 88 cc::LayerTreeSettings settings;
90 settings.acceleratePainting = 89 settings.acceleratePainting =
91 cmd->HasSwitch(switches::kEnableAcceleratedPainting); 90 cmd->HasSwitch(switches::kEnableAcceleratedPainting);
92 settings.renderVSyncEnabled = !cmd->HasSwitch(switches::kDisableGpuVsync); 91 settings.renderVSyncEnabled = !cmd->HasSwitch(switches::kDisableGpuVsync);
93 settings.perTilePaintingEnabled = 92 settings.perTilePaintingEnabled =
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 493 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
495 } 494 }
496 495
497 scoped_refptr<cc::ContextProvider> 496 scoped_refptr<cc::ContextProvider>
498 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 497 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
499 return RenderThreadImpl::current()-> 498 return RenderThreadImpl::current()->
500 OffscreenContextProviderForCompositorThread(); 499 OffscreenContextProviderForCompositorThread();
501 } 500 }
502 501
503 } // namespace content 502 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698