| 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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1534 // the swap. | 1534 // the swap. |
| 1535 pending_tree_->ProcessUIResourceRequestQueue(); | 1535 pending_tree_->ProcessUIResourceRequestQueue(); |
| 1536 | 1536 |
| 1537 pending_tree_->PushPropertiesTo(active_tree_.get()); | 1537 pending_tree_->PushPropertiesTo(active_tree_.get()); |
| 1538 | 1538 |
| 1539 // Now that we've synced everything from the pending tree to the active | 1539 // Now that we've synced everything from the pending tree to the active |
| 1540 // tree, rename the pending tree the recycle tree so we can reuse it on the | 1540 // tree, rename the pending tree the recycle tree so we can reuse it on the |
| 1541 // next sync. | 1541 // next sync. |
| 1542 pending_tree_.swap(recycle_tree_); | 1542 pending_tree_.swap(recycle_tree_); |
| 1543 | 1543 |
| 1544 active_tree_->DidBecomeActive(); |
| 1544 active_tree_->SetRootLayerScrollOffsetDelegate( | 1545 active_tree_->SetRootLayerScrollOffsetDelegate( |
| 1545 root_layer_scroll_offset_delegate_); | 1546 root_layer_scroll_offset_delegate_); |
| 1546 active_tree_->DidBecomeActive(); | |
| 1547 | 1547 |
| 1548 // Reduce wasted memory now that unlinked resources are guaranteed not | 1548 // Reduce wasted memory now that unlinked resources are guaranteed not |
| 1549 // to be used. | 1549 // to be used. |
| 1550 client_->ReduceWastedContentsTextureMemoryOnImplThread(); | 1550 client_->ReduceWastedContentsTextureMemoryOnImplThread(); |
| 1551 | 1551 |
| 1552 client_->OnCanDrawStateChanged(CanDraw()); | 1552 client_->OnCanDrawStateChanged(CanDraw()); |
| 1553 client_->SetNeedsRedrawOnImplThread(); | 1553 client_->SetNeedsRedrawOnImplThread(); |
| 1554 client_->RenewTreePriority(); | 1554 client_->RenewTreePriority(); |
| 1555 | 1555 |
| 1556 if (debug_state_.continuous_painting) { | 1556 if (debug_state_.continuous_painting) { |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2787 std::set<UIResourceId>::iterator found_in_evicted = | 2787 std::set<UIResourceId>::iterator found_in_evicted = |
| 2788 evicted_ui_resources_.find(uid); | 2788 evicted_ui_resources_.find(uid); |
| 2789 if (found_in_evicted == evicted_ui_resources_.end()) | 2789 if (found_in_evicted == evicted_ui_resources_.end()) |
| 2790 return; | 2790 return; |
| 2791 evicted_ui_resources_.erase(found_in_evicted); | 2791 evicted_ui_resources_.erase(found_in_evicted); |
| 2792 if (evicted_ui_resources_.empty()) | 2792 if (evicted_ui_resources_.empty()) |
| 2793 client_->OnCanDrawStateChanged(CanDraw()); | 2793 client_->OnCanDrawStateChanged(CanDraw()); |
| 2794 } | 2794 } |
| 2795 | 2795 |
| 2796 } // namespace cc | 2796 } // namespace cc |
| OLD | NEW |