| 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/display_compositor/gpu_root_compositor_frame_sink.h" | 5 #include "components/display_compositor/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 display_compositor { | 10 namespace display_compositor { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 void GpuRootCompositorFrameSink::ResizeDisplay(const gfx::Size& size) { | 56 void GpuRootCompositorFrameSink::ResizeDisplay(const gfx::Size& size) { |
| 57 DCHECK(display_); | 57 DCHECK(display_); |
| 58 display_->Resize(size); | 58 display_->Resize(size); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void GpuRootCompositorFrameSink::SetDisplayColorSpace( | 61 void GpuRootCompositorFrameSink::SetDisplayColorSpace( |
| 62 const gfx::ColorSpace& color_space) { | 62 const gfx::ColorSpace& color_space) { |
| 63 DCHECK(display_); | 63 DCHECK(display_); |
| 64 display_->SetColorSpace(color_space); | 64 display_->SetColorSpace(color_space, color_space); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void GpuRootCompositorFrameSink::SetOutputIsSecure(bool secure) { | 67 void GpuRootCompositorFrameSink::SetOutputIsSecure(bool secure) { |
| 68 DCHECK(display_); | 68 DCHECK(display_); |
| 69 display_->SetOutputIsSecure(secure); | 69 display_->SetOutputIsSecure(secure); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void GpuRootCompositorFrameSink::SetLocalSurfaceId( | 72 void GpuRootCompositorFrameSink::SetLocalSurfaceId( |
| 73 const cc::LocalSurfaceId& local_surface_id, | 73 const cc::LocalSurfaceId& local_surface_id, |
| 74 float scale_factor) { | 74 float scale_factor) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { | 143 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { |
| 144 private_connection_lost_ = true; | 144 private_connection_lost_ = true; |
| 145 // Request destruction of |this| only if both connections are lost. | 145 // Request destruction of |this| only if both connections are lost. |
| 146 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 146 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
| 147 client_connection_lost_); | 147 client_connection_lost_); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace display_compositor | 150 } // namespace display_compositor |
| OLD | NEW |