| 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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 | 2051 |
| 2052 bool LayerTreeHostImpl::IsSynchronousSingleThreaded() const { | 2052 bool LayerTreeHostImpl::IsSynchronousSingleThreaded() const { |
| 2053 return !proxy_->HasImplThread() && !settings_.single_thread_proxy_scheduler; | 2053 return !proxy_->HasImplThread() && !settings_.single_thread_proxy_scheduler; |
| 2054 } | 2054 } |
| 2055 | 2055 |
| 2056 bool LayerTreeHostImpl::CanUseZeroCopyRasterizer() const { | 2056 bool LayerTreeHostImpl::CanUseZeroCopyRasterizer() const { |
| 2057 return GetRendererCapabilities().using_image; | 2057 return GetRendererCapabilities().using_image; |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 bool LayerTreeHostImpl::CanUseOneCopyRasterizer() const { | 2060 bool LayerTreeHostImpl::CanUseOneCopyRasterizer() const { |
| 2061 // Sync query support is required by one-copy rasterizer. | 2061 return GetRendererCapabilities().using_image; |
| 2062 return GetRendererCapabilities().using_image && | |
| 2063 resource_provider_->use_sync_query(); | |
| 2064 } | 2062 } |
| 2065 | 2063 |
| 2066 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) { | 2064 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) { |
| 2067 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget); | 2065 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget); |
| 2068 } | 2066 } |
| 2069 | 2067 |
| 2070 bool LayerTreeHostImpl::InitializeRenderer( | 2068 bool LayerTreeHostImpl::InitializeRenderer( |
| 2071 scoped_ptr<OutputSurface> output_surface) { | 2069 scoped_ptr<OutputSurface> output_surface) { |
| 2072 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer"); | 2070 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer"); |
| 2073 | 2071 |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3442 } | 3440 } |
| 3443 | 3441 |
| 3444 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3442 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3445 std::vector<PictureLayerImpl*>::iterator it = | 3443 std::vector<PictureLayerImpl*>::iterator it = |
| 3446 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3444 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3447 DCHECK(it != picture_layers_.end()); | 3445 DCHECK(it != picture_layers_.end()); |
| 3448 picture_layers_.erase(it); | 3446 picture_layers_.erase(it); |
| 3449 } | 3447 } |
| 3450 | 3448 |
| 3451 } // namespace cc | 3449 } // namespace cc |
| OLD | NEW |