Chromium Code Reviews| 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 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2461 if (!tile_manager_) | 2461 if (!tile_manager_) |
| 2462 return; | 2462 return; |
| 2463 | 2463 |
| 2464 GlobalStateThatImpactsTilePriority new_state(tile_manager_->GlobalState()); | 2464 GlobalStateThatImpactsTilePriority new_state(tile_manager_->GlobalState()); |
| 2465 if (new_state.tree_priority == priority) | 2465 if (new_state.tree_priority == priority) |
| 2466 return; | 2466 return; |
| 2467 | 2467 |
| 2468 new_state.tree_priority = priority; | 2468 new_state.tree_priority = priority; |
| 2469 tile_manager_->SetGlobalState(new_state); | 2469 tile_manager_->SetGlobalState(new_state); |
| 2470 manage_tiles_needed_ = true; | 2470 manage_tiles_needed_ = true; |
| 2471 | |
| 2472 // We may have blocked activation entirely while in smoothness | |
| 2473 // mode due to not prioritizing pending tree tiles. When transitioning | |
| 2474 // out of smoothness mode, this is here to insure we do call manage-tiles | |
| 2475 // again (to insure reprioritize and activate). | |
| 2476 if (priority != SMOOTHNESS_TAKES_PRIORITY) | |
|
reveman
2013/09/03 19:03:21
We need this to trigger a call to ManageTiles() ev
| |
| 2477 client_->SetNeedsRedrawOnImplThread(); | |
|
enne (OOO)
2013/09/03 19:11:13
Sorry, but I don't follow this. If we're missing
epenner
2013/09/03 19:27:53
The current problem case is a double-tap zoom anim
| |
| 2471 } | 2478 } |
| 2472 | 2479 |
| 2473 void LayerTreeHostImpl::ResetCurrentFrameTimeForNextFrame() { | 2480 void LayerTreeHostImpl::ResetCurrentFrameTimeForNextFrame() { |
| 2474 current_frame_timeticks_ = base::TimeTicks(); | 2481 current_frame_timeticks_ = base::TimeTicks(); |
| 2475 current_frame_time_ = base::Time(); | 2482 current_frame_time_ = base::Time(); |
| 2476 } | 2483 } |
| 2477 | 2484 |
| 2478 void LayerTreeHostImpl::UpdateCurrentFrameTime(base::TimeTicks* ticks, | 2485 void LayerTreeHostImpl::UpdateCurrentFrameTime(base::TimeTicks* ticks, |
| 2479 base::Time* now) const { | 2486 base::Time* now) const { |
| 2480 if (ticks->is_null()) { | 2487 if (ticks->is_null()) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2568 | 2575 |
| 2569 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( | 2576 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( |
| 2570 UIResourceId uid) const { | 2577 UIResourceId uid) const { |
| 2571 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); | 2578 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); |
| 2572 if (iter != ui_resource_map_.end()) | 2579 if (iter != ui_resource_map_.end()) |
| 2573 return iter->second; | 2580 return iter->second; |
| 2574 return 0; | 2581 return 0; |
| 2575 } | 2582 } |
| 2576 | 2583 |
| 2577 } // namespace cc | 2584 } // namespace cc |
| OLD | NEW |