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

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

Issue 22900018: cc: Set the mapped memory reclaim limit for the renderer compositor on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/max_bytes_pending_upload/max_transfer_buffer_usage_bytes/ Created 7 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 unified diff | Download patch
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 state->SetInteger("canceled_count", stats.canceled_count); 113 state->SetInteger("canceled_count", stats.canceled_count);
114 return state.PassAs<base::Value>(); 114 return state.PassAs<base::Value>();
115 } 115 }
116 116
117 // static 117 // static
118 scoped_ptr<TileManager> TileManager::Create( 118 scoped_ptr<TileManager> TileManager::Create(
119 TileManagerClient* client, 119 TileManagerClient* client,
120 ResourceProvider* resource_provider, 120 ResourceProvider* resource_provider,
121 size_t num_raster_threads, 121 size_t num_raster_threads,
122 RenderingStatsInstrumentation* rendering_stats_instrumentation, 122 RenderingStatsInstrumentation* rendering_stats_instrumentation,
123 bool use_map_image) { 123 bool use_map_image,
124 size_t max_bytes_pending_upload) {
124 return make_scoped_ptr( 125 return make_scoped_ptr(
125 new TileManager(client, 126 new TileManager(client,
126 resource_provider, 127 resource_provider,
127 use_map_image ? 128 use_map_image ?
128 ImageRasterWorkerPool::Create( 129 ImageRasterWorkerPool::Create(
129 resource_provider, num_raster_threads) : 130 resource_provider, num_raster_threads) :
130 PixelBufferRasterWorkerPool::Create( 131 PixelBufferRasterWorkerPool::Create(
131 resource_provider, num_raster_threads), 132 resource_provider,
133 num_raster_threads,
134 max_bytes_pending_upload),
132 num_raster_threads, 135 num_raster_threads,
133 rendering_stats_instrumentation)); 136 rendering_stats_instrumentation));
134 } 137 }
135 138
136 TileManager::TileManager( 139 TileManager::TileManager(
137 TileManagerClient* client, 140 TileManagerClient* client,
138 ResourceProvider* resource_provider, 141 ResourceProvider* resource_provider,
139 scoped_ptr<RasterWorkerPool> raster_worker_pool, 142 scoped_ptr<RasterWorkerPool> raster_worker_pool,
140 size_t num_raster_threads, 143 size_t num_raster_threads,
141 RenderingStatsInstrumentation* rendering_stats_instrumentation) 144 RenderingStatsInstrumentation* rendering_stats_instrumentation)
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 bytes_releasable_ += tile->bytes_consumed_if_allocated(); 843 bytes_releasable_ += tile->bytes_consumed_if_allocated();
841 ++resources_releasable_; 844 ++resources_releasable_;
842 } 845 }
843 846
844 FreeUnusedResourcesForTile(tile); 847 FreeUnusedResourcesForTile(tile);
845 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0) 848 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0)
846 did_initialize_visible_tile_ = true; 849 did_initialize_visible_tile_ = true;
847 } 850 }
848 851
849 } // namespace cc 852 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698