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

Side by Side Diff: services/gfx/compositor/scene_impl.h

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/renderer_state.cc ('k') | services/gfx/compositor/scene_impl.cc » ('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 #ifndef SERVICES_GFX_COMPOSITOR_SCENE_IMPL_H_
6 #define SERVICES_GFX_COMPOSITOR_SCENE_IMPL_H_
7
8 #include "base/macros.h"
9 #include "mojo/common/binding_set.h"
10 #include "mojo/public/cpp/bindings/binding.h"
11 #include "mojo/services/gfx/composition/interfaces/scenes.mojom.h"
12 #include "mojo/services/gfx/composition/interfaces/scheduling.mojom.h"
13 #include "services/gfx/compositor/compositor_engine.h"
14 #include "services/gfx/compositor/scene_state.h"
15
16 namespace compositor {
17
18 // Scene interface implementation.
19 // This object is owned by its associated SceneState.
20 class SceneImpl : public mojo::gfx::composition::Scene,
21 public mojo::gfx::composition::SceneScheduler {
22 public:
23 SceneImpl(
24 CompositorEngine* engine,
25 SceneState* state,
26 mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene_request);
27 ~SceneImpl() override;
28
29 void set_connection_error_handler(const base::Closure& handler) {
30 scene_binding_.set_connection_error_handler(handler);
31 }
32
33 private:
34 // |Scene|:
35 void SetListener(mojo::gfx::composition::SceneListenerPtr listener) override;
36 void Update(mojo::gfx::composition::SceneUpdatePtr update) override;
37 void Publish(mojo::gfx::composition::SceneMetadataPtr metadata) override;
38 void GetScheduler(
39 mojo::InterfaceRequest<mojo::gfx::composition::SceneScheduler>
40 scheduler_request) override;
41
42 // |SceneScheduler|:
43 void ScheduleFrame(const ScheduleFrameCallback& callback) override;
44
45 CompositorEngine* const engine_;
46 SceneState* const state_;
47 mojo::Binding<mojo::gfx::composition::Scene> scene_binding_;
48 mojo::BindingSet<mojo::gfx::composition::SceneScheduler> scheduler_bindings_;
49
50 DISALLOW_COPY_AND_ASSIGN(SceneImpl);
51 };
52
53 } // namespace compositor
54
55 #endif // SERVICES_GFX_COMPOSITOR_SCENE_IMPL_H_
OLDNEW
« no previous file with comments | « services/gfx/compositor/renderer_state.cc ('k') | services/gfx/compositor/scene_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698