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

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

Issue 2801313002: Remove MojoCompositorFrameSink::WillDrawSurface (Closed)
Patch Set: Address Nit Created 3 years, 8 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.cc ('k') | components/exo/compositor_frame_sink_holder.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 #ifndef COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ 5 #ifndef COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
6 #define COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ 6 #define COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 30 matching lines...) Expand all
41 CompositorFrameSink* GetCompositorFrameSink() { return frame_sink_.get(); } 41 CompositorFrameSink* GetCompositorFrameSink() { return frame_sink_.get(); }
42 42
43 base::WeakPtr<CompositorFrameSinkHolder> GetWeakPtr() { 43 base::WeakPtr<CompositorFrameSinkHolder> GetWeakPtr() {
44 return weak_factory_.GetWeakPtr(); 44 return weak_factory_.GetWeakPtr();
45 } 45 }
46 46
47 // Overridden from cc::mojom::MojoCompositorFrameSinkClient: 47 // Overridden from cc::mojom::MojoCompositorFrameSinkClient:
48 void DidReceiveCompositorFrameAck() override; 48 void DidReceiveCompositorFrameAck() override;
49 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 49 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
50 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 50 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
51 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id,
52 const gfx::Rect& damage_rect) override;
53 51
54 // Overridden from cc::ExternalBeginFrameSourceClient: 52 // Overridden from cc::ExternalBeginFrameSourceClient:
55 void OnNeedsBeginFrames(bool needs_begin_frames) override; 53 void OnNeedsBeginFrames(bool needs_begin_frames) override;
56 void OnDidFinishFrame(const cc::BeginFrameAck& ack) override; 54 void OnDidFinishFrame(const cc::BeginFrameAck& ack) override;
57 55
58 // Overridden from SurfaceObserver: 56 // Overridden from SurfaceObserver:
59 void OnSurfaceDestroying(Surface* surface) override; 57 void OnSurfaceDestroying(Surface* surface) override;
60 58
61 private: 59 private:
62 friend class base::RefCounted<CompositorFrameSinkHolder>; 60 friend class base::RefCounted<CompositorFrameSinkHolder>;
63 61
64 ~CompositorFrameSinkHolder() override; 62 ~CompositorFrameSinkHolder() override;
65 63
66 // A collection of callbacks used to release resources. 64 // A collection of callbacks used to release resources.
67 using ResourceReleaseCallbackMap = std::map<int, cc::ReleaseCallback>; 65 using ResourceReleaseCallbackMap = std::map<int, cc::ReleaseCallback>;
68 ResourceReleaseCallbackMap release_callbacks_; 66 ResourceReleaseCallbackMap release_callbacks_;
69 67
70 Surface* surface_; 68 Surface* surface_;
71 std::unique_ptr<CompositorFrameSink> frame_sink_; 69 std::unique_ptr<CompositorFrameSink> frame_sink_;
72 std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_; 70 std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_;
73 71
74 base::WeakPtrFactory<CompositorFrameSinkHolder> weak_factory_; 72 base::WeakPtrFactory<CompositorFrameSinkHolder> weak_factory_;
75 73
76 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkHolder); 74 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkHolder);
77 }; 75 };
78 76
79 } // namespace exo 77 } // namespace exo
80 78
81 #endif // COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ 79 #endif // COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_
OLDNEW
« no previous file with comments | « components/exo/compositor_frame_sink.cc ('k') | components/exo/compositor_frame_sink_holder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698