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 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1640 renderer_->SetVisible(visible); | 1640 renderer_->SetVisible(visible); |
1641 } | 1641 } |
1642 | 1642 |
1643 void LayerTreeHostImpl::SetNeedsRedraw() { | 1643 void LayerTreeHostImpl::SetNeedsRedraw() { |
1644 NotifySwapPromiseMonitorsOfSetNeedsRedraw(); | 1644 NotifySwapPromiseMonitorsOfSetNeedsRedraw(); |
1645 client_->SetNeedsRedrawOnImplThread(); | 1645 client_->SetNeedsRedrawOnImplThread(); |
1646 } | 1646 } |
1647 | 1647 |
1648 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { | 1648 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { |
1649 ManagedMemoryPolicy actual = cached_managed_memory_policy_; | 1649 ManagedMemoryPolicy actual = cached_managed_memory_policy_; |
1650 if (debug_state_.rasterize_only_visible_content) { | 1650 if (debug_state_.rasterize_only_visible_content || |
1651 settings_.gpu_rasterization) { | |
danakj
2014/01/14 22:52:19
Doesn't this affect all layers including ones that
| |
1651 actual.priority_cutoff_when_visible = | 1652 actual.priority_cutoff_when_visible = |
1652 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; | 1653 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; |
1653 } | 1654 } |
1654 | 1655 |
1655 if (zero_budget_) { | 1656 if (zero_budget_) { |
1656 actual.bytes_limit_when_visible = 0; | 1657 actual.bytes_limit_when_visible = 0; |
1657 } | 1658 } |
1658 | 1659 |
1659 return actual; | 1660 return actual; |
1660 } | 1661 } |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2907 swap_promise_monitor_.erase(monitor); | 2908 swap_promise_monitor_.erase(monitor); |
2908 } | 2909 } |
2909 | 2910 |
2910 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2911 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
2911 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2912 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
2912 for (; it != swap_promise_monitor_.end(); it++) | 2913 for (; it != swap_promise_monitor_.end(); it++) |
2913 (*it)->OnSetNeedsRedrawOnImpl(); | 2914 (*it)->OnSetNeedsRedrawOnImpl(); |
2914 } | 2915 } |
2915 | 2916 |
2916 } // namespace cc | 2917 } // namespace cc |
OLD | NEW |