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

Side by Side Diff: services/gfx/compositor/compositor_app.cc

Issue 1552963002: Initial checkin of the new Mozart compositor. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-11
Patch Set: fix android build Created 4 years, 11 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
« no previous file with comments | « services/gfx/compositor/compositor_app.h ('k') | services/gfx/compositor/compositor_engine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "services/gfx/compositor/compositor_app.h"
6
7 #include "base/command_line.h"
8 #include "base/logging.h"
9 #include "base/trace_event/trace_event.h"
10 #include "mojo/application/application_runner_chromium.h"
11 #include "mojo/common/tracing_impl.h"
12 #include "mojo/public/c/system/main.h"
13 #include "mojo/public/cpp/application/application_connection.h"
14 #include "mojo/public/cpp/application/application_impl.h"
15 #include "services/gfx/compositor/compositor_impl.h"
16
17 namespace compositor {
18
19 CompositorApp::CompositorApp() : app_impl_(nullptr) {}
20
21 CompositorApp::~CompositorApp() {}
22
23 void CompositorApp::Initialize(mojo::ApplicationImpl* app_impl) {
24 app_impl_ = app_impl;
25
26 auto command_line = base::CommandLine::ForCurrentProcess();
27 command_line->InitFromArgv(app_impl_->args());
28 logging::LoggingSettings settings;
29 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
30 logging::InitLogging(settings);
31
32 tracing_.Initialize(app_impl_);
33
34 engine_.reset(new CompositorEngine());
35 }
36
37 bool CompositorApp::ConfigureIncomingConnection(
38 mojo::ApplicationConnection* connection) {
39 connection->AddService<mojo::gfx::composition::Compositor>(this);
40 return true;
41 }
42
43 void CompositorApp::Create(
44 mojo::ApplicationConnection* connection,
45 mojo::InterfaceRequest<mojo::gfx::composition::Compositor> request) {
46 compositor_bindings_.AddBinding(new CompositorImpl(engine_.get()),
47 request.Pass());
48 }
49
50 } // namespace compositor
OLDNEW
« no previous file with comments | « services/gfx/compositor/compositor_app.h ('k') | services/gfx/compositor/compositor_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698