| 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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 client_->SetNeedsRedrawOnImplThread(); | 1692 client_->SetNeedsRedrawOnImplThread(); |
| 1693 } | 1693 } |
| 1694 | 1694 |
| 1695 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { | 1695 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { |
| 1696 ManagedMemoryPolicy actual = cached_managed_memory_policy_; | 1696 ManagedMemoryPolicy actual = cached_managed_memory_policy_; |
| 1697 // TODO(ernstm): The second condition disables pre-painting for all layers | 1697 // TODO(ernstm): The second condition disables pre-painting for all layers |
| 1698 // when GPU rasterization is enabled. Once we selectively enable GPU | 1698 // when GPU rasterization is enabled. Once we selectively enable GPU |
| 1699 // rasterization per layer, we also need to disable pre-painting selectively: | 1699 // rasterization per layer, we also need to disable pre-painting selectively: |
| 1700 // crbug.com/335387 | 1700 // crbug.com/335387 |
| 1701 if (debug_state_.rasterize_only_visible_content || | 1701 if (debug_state_.rasterize_only_visible_content || |
| 1702 settings_.gpu_rasterization) { | 1702 settings_.rasterization_site != |
| 1703 LayerTreeSettings::CpuRasterization) { |
| 1703 actual.priority_cutoff_when_visible = | 1704 actual.priority_cutoff_when_visible = |
| 1704 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; | 1705 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; |
| 1705 } | 1706 } |
| 1706 | 1707 |
| 1707 if (zero_budget_) { | 1708 if (zero_budget_) { |
| 1708 actual.bytes_limit_when_visible = 0; | 1709 actual.bytes_limit_when_visible = 0; |
| 1709 } | 1710 } |
| 1710 | 1711 |
| 1711 return actual; | 1712 return actual; |
| 1712 } | 1713 } |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3026 swap_promise_monitor_.erase(monitor); | 3027 swap_promise_monitor_.erase(monitor); |
| 3027 } | 3028 } |
| 3028 | 3029 |
| 3029 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3030 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 3030 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3031 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 3031 for (; it != swap_promise_monitor_.end(); it++) | 3032 for (; it != swap_promise_monitor_.end(); it++) |
| 3032 (*it)->OnSetNeedsRedrawOnImpl(); | 3033 (*it)->OnSetNeedsRedrawOnImpl(); |
| 3033 } | 3034 } |
| 3034 | 3035 |
| 3035 } // namespace cc | 3036 } // namespace cc |
| OLD | NEW |