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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/compositor_app.cc
diff --git a/services/gfx/compositor/compositor_app.cc b/services/gfx/compositor/compositor_app.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5fd8a9a1189444454403a788616230a9a984ccfd
--- /dev/null
+++ b/services/gfx/compositor/compositor_app.cc
@@ -0,0 +1,50 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/gfx/compositor/compositor_app.h"
+
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "base/trace_event/trace_event.h"
+#include "mojo/application/application_runner_chromium.h"
+#include "mojo/common/tracing_impl.h"
+#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/application/application_connection.h"
+#include "mojo/public/cpp/application/application_impl.h"
+#include "services/gfx/compositor/compositor_impl.h"
+
+namespace compositor {
+
+CompositorApp::CompositorApp() : app_impl_(nullptr) {}
+
+CompositorApp::~CompositorApp() {}
+
+void CompositorApp::Initialize(mojo::ApplicationImpl* app_impl) {
+ app_impl_ = app_impl;
+
+ auto command_line = base::CommandLine::ForCurrentProcess();
+ command_line->InitFromArgv(app_impl_->args());
+ logging::LoggingSettings settings;
+ settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
+ logging::InitLogging(settings);
+
+ tracing_.Initialize(app_impl_);
+
+ engine_.reset(new CompositorEngine());
+}
+
+bool CompositorApp::ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) {
+ connection->AddService<mojo::gfx::composition::Compositor>(this);
+ return true;
+}
+
+void CompositorApp::Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::gfx::composition::Compositor> request) {
+ compositor_bindings_.AddBinding(new CompositorImpl(engine_.get()),
+ request.Pass());
+}
+
+} // namespace compositor
« 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