Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "components/viz/frame_sinks/gpu_root_compositor_frame_sink.h" | 5 #include "components/viz/frame_sinks/gpu_root_compositor_frame_sink.h" |
| 6 | 6 |
| 7 #include "cc/surfaces/compositor_frame_sink_support.h" | 7 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 8 #include "cc/surfaces/display.h" | 8 #include "cc/surfaces/display.h" |
| 9 | 9 |
| 10 namespace viz { | 10 namespace viz { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 support_->RequestCopyOfSurface(std::move(request)); | 107 support_->RequestCopyOfSurface(std::move(request)); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() { | 110 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() { |
| 111 // TODO(staraz): Implement this. Client should hear about context/output | 111 // TODO(staraz): Implement this. Client should hear about context/output |
| 112 // surface lost. | 112 // surface lost. |
| 113 } | 113 } |
| 114 | 114 |
| 115 void GpuRootCompositorFrameSink::DisplayWillDrawAndSwap( | 115 void GpuRootCompositorFrameSink::DisplayWillDrawAndSwap( |
| 116 bool will_draw_and_swap, | 116 bool will_draw_and_swap, |
| 117 const cc::RenderPassList& render_pass) {} | 117 const cc::RenderPassList& render_pass) { |
| 118 hittest_aggregator_.Aggregate(display_->CurrentSurfaceId()); | |
|
rjkroege
2017/06/02 22:45:44
am not sure that this is right?
gklassen
2017/06/05 21:32:13
in what way? Not sure the surface id should be us
| |
| 119 } | |
| 118 | 120 |
| 119 void GpuRootCompositorFrameSink::DisplayDidDrawAndSwap() {} | 121 void GpuRootCompositorFrameSink::DisplayDidDrawAndSwap() {} |
| 120 | 122 |
| 121 void GpuRootCompositorFrameSink::DidReceiveCompositorFrameAck( | 123 void GpuRootCompositorFrameSink::DidReceiveCompositorFrameAck( |
| 122 const cc::ReturnedResourceArray& resources) { | 124 const cc::ReturnedResourceArray& resources) { |
| 123 if (client_) | 125 if (client_) |
| 124 client_->DidReceiveCompositorFrameAck(resources); | 126 client_->DidReceiveCompositorFrameAck(resources); |
| 125 } | 127 } |
| 126 | 128 |
| 127 void GpuRootCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { | 129 void GpuRootCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 147 } | 149 } |
| 148 | 150 |
| 149 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { | 151 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { |
| 150 private_connection_lost_ = true; | 152 private_connection_lost_ = true; |
| 151 // Request destruction of |this| only if both connections are lost. | 153 // Request destruction of |this| only if both connections are lost. |
| 152 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 154 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
| 153 client_connection_lost_); | 155 client_connection_lost_); |
| 154 } | 156 } |
| 155 | 157 |
| 156 } // namespace viz | 158 } // namespace viz |
| OLD | NEW |