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

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

Issue 2626293005: exo::CompositorFrameSink uses CompositorFrameSinkHolder* instead of mojo interface pointer (Closed)
Patch Set: Addressed nit Created 3 years, 11 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_holder.h ('k') | components/exo/surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/exo/compositor_frame_sink_holder.h" 5 #include "components/exo/compositor_frame_sink_holder.h"
6 6
7 #include "cc/resources/returned_resource.h" 7 #include "cc/resources/returned_resource.h"
8 #include "components/exo/surface.h" 8 #include "components/exo/surface.h"
9 9
10 namespace exo { 10 namespace exo {
11 11
12 //////////////////////////////////////////////////////////////////////////////// 12 ////////////////////////////////////////////////////////////////////////////////
13 // CompositorFrameSinkHolder, public: 13 // CompositorFrameSinkHolder, public:
14 14
15 CompositorFrameSinkHolder::CompositorFrameSinkHolder( 15 CompositorFrameSinkHolder::CompositorFrameSinkHolder(
16 Surface* surface, 16 Surface* surface,
17 std::unique_ptr<CompositorFrameSink> frame_sink, 17 const cc::FrameSinkId& frame_sink_id,
18 cc::mojom::MojoCompositorFrameSinkClientRequest request) 18 cc::SurfaceManager* surface_manager)
19 : surface_(surface), 19 : surface_(surface),
20 frame_sink_(std::move(frame_sink)), 20 frame_sink_(
21 new CompositorFrameSink(frame_sink_id, surface_manager, this)),
21 begin_frame_source_(base::MakeUnique<cc::ExternalBeginFrameSource>(this)), 22 begin_frame_source_(base::MakeUnique<cc::ExternalBeginFrameSource>(this)),
22 binding_(this, std::move(request)),
23 weak_factory_(this) { 23 weak_factory_(this) {
24 surface_->AddSurfaceObserver(this); 24 surface_->AddSurfaceObserver(this);
25 } 25 }
26 26
27 bool CompositorFrameSinkHolder::HasReleaseCallbackForResource( 27 bool CompositorFrameSinkHolder::HasReleaseCallbackForResource(
28 cc::ResourceId id) { 28 cc::ResourceId id) {
29 return release_callbacks_.find(id) != release_callbacks_.end(); 29 return release_callbacks_.find(id) != release_callbacks_.end();
30 } 30 }
31 31
32 void CompositorFrameSinkHolder::SetResourceReleaseCallback( 32 void CompositorFrameSinkHolder::SetResourceReleaseCallback(
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 bool needs_begin_frame = surface_ && surface_->NeedsBeginFrame(); 123 bool needs_begin_frame = surface_ && surface_->NeedsBeginFrame();
124 if (needs_begin_frame == needs_begin_frame_) 124 if (needs_begin_frame == needs_begin_frame_)
125 return; 125 return;
126 126
127 needs_begin_frame_ = needs_begin_frame; 127 needs_begin_frame_ = needs_begin_frame;
128 OnNeedsBeginFrames(needs_begin_frame_); 128 OnNeedsBeginFrames(needs_begin_frame_);
129 } 129 }
130 130
131 } // namespace exo 131 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/compositor_frame_sink_holder.h ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698