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

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

Issue 2493223002: Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « components/exo/exo_compositor_frame_sink.h ('k') | components/exo/surface.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/exo_compositor_frame_sink.h"
6
7 namespace exo {
8
9 ////////////////////////////////////////////////////////////////////////////////
10 // ExoComopositorFrameSink, public:
11
12 ExoComopositorFrameSink::ExoComopositorFrameSink() {}
13
14 ////////////////////////////////////////////////////////////////////////////////
15 // cc::SurfaceFactoryClient overrides:
16
17 void ExoComopositorFrameSink::ReturnResources(
18 const cc::ReturnedResourceArray& resources) {
19 scoped_refptr<ExoComopositorFrameSink> holder(this);
20 for (auto& resource : resources) {
21 auto it = release_callbacks_.find(resource.id);
22 DCHECK(it != release_callbacks_.end());
23 it->second.second->Run(resource.sync_token, resource.lost);
24 release_callbacks_.erase(it);
25 }
26 }
27
28 void ExoComopositorFrameSink::WillDrawSurface(const cc::LocalFrameId& id,
29 const gfx::Rect& damage_rect) {
30 if (surface_)
31 surface_->WillDraw();
32 }
33
34 void ExoComopositorFrameSink::SetBeginFrameSource(
35 cc::BeginFrameSource* begin_frame_source) {
36 if (surface_)
37 surface_->SetBeginFrameSource(begin_frame_source);
38 }
39
40 ////////////////////////////////////////////////////////////////////////////////
41 // ExoComopositorFrameSink, private:
42
43 ExoComopositorFrameSink::~ExoComopositorFrameSink() {
44 if (surface_factory_->manager())
45 surface_factory_->manager()->InvalidateFrameSinkId(frame_sink_id_);
46 }
47
48 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/exo_compositor_frame_sink.h ('k') | components/exo/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698