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 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 raster_worker_pool_ = nullptr; | 2047 raster_worker_pool_ = nullptr; |
2048 } | 2048 } |
2049 | 2049 |
2050 bool LayerTreeHostImpl::UsePendingTreeForSync() const { | 2050 bool LayerTreeHostImpl::UsePendingTreeForSync() const { |
2051 // In impl-side painting, synchronize to the pending tree so that it has | 2051 // In impl-side painting, synchronize to the pending tree so that it has |
2052 // time to raster before being displayed. | 2052 // time to raster before being displayed. |
2053 return settings_.impl_side_painting; | 2053 return settings_.impl_side_painting; |
2054 } | 2054 } |
2055 | 2055 |
2056 bool LayerTreeHostImpl::UseZeroCopyRasterizer() const { | 2056 bool LayerTreeHostImpl::UseZeroCopyRasterizer() const { |
2057 return settings_.use_zero_copy && GetRendererCapabilities().using_map_image; | 2057 return settings_.use_zero_copy && GetRendererCapabilities().using_image; |
2058 } | 2058 } |
2059 | 2059 |
2060 bool LayerTreeHostImpl::UseOneCopyRasterizer() const { | 2060 bool LayerTreeHostImpl::UseOneCopyRasterizer() const { |
2061 // Sync query support is required by one-copy rasterizer. | 2061 // Sync query support is required by one-copy rasterizer. |
2062 return settings_.use_one_copy && GetRendererCapabilities().using_map_image && | 2062 return settings_.use_one_copy && GetRendererCapabilities().using_image && |
2063 resource_provider_->use_sync_query(); | 2063 resource_provider_->use_sync_query(); |
2064 } | 2064 } |
2065 | 2065 |
2066 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) { | 2066 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) { |
2067 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget); | 2067 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget); |
2068 } | 2068 } |
2069 | 2069 |
2070 bool LayerTreeHostImpl::InitializeRenderer( | 2070 bool LayerTreeHostImpl::InitializeRenderer( |
2071 scoped_ptr<OutputSurface> output_surface) { | 2071 scoped_ptr<OutputSurface> output_surface) { |
2072 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer"); | 2072 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer"); |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3400 } | 3400 } |
3401 | 3401 |
3402 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3402 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3403 std::vector<PictureLayerImpl*>::iterator it = | 3403 std::vector<PictureLayerImpl*>::iterator it = |
3404 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3404 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3405 DCHECK(it != picture_layers_.end()); | 3405 DCHECK(it != picture_layers_.end()); |
3406 picture_layers_.erase(it); | 3406 picture_layers_.erase(it); |
3407 } | 3407 } |
3408 | 3408 |
3409 } // namespace cc | 3409 } // namespace cc |
OLD | NEW |