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

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

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/compositor_frame_sink.h ('k') | components/exo/compositor_frame_sink_holder.h » ('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 #include "components/exo/compositor_frame_sink.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "cc/surfaces/surface.h"
9 #include "cc/surfaces/surface_manager.h"
10 #include "components/exo/compositor_frame_sink_holder.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h"
12
13 namespace exo {
14
15 ////////////////////////////////////////////////////////////////////////////////
16 // ExoComopositorFrameSink, public:
17
18 CompositorFrameSink::CompositorFrameSink(const cc::FrameSinkId& frame_sink_id,
19 cc::SurfaceManager* surface_manager,
20 CompositorFrameSinkHolder* client)
21 : support_(cc::CompositorFrameSinkSupport::Create(
22 this,
23 surface_manager,
24 frame_sink_id,
25 false /* is_root */,
26 true /* handles_frame_sink_id_invalidation */,
27 true /* needs_sync_points */)),
28 client_(client) {}
29
30 CompositorFrameSink::~CompositorFrameSink() {}
31
32 ////////////////////////////////////////////////////////////////////////////////
33 // cc::mojom::MojoCompositorFrameSink overrides:
34
35 void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) {
36 support_->SetNeedsBeginFrame(needs_begin_frame);
37 }
38
39 void CompositorFrameSink::SubmitCompositorFrame(
40 const cc::LocalSurfaceId& local_surface_id,
41 cc::CompositorFrame frame) {
42 support_->SubmitCompositorFrame(local_surface_id, std::move(frame));
43 }
44
45 void CompositorFrameSink::BeginFrameDidNotSwap(
46 const cc::BeginFrameAck& begin_frame_ack) {
47 support_->BeginFrameDidNotSwap(begin_frame_ack);
48 }
49
50 void CompositorFrameSink::EvictFrame() {
51 support_->EvictFrame();
52 }
53
54 ////////////////////////////////////////////////////////////////////////////////
55 // cc::CompositorFrameSinkSupportClient overrides:
56
57 void CompositorFrameSink::DidReceiveCompositorFrameAck(
58 const cc::ReturnedResourceArray& resources) {
59 client_->DidReceiveCompositorFrameAck(resources);
60 }
61
62 void CompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
63 client_->OnBeginFrame(args);
64 }
65
66 void CompositorFrameSink::ReclaimResources(
67 const cc::ReturnedResourceArray& resources) {
68 client_->ReclaimResources(resources);
69 }
70
71 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/compositor_frame_sink.h ('k') | components/exo/compositor_frame_sink_holder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698