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

Side by Side Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: 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
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 CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ 5 #ifndef CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_
6 #define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ 6 #define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 12 matching lines...) Expand all
23 23
24 class CC_SURFACES_EXPORT CompositorFrameSinkSupport 24 class CC_SURFACES_EXPORT CompositorFrameSinkSupport
25 : public NON_EXPORTED_BASE(DisplayClient), 25 : public NON_EXPORTED_BASE(DisplayClient),
26 public SurfaceFactoryClient, 26 public SurfaceFactoryClient,
27 public BeginFrameObserver { 27 public BeginFrameObserver {
28 public: 28 public:
29 CompositorFrameSinkSupport( 29 CompositorFrameSinkSupport(
30 CompositorFrameSinkSupportClient* client, 30 CompositorFrameSinkSupportClient* client,
31 SurfaceManager* surface_manager, 31 SurfaceManager* surface_manager,
32 const FrameSinkId& frame_sink_id, 32 const FrameSinkId& frame_sink_id,
33 std::unique_ptr<Display> display, 33 Display* display,
34 std::unique_ptr<BeginFrameSource> display_begin_frame_source); 34 std::unique_ptr<BeginFrameSource> display_begin_frame_source);
35 35
36 ~CompositorFrameSinkSupport() override; 36 ~CompositorFrameSinkSupport() override;
37 37
38 const FrameSinkId& frame_sink_id() const { return frame_sink_id_; } 38 const FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
39 39
40 void EvictFrame(); 40 void EvictFrame();
41 void SetNeedsBeginFrame(bool needs_begin_frame); 41 void SetNeedsBeginFrame(bool needs_begin_frame);
42 void SubmitCompositorFrame(const LocalFrameId& local_frame_id, 42 void SubmitCompositorFrame(const LocalFrameId& local_frame_id,
43 CompositorFrame frame); 43 CompositorFrame frame);
44 void Require(const LocalFrameId& local_frame_id, 44 void Require(const LocalFrameId& local_frame_id,
45 const SurfaceSequence& sequence); 45 const SurfaceSequence& sequence);
46 void Satisfy(const SurfaceSequence& sequence); 46 void Satisfy(const SurfaceSequence& sequence);
47 void AddChildFrameSink(const FrameSinkId& child_frame_sink_id); 47 void AddChildFrameSink(const FrameSinkId& child_frame_sink_id);
48 void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id); 48 void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id);
49 void SetFactoryNeedsSyncPoints(bool needs_sync_points);
50 void ForceReclaimResources();
51 void BindToClient();
52 void DetachFromClient();
53 void SetDisplayVisible(bool visible);
54 void RegisterFrameSinkId();
55 void InvalidateFrameSinkId();
49 56
50 Display* display() { return display_.get(); } 57 Display* display() { return display_.get(); }
51 58
52 private: 59 private:
53 void DidReceiveCompositorFrameAck(); 60 void DidReceiveCompositorFrameAck();
54 61
55 // DisplayClient implementation. 62 // DisplayClient implementation.
56 void DisplayOutputSurfaceLost() override; 63 void DisplayOutputSurfaceLost() override;
57 void DisplayWillDrawAndSwap(bool will_draw_and_swap, 64 void DisplayWillDrawAndSwap(bool will_draw_and_swap,
58 const RenderPassList& render_passes) override; 65 const RenderPassList& render_passes) override;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_; 113 std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_;
107 114
108 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; 115 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_;
109 116
110 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); 117 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport);
111 }; 118 };
112 119
113 } // namespace cc 120 } // namespace cc
114 121
115 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ 122 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.cc » ('j') | cc/surfaces/compositor_frame_sink_support.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698