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/logging.h" | 9 #include "base/logging.h" |
10 #include "cc/tile.h" | 10 #include "cc/tile.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 void TileManager::WillModifyTilePriority(Tile*, WhichTree tree, const TilePriori
ty& new_priority) { | 48 void TileManager::WillModifyTilePriority(Tile*, WhichTree tree, const TilePriori
ty& new_priority) { |
49 // TODO(nduca): Do something smarter if reprioritization turns out to be | 49 // TODO(nduca): Do something smarter if reprioritization turns out to be |
50 // costly. | 50 // costly. |
51 ScheduleManageTiles(); | 51 ScheduleManageTiles(); |
52 } | 52 } |
53 | 53 |
54 void TileManager::ScheduleManageTiles() { | 54 void TileManager::ScheduleManageTiles() { |
55 if (manage_tiles_pending_) | 55 if (manage_tiles_pending_) |
56 return; | 56 return; |
57 ScheduleManageTiles(); | 57 client_->ScheduleManageTiles(); |
58 manage_tiles_pending_ = true; | 58 manage_tiles_pending_ = true; |
59 } | 59 } |
60 | 60 |
61 class BinComparator { | 61 class BinComparator { |
62 public: | 62 public: |
63 bool operator() (const Tile* a, const Tile* b) const { | 63 bool operator() (const Tile* a, const Tile* b) const { |
64 const ManagedTileState& ams = a->managed_state(); | 64 const ManagedTileState& ams = a->managed_state(); |
65 const ManagedTileState& bms = b->managed_state(); | 65 const ManagedTileState& bms = b->managed_state(); |
66 if (ams.bin != bms.bin) | 66 if (ams.bin != bms.bin) |
67 return ams.bin < bms.bin; | 67 return ams.bin < bms.bin; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 tile->managed_state().resource_id_can_be_freed); | 200 tile->managed_state().resource_id_can_be_freed); |
201 // TODO(nduca): Do something intelligent here. | 201 // TODO(nduca): Do something intelligent here. |
202 } | 202 } |
203 | 203 |
204 void TileManager::ScheduleMorePaintingJobs() { | 204 void TileManager::ScheduleMorePaintingJobs() { |
205 // TODO(nduca): The next big thing. | 205 // TODO(nduca): The next big thing. |
206 } | 206 } |
207 | 207 |
208 | 208 |
209 } | 209 } |
OLD | NEW |