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

Unified Diff: cc/resources/tile_manager.cc

Issue 884453003: cc: Prevent resources from being allocated for solid tiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add dcheck in else clause Created 5 years, 11 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 | « cc/resources/gpu_rasterizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index da888cd77297c66a19ba39bc84425ce3abe040f4..5cb149de9ce4a807d533a8cf25399aff6504c807 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -830,8 +830,10 @@ void TileManager::UpdateTileDrawInfo(
if (analysis.is_solid_color) {
draw_info.set_solid_color(analysis.solid_color);
- resource_pool_->ReleaseResource(resource.Pass());
+ if (resource)
+ resource_pool_->ReleaseResource(resource.Pass());
} else {
+ DCHECK(resource);
draw_info.set_use_resource();
draw_info.resource_ = resource.Pass();
}
« no previous file with comments | « cc/resources/gpu_rasterizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698