Chromium Code Reviews| Index: cc/surfaces/compositor_frame_sink_support.h |
| diff --git a/cc/surfaces/compositor_frame_sink_support.h b/cc/surfaces/compositor_frame_sink_support.h |
| index f0e19694704260d10b1a1d79a46b9bcf5e2ffa41..2d2e87956dc430581faa0b7275779f3ecd90fcbb 100644 |
| --- a/cc/surfaces/compositor_frame_sink_support.h |
| +++ b/cc/surfaces/compositor_frame_sink_support.h |
| @@ -26,12 +26,11 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport |
| public SurfaceFactoryClient, |
| public BeginFrameObserver { |
| public: |
| - CompositorFrameSinkSupport( |
| - CompositorFrameSinkSupportClient* client, |
| - SurfaceManager* surface_manager, |
| - const FrameSinkId& frame_sink_id, |
| - std::unique_ptr<Display> display, |
| - std::unique_ptr<BeginFrameSource> display_begin_frame_source); |
| + CompositorFrameSinkSupport(CompositorFrameSinkSupportClient* client, |
| + SurfaceManager* surface_manager, |
| + const FrameSinkId& frame_sink_id, |
| + Display* display, |
| + bool direct_compositor_frame_sink); |
|
Fady Samuel
2017/01/25 13:56:04
not lgtm. Please note that contradicts the directi
Alex Z.
2017/01/25 14:25:38
Yes, I added this before we talked on Monday.
I'm
|
| ~CompositorFrameSinkSupport() override; |
| @@ -46,8 +45,10 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport |
| void Satisfy(const SurfaceSequence& sequence); |
| void AddChildFrameSink(const FrameSinkId& child_frame_sink_id); |
| void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id); |
| + void SetNeedsSyncPoints(bool needs_sync_points); |
| + void ForceReclaimResources(); |
| - Display* display() { return display_.get(); } |
| + Display* display() { return display_; } |
| private: |
| void DidReceiveCompositorFrameAck(); |
| @@ -77,11 +78,7 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport |
| const FrameSinkId frame_sink_id_; |
| - // GpuCompositorFrameSink holds a Display and its BeginFrameSource if it |
| - // created with non-null gpu::SurfaceHandle. In the window server, the display |
| - // root window's CompositorFrameSink will have a valid gpu::SurfaceHandle. |
| - std::unique_ptr<BeginFrameSource> display_begin_frame_source_; |
| - std::unique_ptr<Display> display_; |
| + Display* display_; |
| LocalFrameId local_frame_id_; |
| SurfaceFactory surface_factory_; |
| @@ -105,6 +102,8 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport |
| // The set of BeginFrame children of this CompositorFrameSink. |
| std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_; |
| + bool direct_compositor_frame_sink_ = false; |
| + |
| base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); |