Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 23495022: CC: Add a scheduled action for ManageTiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call ManageTiles. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« cc/resources/tile_manager.cc ('K') | « cc/resources/tile_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 } 2501 }
2502 2502
2503 void LayerTreeHostImpl::SetTreePriority(TreePriority priority) { 2503 void LayerTreeHostImpl::SetTreePriority(TreePriority priority) {
2504 if (!tile_manager_) 2504 if (!tile_manager_)
2505 return; 2505 return;
2506 2506
2507 GlobalStateThatImpactsTilePriority new_state(tile_manager_->GlobalState()); 2507 GlobalStateThatImpactsTilePriority new_state(tile_manager_->GlobalState());
2508 if (new_state.tree_priority == priority) 2508 if (new_state.tree_priority == priority)
2509 return; 2509 return;
2510 2510
2511 TRACE_EVENT0("cc", "LayerTreeHostImpl::SetTreePriority");
2512
2511 new_state.tree_priority = priority; 2513 new_state.tree_priority = priority;
2512 tile_manager_->SetGlobalState(new_state); 2514 tile_manager_->SetGlobalState(new_state);
2513 manage_tiles_needed_ = true; 2515 manage_tiles_needed_ = true;
2516
2517 // In smoothness-takes-priority, we may finish rastering without
2518 // activating. We need to guarantee ManageTiles is called after this
2519 // case, or we will block activation until after the next compositor
2520 // frame (webkit is live-locked in the mean time).
2521 if (priority != SMOOTHNESS_TAKES_PRIORITY)
reveman 2013/09/10 19:21:20 why not when entering SMOOTHNESS_TAKES_PRIORITY or
epennerAtGoogle 2013/09/10 19:36:55 The reason we are calling it here is to not starve
reveman 2013/09/10 19:57:54 How are we guaranteeing that a new frame is produc
2522 ManageTiles();
2514 } 2523 }
2515 2524
2516 void LayerTreeHostImpl::ResetCurrentFrameTimeForNextFrame() { 2525 void LayerTreeHostImpl::ResetCurrentFrameTimeForNextFrame() {
2517 current_frame_timeticks_ = base::TimeTicks(); 2526 current_frame_timeticks_ = base::TimeTicks();
2518 current_frame_time_ = base::Time(); 2527 current_frame_time_ = base::Time();
2519 } 2528 }
2520 2529
2521 void LayerTreeHostImpl::UpdateCurrentFrameTime(base::TimeTicks* ticks, 2530 void LayerTreeHostImpl::UpdateCurrentFrameTime(base::TimeTicks* ticks,
2522 base::Time* now) const { 2531 base::Time* now) const {
2523 if (ticks->is_null()) { 2532 if (ticks->is_null()) {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 2640
2632 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( 2641 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource(
2633 UIResourceId uid) const { 2642 UIResourceId uid) const {
2634 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); 2643 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid);
2635 if (iter != ui_resource_map_.end()) 2644 if (iter != ui_resource_map_.end())
2636 return iter->second; 2645 return iter->second;
2637 return 0; 2646 return 0;
2638 } 2647 }
2639 2648
2640 } // namespace cc 2649 } // namespace cc
OLDNEW
« cc/resources/tile_manager.cc ('K') | « cc/resources/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698