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

Side by Side Diff: cc/resources/tile_manager.cc

Issue 24153017: cc: Always check for completed raster tasks before scheduling more tasks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 : mts.bin; 390 : mts.bin;
391 391
392 // Insert the tile into a priority set. 392 // Insert the tile into a priority set.
393 tiles->InsertTile(tile, priority_bin); 393 tiles->InsertTile(tile, priority_bin);
394 } 394 }
395 } 395 }
396 396
397 void TileManager::ManageTiles() { 397 void TileManager::ManageTiles() {
398 TRACE_EVENT0("cc", "TileManager::ManageTiles"); 398 TRACE_EVENT0("cc", "TileManager::ManageTiles");
399 399
400 raster_worker_pool_->CheckForCompletedTasks();
vmpstr 2013/09/18 20:39:36 nit: Can you add a comment here, something similar
reveman 2013/09/18 21:48:30 Done.
401
400 TileVector tiles_that_need_to_be_rasterized; 402 TileVector tiles_that_need_to_be_rasterized;
401 AssignGpuMemoryToTiles(GetPrioritizedTileSet(), 403 AssignGpuMemoryToTiles(GetPrioritizedTileSet(),
402 &tiles_that_need_to_be_rasterized); 404 &tiles_that_need_to_be_rasterized);
403 405
404 // Finally, schedule rasterizer tasks. 406 // Finally, schedule rasterizer tasks.
405 ScheduleTasks(tiles_that_need_to_be_rasterized); 407 ScheduleTasks(tiles_that_need_to_be_rasterized);
406 408
407 TRACE_EVENT_INSTANT1( 409 TRACE_EVENT_INSTANT1(
408 "cc", "DidManage", TRACE_EVENT_SCOPE_THREAD, 410 "cc", "DidManage", TRACE_EVENT_SCOPE_THREAD,
409 "state", TracedValue::FromValue(BasicStateAsValue().release())); 411 "state", TracedValue::FromValue(BasicStateAsValue().release()));
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 bytes_releasable_ += tile->bytes_consumed_if_allocated(); 832 bytes_releasable_ += tile->bytes_consumed_if_allocated();
831 ++resources_releasable_; 833 ++resources_releasable_;
832 } 834 }
833 835
834 FreeUnusedResourcesForTile(tile); 836 FreeUnusedResourcesForTile(tile);
835 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0) 837 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0)
836 did_initialize_visible_tile_ = true; 838 did_initialize_visible_tile_ = true;
837 } 839 }
838 840
839 } // namespace cc 841 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698