Chromium Code Reviews| 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; | 355 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
| 356 } | 356 } |
| 357 | 357 |
| 358 FreeResourcesForReleasedTiles(); | 358 FreeResourcesForReleasedTiles(); |
| 359 CleanUpReleasedTiles(); | 359 CleanUpReleasedTiles(); |
| 360 | 360 |
| 361 TileVector tiles_that_need_to_be_rasterized; | 361 TileVector tiles_that_need_to_be_rasterized; |
| 362 scoped_ptr<RasterTilePriorityQueue> raster_priority_queue( | 362 scoped_ptr<RasterTilePriorityQueue> raster_priority_queue( |
| 363 client_->BuildRasterQueue(global_state_.tree_priority, | 363 client_->BuildRasterQueue(global_state_.tree_priority, |
| 364 RasterTilePriorityQueue::Type::ALL)); | 364 RasterTilePriorityQueue::Type::ALL)); |
| 365 // Inform the client that will likely require a draw if the top tile is | |
| 366 // required for draw. | |
| 367 client_->SetIsLikelyToRequireADraw( | |
|
vmpstr
2015/01/26 22:08:35
I think this is the only spot that makes sense we
danakj
2015/01/29 22:33:20
Once the initial batch of work is done, if the top
vmpstr
2015/01/29 22:48:09
Well.. I don't think so... I mean when we draw, we
danakj
2015/01/29 23:05:34
well, i'm not sure it matters but take a look at L
| |
| 368 !raster_priority_queue->IsEmpty() && | |
| 369 raster_priority_queue->Top()->required_for_draw()); | |
| 365 AssignGpuMemoryToTiles(raster_priority_queue.get(), | 370 AssignGpuMemoryToTiles(raster_priority_queue.get(), |
| 366 scheduled_raster_task_limit_, | 371 scheduled_raster_task_limit_, |
| 367 &tiles_that_need_to_be_rasterized); | 372 &tiles_that_need_to_be_rasterized); |
| 368 | 373 |
| 369 // Schedule tile tasks. | 374 // Schedule tile tasks. |
| 370 ScheduleTasks(tiles_that_need_to_be_rasterized); | 375 ScheduleTasks(tiles_that_need_to_be_rasterized); |
| 371 | 376 |
| 372 did_notify_ready_to_activate_ = false; | 377 did_notify_ready_to_activate_ = false; |
| 373 did_notify_ready_to_draw_ = false; | 378 did_notify_ready_to_draw_ = false; |
| 374 } else { | 379 } else { |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1040 result -= other; | 1045 result -= other; |
| 1041 return result; | 1046 return result; |
| 1042 } | 1047 } |
| 1043 | 1048 |
| 1044 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { | 1049 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { |
| 1045 return memory_bytes_ > limit.memory_bytes_ || | 1050 return memory_bytes_ > limit.memory_bytes_ || |
| 1046 resource_count_ > limit.resource_count_; | 1051 resource_count_ > limit.resource_count_; |
| 1047 } | 1052 } |
| 1048 | 1053 |
| 1049 } // namespace cc | 1054 } // namespace cc |
| OLD | NEW |