| 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/display_compositor.h" | 5 #include "services/ui/surfaces/display_compositor.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "cc/output/in_process_context_provider.h" | 9 #include "cc/output/in_process_context_provider.h" |
| 10 #include "cc/output/texture_mailbox_deleter.h" | 10 #include "cc/output/texture_mailbox_deleter.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } else { | 193 } else { |
| 194 display_output_surface = base::MakeUnique<DisplayOutputSurface>( | 194 display_output_surface = base::MakeUnique<DisplayOutputSurface>( |
| 195 std::move(context_provider), synthetic_begin_frame_source.get()); | 195 std::move(context_provider), synthetic_begin_frame_source.get()); |
| 196 } | 196 } |
| 197 | 197 |
| 198 int max_frames_pending = | 198 int max_frames_pending = |
| 199 display_output_surface->capabilities().max_frames_pending; | 199 display_output_surface->capabilities().max_frames_pending; |
| 200 DCHECK_GT(max_frames_pending, 0); | 200 DCHECK_GT(max_frames_pending, 0); |
| 201 | 201 |
| 202 std::unique_ptr<cc::DisplayScheduler> scheduler( | 202 std::unique_ptr<cc::DisplayScheduler> scheduler( |
| 203 new cc::DisplayScheduler(synthetic_begin_frame_source.get(), | 203 new cc::DisplayScheduler(task_runner_.get(), max_frames_pending)); |
| 204 task_runner_.get(), max_frames_pending)); | |
| 205 | 204 |
| 206 return base::MakeUnique<cc::Display>( | 205 return base::MakeUnique<cc::Display>( |
| 207 nullptr /* bitmap_manager */, gpu_memory_buffer_manager_.get(), | 206 nullptr /* bitmap_manager */, gpu_memory_buffer_manager_.get(), |
| 208 cc::RendererSettings(), frame_sink_id, | 207 cc::RendererSettings(), frame_sink_id, |
| 209 std::move(synthetic_begin_frame_source), | 208 std::move(synthetic_begin_frame_source), |
| 210 std::move(display_output_surface), std::move(scheduler), | 209 std::move(display_output_surface), std::move(scheduler), |
| 211 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())); | 210 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())); |
| 212 } | 211 } |
| 213 | 212 |
| 214 const cc::SurfaceId& DisplayCompositor::GetRootSurfaceId() const { | 213 const cc::SurfaceId& DisplayCompositor::GetRootSurfaceId() const { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 230 surface_id.local_frame_id()); | 229 surface_id.local_frame_id()); |
| 231 | 230 |
| 232 if (client_) | 231 if (client_) |
| 233 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor); | 232 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor); |
| 234 } | 233 } |
| 235 | 234 |
| 236 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 235 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
| 237 bool* changed) {} | 236 bool* changed) {} |
| 238 | 237 |
| 239 } // namespace ui | 238 } // namespace ui |
| OLD | NEW |