| 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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2091 // In impl-side painting, synchronize to the pending tree so that it has | 2091 // In impl-side painting, synchronize to the pending tree so that it has |
| 2092 // time to raster before being displayed. | 2092 // time to raster before being displayed. |
| 2093 return settings_.impl_side_painting; | 2093 return settings_.impl_side_painting; |
| 2094 } | 2094 } |
| 2095 | 2095 |
| 2096 bool LayerTreeHostImpl::UseZeroCopyRasterizer() const { | 2096 bool LayerTreeHostImpl::UseZeroCopyRasterizer() const { |
| 2097 return settings_.use_zero_copy && GetRendererCapabilities().using_image; | 2097 return settings_.use_zero_copy && GetRendererCapabilities().using_image; |
| 2098 } | 2098 } |
| 2099 | 2099 |
| 2100 bool LayerTreeHostImpl::UseOneCopyRasterizer() const { | 2100 bool LayerTreeHostImpl::UseOneCopyRasterizer() const { |
| 2101 // Sync query support is required by one-copy rasterizer. | 2101 return settings_.use_one_copy && GetRendererCapabilities().using_image; |
| 2102 return settings_.use_one_copy && GetRendererCapabilities().using_image && | |
| 2103 resource_provider_->use_sync_query(); | |
| 2104 } | 2102 } |
| 2105 | 2103 |
| 2106 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) { | 2104 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) { |
| 2107 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget); | 2105 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget); |
| 2108 } | 2106 } |
| 2109 | 2107 |
| 2110 bool LayerTreeHostImpl::InitializeRenderer( | 2108 bool LayerTreeHostImpl::InitializeRenderer( |
| 2111 scoped_ptr<OutputSurface> output_surface) { | 2109 scoped_ptr<OutputSurface> output_surface) { |
| 2112 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer"); | 2110 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer"); |
| 2113 | 2111 |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3480 } | 3478 } |
| 3481 | 3479 |
| 3482 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3480 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3483 std::vector<PictureLayerImpl*>::iterator it = | 3481 std::vector<PictureLayerImpl*>::iterator it = |
| 3484 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3482 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3485 DCHECK(it != picture_layers_.end()); | 3483 DCHECK(it != picture_layers_.end()); |
| 3486 picture_layers_.erase(it); | 3484 picture_layers_.erase(it); |
| 3487 } | 3485 } |
| 3488 | 3486 |
| 3489 } // namespace cc | 3487 } // namespace cc |
| OLD | NEW |