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

Side by Side Diff: cc/resources/tile_manager.cc

Issue 493543002: cc: Report only on active tiles in tracing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 return value; 724 return value;
725 } 725 }
726 726
727 void TileManager::BasicStateAsValueInto(base::debug::TracedValue* state) const { 727 void TileManager::BasicStateAsValueInto(base::debug::TracedValue* state) const {
728 state->SetInteger("tile_count", tiles_.size()); 728 state->SetInteger("tile_count", tiles_.size());
729 state->BeginDictionary("global_state"); 729 state->BeginDictionary("global_state");
730 global_state_.AsValueInto(state); 730 global_state_.AsValueInto(state);
731 state->EndDictionary(); 731 state->EndDictionary();
732 } 732 }
733 733
734 void TileManager::AllTilesAsValueInto(base::debug::TracedValue* state) const {
735 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
736 state->BeginDictionary();
737 it->second->AsValueInto(state);
738 state->EndDictionary();
739 }
740 }
741
742 void TileManager::AssignGpuMemoryToTiles( 734 void TileManager::AssignGpuMemoryToTiles(
743 PrioritizedTileSet* tiles, 735 PrioritizedTileSet* tiles,
744 TileVector* tiles_that_need_to_be_rasterized) { 736 TileVector* tiles_that_need_to_be_rasterized) {
745 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles"); 737 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles");
746 738
747 // Maintain the list of released resources that can potentially be re-used 739 // Maintain the list of released resources that can potentially be re-used
748 // or deleted. 740 // or deleted.
749 // If this operation becomes expensive too, only do this after some 741 // If this operation becomes expensive too, only do this after some
750 // resource(s) was returned. Note that in that case, one also need to 742 // resource(s) was returned. Note that in that case, one also need to
751 // invalidate when releasing some resource from the pool. 743 // invalidate when releasing some resource from the pool.
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); 1168 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate");
1177 1169
1178 rasterizer_->CheckForCompletedTasks(); 1170 rasterizer_->CheckForCompletedTasks();
1179 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; 1171 did_check_for_completed_tasks_since_last_schedule_tasks_ = true;
1180 1172
1181 if (IsReadyToActivate()) 1173 if (IsReadyToActivate())
1182 client_->NotifyReadyToActivate(); 1174 client_->NotifyReadyToActivate();
1183 } 1175 }
1184 1176
1185 } // namespace cc 1177 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698