| OLD | NEW |
| 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/tile_manager.h" | 5 #include "cc/tile_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 TRACE_COUNTER_ID1("cc", "LiveOrAllocatedTileCount", this, | 391 TRACE_COUNTER_ID1("cc", "LiveOrAllocatedTileCount", this, |
| 392 live_or_allocated_tiles_.size()); | 392 live_or_allocated_tiles_.size()); |
| 393 | 393 |
| 394 SortTiles(); | 394 SortTiles(); |
| 395 | 395 |
| 396 // Assign gpu memory and determine what tiles need to be rasterized. | 396 // Assign gpu memory and determine what tiles need to be rasterized. |
| 397 AssignGpuMemoryToTiles(); | 397 AssignGpuMemoryToTiles(); |
| 398 | 398 |
| 399 TRACE_EVENT_INSTANT1("cc", "DidManage", "state", | 399 TRACE_EVENT_INSTANT1("cc", "DidManage", TRACE_EVENT_SCOPE_THREAD, |
| 400 ValueToString(BasicStateAsValue())); | 400 "state", ValueToString(BasicStateAsValue())); |
| 401 | 401 |
| 402 // Finally, kick the rasterizer. | 402 // Finally, kick the rasterizer. |
| 403 DispatchMoreTasks(); | 403 DispatchMoreTasks(); |
| 404 } | 404 } |
| 405 | 405 |
| 406 void TileManager::CheckForCompletedTileUploads() { | 406 void TileManager::CheckForCompletedTileUploads() { |
| 407 while (!tiles_with_pending_set_pixels_.empty()) { | 407 while (!tiles_with_pending_set_pixels_.empty()) { |
| 408 Tile* tile = tiles_with_pending_set_pixels_.front(); | 408 Tile* tile = tiles_with_pending_set_pixels_.front(); |
| 409 DCHECK(tile->managed_state().resource); | 409 DCHECK(tile->managed_state().resource); |
| 410 | 410 |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 decode_begin_time = base::TimeTicks::HighResNow(); | 995 decode_begin_time = base::TimeTicks::HighResNow(); |
| 996 pixel_ref->Decode(); | 996 pixel_ref->Decode(); |
| 997 if (stats) { | 997 if (stats) { |
| 998 stats->totalDeferredImageDecodeCount++; | 998 stats->totalDeferredImageDecodeCount++; |
| 999 stats->totalDeferredImageDecodeTime += | 999 stats->totalDeferredImageDecodeTime += |
| 1000 base::TimeTicks::HighResNow() - decode_begin_time; | 1000 base::TimeTicks::HighResNow() - decode_begin_time; |
| 1001 } | 1001 } |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 } // namespace cc | 1004 } // namespace cc |
| OLD | NEW |