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/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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
390 : mts.bin; | 390 : mts.bin; |
391 | 391 |
392 // Insert the tile into a priority set. | 392 // Insert the tile into a priority set. |
393 tiles->InsertTile(tile, priority_bin); | 393 tiles->InsertTile(tile, priority_bin); |
394 } | 394 } |
395 } | 395 } |
396 | 396 |
397 void TileManager::ManageTiles() { | 397 void TileManager::ManageTiles() { |
398 TRACE_EVENT0("cc", "TileManager::ManageTiles"); | 398 TRACE_EVENT0("cc", "TileManager::ManageTiles"); |
399 | 399 |
400 raster_worker_pool_->CheckForCompletedTasks(); | |
vmpstr
2013/09/18 20:39:36
nit: Can you add a comment here, something similar
reveman
2013/09/18 21:48:30
Done.
| |
401 | |
400 TileVector tiles_that_need_to_be_rasterized; | 402 TileVector tiles_that_need_to_be_rasterized; |
401 AssignGpuMemoryToTiles(GetPrioritizedTileSet(), | 403 AssignGpuMemoryToTiles(GetPrioritizedTileSet(), |
402 &tiles_that_need_to_be_rasterized); | 404 &tiles_that_need_to_be_rasterized); |
403 | 405 |
404 // Finally, schedule rasterizer tasks. | 406 // Finally, schedule rasterizer tasks. |
405 ScheduleTasks(tiles_that_need_to_be_rasterized); | 407 ScheduleTasks(tiles_that_need_to_be_rasterized); |
406 | 408 |
407 TRACE_EVENT_INSTANT1( | 409 TRACE_EVENT_INSTANT1( |
408 "cc", "DidManage", TRACE_EVENT_SCOPE_THREAD, | 410 "cc", "DidManage", TRACE_EVENT_SCOPE_THREAD, |
409 "state", TracedValue::FromValue(BasicStateAsValue().release())); | 411 "state", TracedValue::FromValue(BasicStateAsValue().release())); |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
830 bytes_releasable_ += tile->bytes_consumed_if_allocated(); | 832 bytes_releasable_ += tile->bytes_consumed_if_allocated(); |
831 ++resources_releasable_; | 833 ++resources_releasable_; |
832 } | 834 } |
833 | 835 |
834 FreeUnusedResourcesForTile(tile); | 836 FreeUnusedResourcesForTile(tile); |
835 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0) | 837 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0) |
836 did_initialize_visible_tile_ = true; | 838 did_initialize_visible_tile_ = true; |
837 } | 839 } |
838 | 840 |
839 } // namespace cc | 841 } // namespace cc |
OLD | NEW |