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

Side by Side Diff: content/renderer/render_widget.cc

Issue 12836003: Remove 3-arg initializeLayerTreeView implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/render_widget.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 void RenderWidget::initializeLayerTreeView() { 1429 void RenderWidget::initializeLayerTreeView() {
1430 compositor_ = RenderWidgetCompositor::Create(this); 1430 compositor_ = RenderWidgetCompositor::Create(this);
1431 if (!compositor_) 1431 if (!compositor_)
1432 return; 1432 return;
1433 1433
1434 compositor_->setViewportSize(size_, physical_backing_size_); 1434 compositor_->setViewportSize(size_, physical_backing_size_);
1435 if (init_complete_) 1435 if (init_complete_)
1436 compositor_->setSurfaceReady(); 1436 compositor_->setSurfaceReady();
1437 } 1437 }
1438 1438
1439 void RenderWidget::initializeLayerTreeView(
1440 WebKit::WebLayerTreeViewClient* client,
1441 const WebKit::WebLayer& root_layer,
1442 const WebKit::WebLayerTreeView::Settings& settings) {
1443 initializeLayerTreeView();
1444 if (compositor_)
1445 compositor_->setRootLayer(root_layer);
1446 }
1447
1448 WebKit::WebLayerTreeView* RenderWidget::layerTreeView() { 1439 WebKit::WebLayerTreeView* RenderWidget::layerTreeView() {
1449 return compositor_.get(); 1440 return compositor_.get();
1450 } 1441 }
1451 1442
1452 void RenderWidget::suppressCompositorScheduling(bool enable) { 1443 void RenderWidget::suppressCompositorScheduling(bool enable) {
1453 if (compositor_) 1444 if (compositor_)
1454 compositor_->SetSuppressScheduleComposite(enable); 1445 compositor_->SetSuppressScheduleComposite(enable);
1455 } 1446 }
1456 1447
1457 void RenderWidget::willBeginCompositorFrame() { 1448 void RenderWidget::willBeginCompositorFrame() {
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 if (!context->Initialize( 2267 if (!context->Initialize(
2277 attributes, 2268 attributes,
2278 false /* bind generates resources */, 2269 false /* bind generates resources */,
2279 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZ E)) 2270 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZ E))
2280 return NULL; 2271 return NULL;
2281 return context.release(); 2272 return context.release();
2282 } 2273 }
2283 } 2274 }
2284 2275
2285 } // namespace content 2276 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698