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

Side by Side Diff: services/ui/ws/compositor_frame_sink_client_binding.h

Issue 2890913002: Add CompositorFrameSinkClientBinding To Be Used By FrameGenerator (Closed)
Patch Set: Remove redundant SetNeedsBeginFrame 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 | « services/ui/ws/BUILD.gn ('k') | services/ui/ws/compositor_frame_sink_client_binding.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 2017 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_UI_WS_COMPOSITOR_FRAME_SINK_CLIENT_BINDING_H_
6 #define SERVICES_UI_WS_COMPOSITOR_FRAME_SINK_CLIENT_BINDING_H_
7
8 #include "base/macros.h"
9 #include "cc/ipc/frame_sink_manager.mojom.h"
10 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
11 #include "cc/surfaces/local_surface_id_allocator.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13
14 namespace ui {
15 namespace ws {
16
17 // CompositorFrameSinkClientBinding manages the binding between a FrameGenerator
18 // and its MojoCompositorFrameSink. CompositorFrameSinkClientBinding exists so
19 // that a mock implementation of MojoCompositorFrameSink can be injected for
20 // tests. FrameGenerator owns its associated CompositorFrameSinkClientBinding.
21 class CompositorFrameSinkClientBinding
22 : public cc::mojom::MojoCompositorFrameSink {
23 public:
24 CompositorFrameSinkClientBinding(
25 cc::mojom::MojoCompositorFrameSinkClient* sink_client,
26 cc::mojom::MojoCompositorFrameSinkClientRequest sink_client_request,
27 cc::mojom::MojoCompositorFrameSinkAssociatedPtr compositor_frame_sink,
28 cc::mojom::DisplayPrivateAssociatedPtr display_private);
29 ~CompositorFrameSinkClientBinding() override;
30
31 private:
32 // cc::mojom::MojoCompositorFrameSink implementation:
33 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
34 cc::CompositorFrame frame) override;
35 void SetNeedsBeginFrame(bool needs_begin_frame) override;
36 void BeginFrameDidNotSwap(const cc::BeginFrameAck& ack) override;
37 void EvictCurrentSurface() override;
38
39 mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient> binding_;
40 cc::mojom::DisplayPrivateAssociatedPtr display_private_;
41 cc::mojom::MojoCompositorFrameSinkAssociatedPtr compositor_frame_sink_;
42 cc::LocalSurfaceId local_surface_id_;
43 cc::LocalSurfaceIdAllocator id_allocator_;
44 gfx::Size last_submitted_frame_size_;
45
46 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkClientBinding);
47 };
48 }
49 }
50
51 #endif // SERVICES_UI_WS_COMPOSITOR_FRAME_SINK_CLIENT_BINDING_H_
OLDNEW
« no previous file with comments | « services/ui/ws/BUILD.gn ('k') | services/ui/ws/compositor_frame_sink_client_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698