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 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 last_animation_time_); | 2599 last_animation_time_); |
2600 } | 2600 } |
2601 } | 2601 } |
2602 | 2602 |
2603 base::TimeDelta LayerTreeHostImpl::LowFrequencyAnimationInterval() const { | 2603 base::TimeDelta LayerTreeHostImpl::LowFrequencyAnimationInterval() const { |
2604 return base::TimeDelta::FromSeconds(1); | 2604 return base::TimeDelta::FromSeconds(1); |
2605 } | 2605 } |
2606 | 2606 |
2607 void LayerTreeHostImpl::SendReleaseResourcesRecursive(LayerImpl* current) { | 2607 void LayerTreeHostImpl::SendReleaseResourcesRecursive(LayerImpl* current) { |
2608 DCHECK(current); | 2608 DCHECK(current); |
2609 // TODO(boliu): Rename DidLoseOutputSurface to ReleaseResources. | 2609 current->ReleaseResources(); |
2610 current->DidLoseOutputSurface(); | |
2611 if (current->mask_layer()) | 2610 if (current->mask_layer()) |
2612 SendReleaseResourcesRecursive(current->mask_layer()); | 2611 SendReleaseResourcesRecursive(current->mask_layer()); |
2613 if (current->replica_layer()) | 2612 if (current->replica_layer()) |
2614 SendReleaseResourcesRecursive(current->replica_layer()); | 2613 SendReleaseResourcesRecursive(current->replica_layer()); |
2615 for (size_t i = 0; i < current->children().size(); ++i) | 2614 for (size_t i = 0; i < current->children().size(); ++i) |
2616 SendReleaseResourcesRecursive(current->children()[i]); | 2615 SendReleaseResourcesRecursive(current->children()[i]); |
2617 } | 2616 } |
2618 | 2617 |
2619 void LayerTreeHostImpl::SetOffscreenContextProvider( | 2618 void LayerTreeHostImpl::SetOffscreenContextProvider( |
2620 const scoped_refptr<ContextProvider>& offscreen_context_provider) { | 2619 const scoped_refptr<ContextProvider>& offscreen_context_provider) { |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2907 swap_promise_monitor_.erase(monitor); | 2906 swap_promise_monitor_.erase(monitor); |
2908 } | 2907 } |
2909 | 2908 |
2910 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2909 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
2911 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2910 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
2912 for (; it != swap_promise_monitor_.end(); it++) | 2911 for (; it != swap_promise_monitor_.end(); it++) |
2913 (*it)->OnSetNeedsRedrawOnImpl(); | 2912 (*it)->OnSetNeedsRedrawOnImpl(); |
2914 } | 2913 } |
2915 | 2914 |
2916 } // namespace cc | 2915 } // namespace cc |
OLD | NEW |