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

Unified Diff: components/exo/compositor_frame_sink_holder.h

Issue 2493223002: Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (Closed)
Patch Set: Added CompositorFrameSinkHolder class and addressed comments" Created 4 years, 1 month 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: 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_

Powered by Google App Engine
This is Rietveld 408576698