Chromium Code Reviews| Index: components/exo/compositor_frame_sink_holder.h |
| diff --git a/components/exo/compositor_frame_sink_holder.h b/components/exo/compositor_frame_sink_holder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ccf1528e7ea2a42066f83e3a54e7b335984cb575 |
| --- /dev/null |
| +++ b/components/exo/compositor_frame_sink_holder.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 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. |
| + |
| +#ifndef COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ |
| +#define COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ |
| + |
| +#include <map> |
| + |
| +#include "cc/resources/single_release_callback.h" |
| +#include "cc/resources/transferable_resource.h" |
| +#include "cc/scheduler/begin_frame_source.h" |
| + |
| +namespace exo { |
| + |
| +// TODO(staraz): Implement MojoCompositorFrameSinkClient |
| +class CompositorFrameSinkHolder |
| + : public base::RefCounted<CompositorFrameSinkHolder> { |
| + public: |
| + CompositorFrameSinkHolder(); |
| + |
| + // cc::mojom::MojoCompositorFrameSinkClient: |
| + void DidReceiveCompositorFrameAck(); |
|
Fady Samuel
2016/11/17 21:42:54
Add implementations for these? TODOs are fine.
Alex Z.
2016/11/23 14:25:04
Done.
|
| + void OnBeginFrame(const cc::BeginFrameArgs& args); |
| + void ReclaimResources(const cc::ReturnedResourceArray& resources); |
| + |
| + private: |
| + friend class base::RefCounted<CompositorFrameSinkHolder>; |
| + friend class Surface; |
| + |
| + ~CompositorFrameSinkHolder(); |
| + |
| + std::map<int, |
| + std::pair<scoped_refptr<CompositorFrameSinkHolder>, |
| + std::unique_ptr<cc::SingleReleaseCallback>>> |
| + release_callbacks_; |
| +}; |
|
Fady Samuel
2016/11/17 21:42:54
nit: DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkH
Alex Z.
2016/11/23 14:25:04
Done.
|
| + |
| +} // namespace exo |
| + |
| +#endif // COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ |