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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 if (current_surface_id_.is_valid()) | 172 if (current_surface_id_.is_valid()) |
173 aggregator_->SetFullDamageForSurface(current_surface_id_); | 173 aggregator_->SetFullDamageForSurface(current_surface_id_); |
174 } | 174 } |
175 } | 175 } |
176 | 176 |
177 void Display::InitializeRenderer() { | 177 void Display::InitializeRenderer() { |
178 // Not relevant for display compositor since it's not delegated. | 178 // Not relevant for display compositor since it's not delegated. |
179 bool delegated_sync_points_required = false; | 179 bool delegated_sync_points_required = false; |
180 resource_provider_.reset(new ResourceProvider( | 180 resource_provider_.reset(new ResourceProvider( |
181 output_surface_->context_provider(), bitmap_manager_, | 181 output_surface_->context_provider(), bitmap_manager_, |
182 gpu_memory_buffer_manager_, nullptr, settings_.highp_threshold_min, | 182 gpu_memory_buffer_manager_, nullptr, |
183 settings_.texture_id_allocation_chunk_size, | 183 settings_.texture_id_allocation_chunk_size, |
184 delegated_sync_points_required, settings_.use_gpu_memory_buffer_resources, | 184 delegated_sync_points_required, settings_.use_gpu_memory_buffer_resources, |
185 false, settings_.buffer_to_texture_target_map)); | 185 false, settings_.buffer_to_texture_target_map)); |
186 | 186 |
187 if (output_surface_->context_provider()) { | 187 if (output_surface_->context_provider()) { |
188 DCHECK(texture_mailbox_deleter_); | 188 DCHECK(texture_mailbox_deleter_); |
189 renderer_ = base::MakeUnique<GLRenderer>( | 189 renderer_ = base::MakeUnique<GLRenderer>( |
190 &settings_, output_surface_.get(), resource_provider_.get(), | 190 &settings_, output_surface_.get(), resource_provider_.get(), |
191 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); | 191 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); |
192 } else if (output_surface_->vulkan_context_provider()) { | 192 } else if (output_surface_->vulkan_context_provider()) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 const SurfaceId& Display::CurrentSurfaceId() { | 397 const SurfaceId& Display::CurrentSurfaceId() { |
398 return current_surface_id_; | 398 return current_surface_id_; |
399 } | 399 } |
400 | 400 |
401 void Display::ForceImmediateDrawAndSwapIfPossible() { | 401 void Display::ForceImmediateDrawAndSwapIfPossible() { |
402 if (scheduler_) | 402 if (scheduler_) |
403 scheduler_->ForceImmediateSwapIfPossible(); | 403 scheduler_->ForceImmediateSwapIfPossible(); |
404 } | 404 } |
405 | 405 |
406 } // namespace cc | 406 } // namespace cc |
OLD | NEW |