| 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 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1699 client_->SetNeedsRedrawOnImplThread(); | 1699 client_->SetNeedsRedrawOnImplThread(); |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { | 1702 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { |
| 1703 ManagedMemoryPolicy actual = cached_managed_memory_policy_; | 1703 ManagedMemoryPolicy actual = cached_managed_memory_policy_; |
| 1704 // TODO(ernstm): The second condition disables pre-painting for all layers | 1704 // TODO(ernstm): The second condition disables pre-painting for all layers |
| 1705 // when GPU rasterization is enabled. Once we selectively enable GPU | 1705 // when GPU rasterization is enabled. Once we selectively enable GPU |
| 1706 // rasterization per layer, we also need to disable pre-painting selectively: | 1706 // rasterization per layer, we also need to disable pre-painting selectively: |
| 1707 // crbug.com/335387 | 1707 // crbug.com/335387 |
| 1708 if (debug_state_.rasterize_only_visible_content || | 1708 if (debug_state_.rasterize_only_visible_content || |
| 1709 settings_.gpu_rasterization) { | 1709 settings_.gpu_rasterization_state != |
| 1710 LayerTreeSettings::GpuRasterizationDisabled) { |
| 1710 actual.priority_cutoff_when_visible = | 1711 actual.priority_cutoff_when_visible = |
| 1711 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; | 1712 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; |
| 1712 } | 1713 } |
| 1713 | 1714 |
| 1714 if (zero_budget_) { | 1715 if (zero_budget_) { |
| 1715 actual.bytes_limit_when_visible = 0; | 1716 actual.bytes_limit_when_visible = 0; |
| 1716 } | 1717 } |
| 1717 | 1718 |
| 1718 return actual; | 1719 return actual; |
| 1719 } | 1720 } |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3033 swap_promise_monitor_.erase(monitor); | 3034 swap_promise_monitor_.erase(monitor); |
| 3034 } | 3035 } |
| 3035 | 3036 |
| 3036 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3037 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 3037 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3038 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 3038 for (; it != swap_promise_monitor_.end(); it++) | 3039 for (; it != swap_promise_monitor_.end(); it++) |
| 3039 (*it)->OnSetNeedsRedrawOnImpl(); | 3040 (*it)->OnSetNeedsRedrawOnImpl(); |
| 3040 } | 3041 } |
| 3041 | 3042 |
| 3042 } // namespace cc | 3043 } // namespace cc |
| OLD | NEW |