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

Side by Side Diff: components/view_manager/view_manager_app.cc

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/view_manager/view_manager_app.h" 5 #include "components/view_manager/view_manager_app.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "components/view_manager/client_connection.h" 9 #include "components/view_manager/client_connection.h"
10 #include "components/view_manager/connection_manager.h" 10 #include "components/view_manager/connection_manager.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 event_source_ = ui::PlatformEventSource::CreateDefault(); 55 event_source_ = ui::PlatformEventSource::CreateDefault();
56 if (command_line->HasSwitch(mojo::kUseTestConfig)) 56 if (command_line->HasSwitch(mojo::kUseTestConfig))
57 gfx::GLSurfaceTestSupport::InitializeOneOff(); 57 gfx::GLSurfaceTestSupport::InitializeOneOff();
58 else 58 else
59 gfx::GLSurface::InitializeOneOff(); 59 gfx::GLSurface::InitializeOneOff();
60 } 60 }
61 #endif 61 #endif
62 62
63 if (!gpu_state_.get()) 63 if (!gpu_state_.get())
64 gpu_state_ = new gles2::GpuState; 64 gpu_state_ = new gles2::GpuState;
65 connection_manager_.reset(new ConnectionManager(this)); 65 connection_manager_.reset(new ConnectionManager(this, surfaces_state_));
66 } 66 }
67 67
68 bool ViewManagerApp::ConfigureIncomingConnection( 68 bool ViewManagerApp::ConfigureIncomingConnection(
69 ApplicationConnection* connection) { 69 ApplicationConnection* connection) {
70 // ViewManager 70 // ViewManager
71 connection->AddService<ViewManagerRoot>(this); 71 connection->AddService<ViewManagerRoot>(this);
72 // Surfaces 72 // Surfaces
73 // TODO(fsamuel): This should go away soon. 73 // TODO(fsamuel): This should go away soon.
74 connection->AddService<mojo::Surface>(this); 74 connection->AddService<mojo::Surface>(this);
75 // GPU 75 // GPU
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 new gles2::GpuImpl(request.Pass(), gpu_state_); 135 new gles2::GpuImpl(request.Pass(), gpu_state_);
136 } 136 }
137 137
138 void ViewManagerApp::Create( 138 void ViewManagerApp::Create(
139 mojo::ApplicationConnection* connection, 139 mojo::ApplicationConnection* connection,
140 mojo::InterfaceRequest<mojo::Surface> request) { 140 mojo::InterfaceRequest<mojo::Surface> request) {
141 new surfaces::SurfacesImpl(surfaces_state_, request.Pass()); 141 new surfaces::SurfacesImpl(surfaces_state_, request.Pass());
142 } 142 }
143 143
144 } // namespace view_manager 144 } // namespace view_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698