| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } else { | 199 } else { |
| 200 display_output_surface = base::MakeUnique<DisplayOutputSurface>( | 200 display_output_surface = base::MakeUnique<DisplayOutputSurface>( |
| 201 std::move(context_provider), synthetic_begin_frame_source.get()); | 201 std::move(context_provider), synthetic_begin_frame_source.get()); |
| 202 } | 202 } |
| 203 | 203 |
| 204 int max_frames_pending = | 204 int max_frames_pending = |
| 205 display_output_surface->capabilities().max_frames_pending; | 205 display_output_surface->capabilities().max_frames_pending; |
| 206 DCHECK_GT(max_frames_pending, 0); | 206 DCHECK_GT(max_frames_pending, 0); |
| 207 | 207 |
| 208 std::unique_ptr<cc::DisplayScheduler> scheduler( | 208 std::unique_ptr<cc::DisplayScheduler> scheduler( |
| 209 new cc::DisplayScheduler(synthetic_begin_frame_source.get(), | 209 new cc::DisplayScheduler(task_runner_.get(), max_frames_pending)); |
| 210 task_runner_.get(), max_frames_pending)); | |
| 211 | 210 |
| 212 return base::MakeUnique<cc::Display>( | 211 return base::MakeUnique<cc::Display>( |
| 213 nullptr /* bitmap_manager */, gpu_memory_buffer_manager_.get(), | 212 nullptr /* bitmap_manager */, gpu_memory_buffer_manager_.get(), |
| 214 cc::RendererSettings(), frame_sink_id, | 213 cc::RendererSettings(), frame_sink_id, |
| 215 std::move(synthetic_begin_frame_source), | 214 std::move(synthetic_begin_frame_source), |
| 216 std::move(display_output_surface), std::move(scheduler), | 215 std::move(display_output_surface), std::move(scheduler), |
| 217 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())); | 216 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())); |
| 218 } | 217 } |
| 219 | 218 |
| 220 const cc::SurfaceId& DisplayCompositor::GetRootSurfaceId() const { | 219 const cc::SurfaceId& DisplayCompositor::GetRootSurfaceId() const { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 236 surface_id.local_frame_id()); | 235 surface_id.local_frame_id()); |
| 237 | 236 |
| 238 if (client_) | 237 if (client_) |
| 239 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor); | 238 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor); |
| 240 } | 239 } |
| 241 | 240 |
| 242 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 241 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
| 243 bool* changed) {} | 242 bool* changed) {} |
| 244 | 243 |
| 245 } // namespace ui | 244 } // namespace ui |
| OLD | NEW |