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

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

Issue 2493223002: Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (Closed)
Patch Set: Updated DEPS rules to address errors in trybots' analyze step Created 4 years 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
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_holder.h"
6
7 #include "cc/resources/returned_resource.h"
8
9 namespace exo {
10
11 ////////////////////////////////////////////////////////////////////////////////
12 // CompositorFrameSinkHolder, public:
13 CompositorFrameSinkHolder::CompositorFrameSinkHolder(
14 cc::mojom::MojoCompositorFrameSinkClientRequest request)
15 : binding_(this, std::move(request)) {}
16
17 bool CompositorFrameSinkHolder::HasReleaseCallbacks(cc::ResourceId id) {
18 return release_callbacks_.count(id);
19 }
20
21 ////////////////////////////////////////////////////////////////////////////////
22 // cc::SurfaceFactoryClient overrides:
23
24 // TODO(staraz): Implement this
25 void CompositorFrameSinkHolder::DidReceiveCompositorFrameAck() {}
26
27 // TODO(staraz): Implement this
28 void CompositorFrameSinkHolder::OnBeginFrame(const cc::BeginFrameArgs& args) {}
29
30 void CompositorFrameSinkHolder::ReclaimResources(
31 const cc::ReturnedResourceArray& resources) {
32 for (auto& resource : resources) {
33 auto it = release_callbacks_.find(resource.id);
34 DCHECK(it != release_callbacks_.end());
35 it->second.second->Run(resource.sync_token, resource.lost);
36 release_callbacks_.erase(it);
37 }
38 }
39
40 ////////////////////////////////////////////////////////////////////////////////
41 // ExoComopositorFrameSink, private:
42 CompositorFrameSinkHolder::~CompositorFrameSinkHolder() {}
43
44 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698