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

Side by Side Diff: components/exo/compositor_frame_sink_holder.h

Issue 2493223002: Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (Closed)
Patch Set: Updated DEPS rules to address errors in trybots' analyze step Created 4 years 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
(Empty)
1 // Copyright 2016 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 COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
6 #define COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
7
8 #include <map>
9
10 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
11 #include "cc/resources/single_release_callback.h"
12 #include "cc/resources/transferable_resource.h"
13 #include "cc/scheduler/begin_frame_source.h"
14 #include "mojo/public/cpp/bindings/binding.h"
15
16 namespace exo {
17
18 class CompositorFrameSinkHolder
19 : public base::RefCounted<CompositorFrameSinkHolder>,
20 public cc::mojom::MojoCompositorFrameSinkClient {
21 public:
22 CompositorFrameSinkHolder(
23 cc::mojom::MojoCompositorFrameSinkClientRequest request);
24
25 bool HasReleaseCallbacks(cc::ResourceId id);
26
27 // cc::mojom::MojoCompositorFrameSinkClient:
28 void DidReceiveCompositorFrameAck() override;
29 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
30 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
31
32 private:
33 friend class base::RefCounted<CompositorFrameSinkHolder>;
34 friend class Surface;
35
36 ~CompositorFrameSinkHolder() override;
37
38 using ResourceReleaseCallbacks =
39 std::map<int,
40 std::pair<scoped_refptr<CompositorFrameSinkHolder>,
41 std::unique_ptr<cc::SingleReleaseCallback>>>;
42 ResourceReleaseCallbacks release_callbacks_;
43
44 mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient> binding_;
45
46 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkHolder);
47 };
48
49 } // namespace exo
50
51 #endif // COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698