| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/ui/surfaces/gpu_compositor_frame_sink.h" | 5 #include "services/ui/surfaces/gpu_compositor_frame_sink.h" |
| 6 | 6 |
| 7 #include "services/ui/surfaces/display_compositor.h" | 7 #include "services/ui/surfaces/display_compositor.h" |
| 8 | 8 |
| 9 namespace ui { | 9 namespace ui { |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 void GpuCompositorFrameSink::AddSurfaceReferences( | 50 void GpuCompositorFrameSink::AddSurfaceReferences( |
| 51 const std::vector<cc::SurfaceReference>& references) { | 51 const std::vector<cc::SurfaceReference>& references) { |
| 52 display_compositor_->AddSurfaceReferences(references); | 52 display_compositor_->AddSurfaceReferences(references); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void GpuCompositorFrameSink::RemoveSurfaceReferences( | 55 void GpuCompositorFrameSink::RemoveSurfaceReferences( |
| 56 const std::vector<cc::SurfaceReference>& references) { | 56 const std::vector<cc::SurfaceReference>& references) { |
| 57 display_compositor_->RemoveSurfaceReferences(references); | 57 display_compositor_->RemoveSurfaceReferences(references); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void GpuCompositorFrameSink::Require(const cc::LocalFrameId& local_frame_id, |
| 61 const cc::SurfaceSequence& sequence) { |
| 62 support_.Require(local_frame_id, sequence); |
| 63 } |
| 64 |
| 65 void GpuCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) { |
| 66 support_.Satisfy(sequence); |
| 67 } |
| 68 |
| 60 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { | 69 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { |
| 61 if (client_) | 70 if (client_) |
| 62 client_->DidReceiveCompositorFrameAck(); | 71 client_->DidReceiveCompositorFrameAck(); |
| 63 } | 72 } |
| 64 | 73 |
| 65 void GpuCompositorFrameSink::AddChildFrameSink( | 74 void GpuCompositorFrameSink::AddChildFrameSink( |
| 66 const cc::FrameSinkId& child_frame_sink_id) { | 75 const cc::FrameSinkId& child_frame_sink_id) { |
| 67 support_.AddChildFrameSink(child_frame_sink_id); | 76 support_.AddChildFrameSink(child_frame_sink_id); |
| 68 } | 77 } |
| 69 | 78 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 96 } | 105 } |
| 97 | 106 |
| 98 void GpuCompositorFrameSink::OnPrivateConnectionLost() { | 107 void GpuCompositorFrameSink::OnPrivateConnectionLost() { |
| 99 private_connection_lost_ = true; | 108 private_connection_lost_ = true; |
| 100 // Request destruction of |this| only if both connections are lost. | 109 // Request destruction of |this| only if both connections are lost. |
| 101 display_compositor_->OnCompositorFrameSinkPrivateConnectionLost( | 110 display_compositor_->OnCompositorFrameSinkPrivateConnectionLost( |
| 102 support_.frame_sink_id(), client_connection_lost_); | 111 support_.frame_sink_id(), client_connection_lost_); |
| 103 } | 112 } |
| 104 | 113 |
| 105 } // namespace ui | 114 } // namespace ui |
| OLD | NEW |