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

Unified Diff: services/gfx/compositor/renderer_impl.cc

Issue 1552963002: Initial checkin of the new Mozart compositor. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-11
Patch Set: Created 4 years, 12 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
Index: services/gfx/compositor/renderer_impl.cc
diff --git a/services/gfx/compositor/renderer_impl.cc b/services/gfx/compositor/renderer_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7c730b0c1fe079477905deebad95bd6fb0dee8fe
--- /dev/null
+++ b/services/gfx/compositor/renderer_impl.cc
@@ -0,0 +1,41 @@
+// 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/renderer_impl.h"
+
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+
+namespace compositor {
+
+RendererImpl::RendererImpl(
+ CompositorEngine* engine,
+ RendererState* state,
+ mojo::InterfaceRequest<mojo::gfx::composition::Renderer> renderer_request)
+ : engine_(engine),
+ state_(state),
+ renderer_binding_(this, renderer_request.Pass()) {}
+
+RendererImpl::~RendererImpl() {}
+
+void RendererImpl::GetHitTester(
+ mojo::InterfaceRequest<mojo::gfx::composition::HitTester>
+ hit_tester_request) {
+ hit_tester_bindings.AddBinding(this, hit_tester_request.Pass());
+}
+
+void RendererImpl::SetRootScene(
+ mojo::gfx::composition::SceneTokenPtr scene_token,
+ uint32 scene_version,
+ mojo::RectPtr viewport) {
+ engine_->SetRootScene(state_, scene_token.Pass(), scene_version,
+ viewport.Pass());
+}
+
+void RendererImpl::HitTest(mojo::PointPtr point,
+ const HitTestCallback& callback) {
+ engine_->HitTest(state_, point.Pass(), callback);
+}
+
+} // namespace compositor

Powered by Google App Engine
This is Rietveld 408576698