| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1953 tile_task_worker_pool_->AsTileTaskRunner(), | 1953 tile_task_worker_pool_->AsTileTaskRunner(), |
| 1954 rasterizer_.get(), scheduled_raster_task_limit); | 1954 rasterizer_.get(), scheduled_raster_task_limit); |
| 1955 | 1955 |
| 1956 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 1956 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
| 1957 } | 1957 } |
| 1958 | 1958 |
| 1959 scoped_ptr<Rasterizer> LayerTreeHostImpl::CreateRasterizer() { | 1959 scoped_ptr<Rasterizer> LayerTreeHostImpl::CreateRasterizer() { |
| 1960 ContextProvider* context_provider = output_surface_->context_provider(); | 1960 ContextProvider* context_provider = output_surface_->context_provider(); |
| 1961 if (use_gpu_rasterization_ && context_provider) { | 1961 if (use_gpu_rasterization_ && context_provider) { |
| 1962 return GpuRasterizer::Create(context_provider, resource_provider_.get(), | 1962 return GpuRasterizer::Create(context_provider, resource_provider_.get(), |
| 1963 settings_.use_distance_field_text, false, | 1963 settings_.use_distance_field_text, |
| 1964 settings_.threaded_gpu_rasterization_enabled, |
| 1964 settings_.gpu_rasterization_msaa_sample_count); | 1965 settings_.gpu_rasterization_msaa_sample_count); |
| 1965 } | 1966 } |
| 1966 return SoftwareRasterizer::Create(); | 1967 return SoftwareRasterizer::Create(); |
| 1967 } | 1968 } |
| 1968 | 1969 |
| 1969 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( | 1970 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( |
| 1970 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 1971 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
| 1971 scoped_ptr<ResourcePool>* resource_pool, | 1972 scoped_ptr<ResourcePool>* resource_pool, |
| 1972 scoped_ptr<ResourcePool>* staging_resource_pool) { | 1973 scoped_ptr<ResourcePool>* staging_resource_pool) { |
| 1973 base::SingleThreadTaskRunner* task_runner = | 1974 base::SingleThreadTaskRunner* task_runner = |
| (...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3458 } | 3459 } |
| 3459 | 3460 |
| 3460 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3461 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3461 std::vector<PictureLayerImpl*>::iterator it = | 3462 std::vector<PictureLayerImpl*>::iterator it = |
| 3462 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3463 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3463 DCHECK(it != picture_layers_.end()); | 3464 DCHECK(it != picture_layers_.end()); |
| 3464 picture_layers_.erase(it); | 3465 picture_layers_.erase(it); |
| 3465 } | 3466 } |
| 3466 | 3467 |
| 3467 } // namespace cc | 3468 } // namespace cc |
| OLD | NEW |