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

Unified Diff: cc/tiles/tile_manager.cc

Issue 2680313007: cc: Remove resource freed tiles from tile manager pending gpu work set. (Closed)
Patch Set: nits Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index 12f3dfd26e4880ac3ffa6c9244ccec2c8a89787f..6df34f481218d4a6feead5cf4b5ca5611e62a4d5 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -425,7 +425,6 @@ void TileManager::SetResources(ResourcePool* resource_pool,
void TileManager::Release(Tile* tile) {
FreeResourcesForTile(tile);
tiles_.erase(tile->id());
- pending_gpu_work_tiles_.erase(tile);
}
void TileManager::DidFinishRunningTileTasksRequiredForActivation() {
@@ -802,8 +801,10 @@ TileManager::PrioritizedWorkToSchedule TileManager::AssignGpuMemoryToTiles() {
void TileManager::FreeResourcesForTile(Tile* tile) {
TileDrawInfo& draw_info = tile->draw_info();
Resource* resource = draw_info.TakeResource();
- if (resource)
+ if (resource) {
resource_pool_->ReleaseResource(resource);
+ pending_gpu_work_tiles_.erase(tile);
+ }
}
void TileManager::FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(
@@ -1313,6 +1314,7 @@ void TileManager::CheckPendingGpuWorkTiles(bool issue_signals) {
it != pending_gpu_work_tiles_.end();) {
Tile* tile = *it;
const Resource* resource = tile->draw_info().resource();
+ DCHECK(resource);
if (global_state_.tree_priority != SMOOTHNESS_TAKES_PRIORITY ||
raster_buffer_provider_->IsResourceReadyToDraw(resource->id())) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698