| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 aggregator_->SetFullDamageForSurface(current_surface_id_); | 166 aggregator_->SetFullDamageForSurface(current_surface_id_); |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 void Display::InitializeRenderer() { | 170 void Display::InitializeRenderer() { |
| 171 resource_provider_.reset(new ResourceProvider( | 171 resource_provider_.reset(new ResourceProvider( |
| 172 output_surface_->context_provider(), bitmap_manager_, | 172 output_surface_->context_provider(), bitmap_manager_, |
| 173 gpu_memory_buffer_manager_, nullptr, settings_.highp_threshold_min, | 173 gpu_memory_buffer_manager_, nullptr, settings_.highp_threshold_min, |
| 174 settings_.texture_id_allocation_chunk_size, | 174 settings_.texture_id_allocation_chunk_size, |
| 175 output_surface_->capabilities().delegated_sync_points_required, | 175 output_surface_->capabilities().delegated_sync_points_required, |
| 176 settings_.use_gpu_memory_buffer_resources, | 176 settings_.use_gpu_memory_buffer_resources, false, |
| 177 settings_.buffer_to_texture_target_map)); | 177 settings_.buffer_to_texture_target_map)); |
| 178 | 178 |
| 179 if (output_surface_->context_provider()) { | 179 if (output_surface_->context_provider()) { |
| 180 DCHECK(texture_mailbox_deleter_); | 180 DCHECK(texture_mailbox_deleter_); |
| 181 renderer_ = base::MakeUnique<GLRenderer>( | 181 renderer_ = base::MakeUnique<GLRenderer>( |
| 182 &settings_, output_surface_.get(), resource_provider_.get(), | 182 &settings_, output_surface_.get(), resource_provider_.get(), |
| 183 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); | 183 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); |
| 184 } else if (output_surface_->vulkan_context_provider()) { | 184 } else if (output_surface_->vulkan_context_provider()) { |
| 185 #if defined(ENABLE_VULKAN) | 185 #if defined(ENABLE_VULKAN) |
| 186 DCHECK(texture_mailbox_deleter_); | 186 DCHECK(texture_mailbox_deleter_); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 const SurfaceId& Display::CurrentSurfaceId() { | 428 const SurfaceId& Display::CurrentSurfaceId() { |
| 429 return current_surface_id_; | 429 return current_surface_id_; |
| 430 } | 430 } |
| 431 | 431 |
| 432 void Display::ForceImmediateDrawAndSwapIfPossible() { | 432 void Display::ForceImmediateDrawAndSwapIfPossible() { |
| 433 if (scheduler_) | 433 if (scheduler_) |
| 434 scheduler_->ForceImmediateSwapIfPossible(); | 434 scheduler_->ForceImmediateSwapIfPossible(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 } // namespace cc | 437 } // namespace cc |
| OLD | NEW |