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

Unified Diff: cc/tile_manager.cc

Issue 12321053: cc: Complete pending tile uploads if they are needed for tree activation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chromified and added a test. Created 7 years, 9 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
« cc/picture_layer_impl.cc ('K') | « cc/tile_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.cc
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc
index d06e18dc677e39931ed954cc393aabdb30ae22da..74e6393f6f8f72b3824c2c3ea6094d65a628c378 100644
--- a/cc/tile_manager.cc
+++ b/cc/tile_manager.cc
@@ -449,6 +449,17 @@ void TileManager::DidCompleteFrame() {
did_schedule_cheap_tasks_ = false;
}
+void TileManager::FlushPendingTileUploadIfNeeded(Tile* tile) {
+ ManagedTileState& managed_tile_state = tile->managed_state();
+ if (managed_tile_state.raster_state == UPLOAD_STATE &&
+ managed_tile_state.resource_is_being_initialized) {
+ DCHECK(managed_tile_state.resource);
+ Resource* resource = managed_tile_state.resource.get();
+ resource_pool_->resource_provider()->InsertWaitForSetPixels(resource->id());
+ managed_tile_state.resource_is_being_initialized = false;
reveman 2013/03/07 20:31:58 I like this approach of not moving the tile out of
Sami 2013/03/08 18:01:10 Done, I've added UPLOAD_FLUSHED_STATE.
+ }
+}
+
void TileManager::GetMemoryStats(
size_t* memoryRequiredBytes,
size_t* memoryNiceToHaveBytes,
« cc/picture_layer_impl.cc ('K') | « cc/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698