| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 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 | 49 |
| 50 Display* display() { return display_.get(); } |
| 51 |
| 50 private: | 52 private: |
| 51 void DidReceiveCompositorFrameAck(); | 53 void DidReceiveCompositorFrameAck(); |
| 52 | 54 |
| 53 // DisplayClient implementation. | 55 // DisplayClient implementation. |
| 54 void DisplayOutputSurfaceLost() override; | 56 void DisplayOutputSurfaceLost() override; |
| 55 void DisplayWillDrawAndSwap(bool will_draw_and_swap, | 57 void DisplayWillDrawAndSwap(bool will_draw_and_swap, |
| 56 const RenderPassList& render_passes) override; | 58 const RenderPassList& render_passes) override; |
| 57 void DisplayDidDrawAndSwap() override; | 59 void DisplayDidDrawAndSwap() override; |
| 58 | 60 |
| 59 // SurfaceFactoryClient implementation. | 61 // SurfaceFactoryClient implementation. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_; | 106 std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_; |
| 105 | 107 |
| 106 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; | 108 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; |
| 107 | 109 |
| 108 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); | 110 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 } // namespace cc | 113 } // namespace cc |
| 112 | 114 |
| 113 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ | 115 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ |
| OLD | NEW |