diff options
author | epenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 06:17:08 +0000 |
---|---|---|
committer | epenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 06:17:08 +0000 |
commit | d7dd0f089590ebb5a6f0213fb54a40fde71856ce (patch) | |
tree | 627dc412ed4dde188fd27c8f6d77e3836658b09a /cc | |
parent | ccb4feef2676e5e20b90a91b5b79bcfd126d4705 (diff) | |
download | chromium_src-d7dd0f089590ebb5a6f0213fb54a40fde71856ce.zip chromium_src-d7dd0f089590ebb5a6f0213fb54a40fde71856ce.tar.gz chromium_src-d7dd0f089590ebb5a6f0213fb54a40fde71856ce.tar.bz2 |
cc: Limit the total number of uploads.
We can't reference-count shared memory regions in the GPU
process, so we dup/map the memory block for each upload.
This doesn't scale for small uploads, both because we can
use too many file descriptors, and use too much address
space when the small upload transfer buffers are contained
in larger shared memory blocks.
This limits the total number of uploads to prevent the
problem, but this should be fixed properly and this limit
removed.
BUG=176002
NOTRY=True
Since it's a CC only change and unit tests have passed.
Review URL: https://chromiumcodereview.appspot.com/12260033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/tile_manager.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc index cdcff0a..9c857a4 100644 --- a/cc/tile_manager.cc +++ b/cc/tile_manager.cc @@ -30,8 +30,11 @@ namespace { // For reference, the Nexus10 can upload 1MB in about 2.5ms. // Assuming a three frame deep pipeline this implies ~20MB. const int kMaxPendingUploadBytes = 20 * 1024 * 1024; +// TODO(epenner): We should remove this upload limit (crbug.com/176197) +const int kMaxPendingUploads = 72; #else const int kMaxPendingUploadBytes = 100 * 1024 * 1024; +const int kMaxPendingUploads = 1000; #endif // Determine bin based on three categories of tiles: things we need now, @@ -630,7 +633,8 @@ bool TileManager::CanDispatchRasterTask(Tile* tile) { return false; size_t new_bytes_pending = bytes_pending_set_pixels_; new_bytes_pending += tile->bytes_consumed_if_allocated(); - return new_bytes_pending <= kMaxPendingUploadBytes; + return new_bytes_pending <= kMaxPendingUploadBytes && + tiles_with_pending_set_pixels_.size() < kMaxPendingUploads; } void TileManager::DispatchMoreTasks() { |