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

Unified Diff: cc/tiles/tile_manager.cc

Issue 1381163002: Add a flag to disable partial raster in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback + UT refactoring Created 5 years, 2 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 | « cc/tiles/tile_manager.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index b9d3ab7fd1535260af4c358a69181603cdf974ec..27b6860e4d0adcf338946f952151e0d0fd41fd45 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -187,20 +187,23 @@ RasterTaskCompletionStatsAsValue(const RasterTaskCompletionStats& stats) {
scoped_ptr<TileManager> TileManager::Create(
TileManagerClient* client,
base::SequencedTaskRunner* task_runner,
- size_t scheduled_raster_task_limit) {
- return make_scoped_ptr(
- new TileManager(client, task_runner, scheduled_raster_task_limit));
+ size_t scheduled_raster_task_limit,
+ bool use_partial_raster) {
+ return make_scoped_ptr(new TileManager(
+ client, task_runner, scheduled_raster_task_limit, use_partial_raster));
}
TileManager::TileManager(
TileManagerClient* client,
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
- size_t scheduled_raster_task_limit)
+ size_t scheduled_raster_task_limit,
+ bool use_partial_raster)
: client_(client),
task_runner_(task_runner),
resource_pool_(nullptr),
tile_task_runner_(nullptr),
scheduled_raster_task_limit_(scheduled_raster_task_limit),
+ use_partial_raster_(use_partial_raster),
all_tiles_that_need_to_be_rasterized_are_scheduled_(true),
did_check_for_completed_tasks_since_last_schedule_tasks_(true),
did_oom_on_last_assign_(false),
@@ -659,7 +662,7 @@ scoped_refptr<RasterTask> TileManager::CreateRasterTask(
Tile* tile = prioritized_tile.tile();
uint64_t resource_content_id = 0;
Resource* resource = nullptr;
- if (tile->invalidated_id()) {
+ if (use_partial_raster_ && tile->invalidated_id()) {
// TODO(danakj): For resources that are in use, we should still grab them
// and copy from them instead of rastering everything. crbug.com/492754
resource =
« no previous file with comments | « cc/tiles/tile_manager.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698