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

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

Issue 2868473002: Implement aura::Window::CreateCompositorFrameSink() (Closed)
Patch Set: Address review issues Created 3 years, 7 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 | « components/exo/buffer_unittest.cc ('k') | components/exo/compositor_frame_sink.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 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_EXO_COMPOSITOR_FRAME_SINK_H_
6 #define COMPONENTS_EXO_EXO_COMPOSITOR_FRAME_SINK_H_
7
8 #include "cc/ipc/compositor_frame.mojom.h"
9 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
10 #include "cc/resources/transferable_resource.h"
11 #include "cc/surfaces/compositor_frame_sink_support.h"
12 #include "cc/surfaces/compositor_frame_sink_support_client.h"
13 #include "mojo/public/cpp/bindings/strong_binding.h"
14
15 namespace exo {
16
17 class CompositorFrameSinkHolder;
18
19 class CompositorFrameSink : public cc::CompositorFrameSinkSupportClient,
20 public cc::mojom::MojoCompositorFrameSink {
21 public:
22 CompositorFrameSink(const cc::FrameSinkId& frame_sink_id,
23 cc::SurfaceManager* surface_manager,
24 CompositorFrameSinkHolder* client);
25
26 ~CompositorFrameSink() override;
27
28 // Overridden from cc::mojom::MojoCompositorFrameSink:
29 void SetNeedsBeginFrame(bool needs_begin_frame) override;
30 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
31 cc::CompositorFrame frame) override;
32 void BeginFrameDidNotSwap(const cc::BeginFrameAck& begin_frame_ack) override;
33 void EvictFrame() override;
34
35 // Overridden from cc::CompositorFrameSinkSupportClient:
36 void DidReceiveCompositorFrameAck(
37 const cc::ReturnedResourceArray& resources) override;
38 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
39 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
40 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id,
41 const gfx::Rect& damage_rect) override {}
42
43 private:
44 std::unique_ptr<cc::CompositorFrameSinkSupport> support_;
45 CompositorFrameSinkHolder* const client_;
46
47 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink);
48 };
49
50 } // namespace exo
51
52 #endif // COMPONENTS_EXO_EXO_COMPOSITOR_FRAME_SINK_H_
OLDNEW
« no previous file with comments | « components/exo/buffer_unittest.cc ('k') | components/exo/compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698