| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/surfaces/display.h" | 5 #include "cc/surfaces/display.h" |
| 6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 renderer_ = renderer.Pass(); | 115 renderer_ = renderer.Pass(); |
| 116 } else { | 116 } else { |
| 117 scoped_ptr<SoftwareRenderer> renderer = SoftwareRenderer::Create( | 117 scoped_ptr<SoftwareRenderer> renderer = SoftwareRenderer::Create( |
| 118 this, &settings_, output_surface_.get(), resource_provider.get()); | 118 this, &settings_, output_surface_.get(), resource_provider.get()); |
| 119 if (!renderer) | 119 if (!renderer) |
| 120 return; | 120 return; |
| 121 renderer_ = renderer.Pass(); | 121 renderer_ = renderer.Pass(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 resource_provider_ = resource_provider.Pass(); | 124 resource_provider_ = resource_provider.Pass(); |
| 125 aggregator_.reset(new SurfaceAggregator(manager_, resource_provider_.get())); | 125 // TODO(jbauman): Outputting an incomplete quad list doesn't work when using |
| 126 // overlays. |
| 127 bool output_partial_list = renderer_->Capabilities().using_partial_swap && |
| 128 !output_surface_->GetOverlayCandidateValidator(); |
| 129 aggregator_.reset(new SurfaceAggregator(manager_, resource_provider_.get(), |
| 130 output_partial_list)); |
| 126 } | 131 } |
| 127 | 132 |
| 128 void Display::DidLoseOutputSurface() { | 133 void Display::DidLoseOutputSurface() { |
| 129 client_->OutputSurfaceLost(); | 134 client_->OutputSurfaceLost(); |
| 130 if (scheduler_) | 135 if (scheduler_) |
| 131 scheduler_->OutputSurfaceLost(); | 136 scheduler_->OutputSurfaceLost(); |
| 132 } | 137 } |
| 133 | 138 |
| 134 void Display::UpdateRootSurfaceResourcesLocked() { | 139 void Display::UpdateRootSurfaceResourcesLocked() { |
| 135 Surface* surface = manager_->GetSurfaceForId(current_surface_id_); | 140 Surface* surface = manager_->GetSurfaceForId(current_surface_id_); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 286 |
| 282 if (surface_id == current_surface_id_) | 287 if (surface_id == current_surface_id_) |
| 283 UpdateRootSurfaceResourcesLocked(); | 288 UpdateRootSurfaceResourcesLocked(); |
| 284 } | 289 } |
| 285 | 290 |
| 286 SurfaceId Display::CurrentSurfaceId() { | 291 SurfaceId Display::CurrentSurfaceId() { |
| 287 return current_surface_id_; | 292 return current_surface_id_; |
| 288 } | 293 } |
| 289 | 294 |
| 290 } // namespace cc | 295 } // namespace cc |
| OLD | NEW |