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

Unified Diff: cc/resources/tile_manager.cc

Issue 471633002: Refactoring code with existing function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index f6405bfde1b120e290b34bf7afe7cb40ebf479d3..26e67150671b6c4e3ecd9a6f4421d0347375c2a6 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -824,9 +824,7 @@ void TileManager::AssignGpuMemoryToTiles(
// Tile is OOM.
if (tile_bytes > tile_bytes_left || tile_resources > resources_left) {
- bool was_ready_to_draw = tile->IsReadyToDraw();
-
- FreeResourcesForTile(tile);
+ FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(tile);
// This tile was already on screen and now its resources have been
// released. In order to prevent checkerboarding, set this tile as
@@ -834,9 +832,6 @@ void TileManager::AssignGpuMemoryToTiles(
if (mts.visible_and_ready_to_draw)
tile_version.set_rasterize_on_demand();
- if (was_ready_to_draw)
- client_->NotifyTileStateChanged(tile);
-
oomed_soft = true;
if (tile_uses_hard_limit) {
oomed_hard = true;
« 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