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

Unified Diff: cc/resources/tile_manager.cc

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/resources/tile_manager.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index cb9d766654eedaf78d36b313c1a226f35e71ee56..77c4df607639fd51e57cb22c35d6c344d618e200 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -20,7 +20,7 @@
#include "cc/resources/raster_buffer.h"
#include "cc/resources/rasterizer.h"
#include "cc/resources/tile.h"
-#include "ui/gfx/rect_conversions.h"
+#include "ui/gfx/geometry/rect_conversions.h"
namespace cc {
namespace {
@@ -193,8 +193,6 @@ class ImageDecodeTaskImpl : public ImageDecodeTask {
DISALLOW_COPY_AND_ASSIGN(ImageDecodeTaskImpl);
};
-const size_t kScheduledRasterTasksLimit = 32u;
-
} // namespace
RasterTaskCompletionStats::RasterTaskCompletionStats()
@@ -215,12 +213,14 @@ scoped_ptr<TileManager> TileManager::Create(
base::SequencedTaskRunner* task_runner,
ResourcePool* resource_pool,
Rasterizer* rasterizer,
- RenderingStatsInstrumentation* rendering_stats_instrumentation) {
+ RenderingStatsInstrumentation* rendering_stats_instrumentation,
+ size_t scheduled_raster_task_limit) {
return make_scoped_ptr(new TileManager(client,
task_runner,
resource_pool,
rasterizer,
- rendering_stats_instrumentation));
+ rendering_stats_instrumentation,
+ scheduled_raster_task_limit));
}
TileManager::TileManager(
@@ -228,11 +228,13 @@ TileManager::TileManager(
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
ResourcePool* resource_pool,
Rasterizer* rasterizer,
- RenderingStatsInstrumentation* rendering_stats_instrumentation)
+ RenderingStatsInstrumentation* rendering_stats_instrumentation,
+ size_t scheduled_raster_task_limit)
: client_(client),
task_runner_(task_runner),
resource_pool_(resource_pool),
rasterizer_(rasterizer),
+ scheduled_raster_task_limit_(scheduled_raster_task_limit),
all_tiles_that_need_to_be_rasterized_are_scheduled_(true),
rendering_stats_instrumentation_(rendering_stats_instrumentation),
did_initialize_visible_tile_(false),
@@ -570,7 +572,7 @@ void TileManager::AssignGpuMemoryToTiles(
// We won't be able to schedule this tile, so break out early.
if (tiles_that_need_to_be_rasterized->size() >=
- kScheduledRasterTasksLimit) {
+ scheduled_raster_task_limit_) {
all_tiles_that_need_to_be_rasterized_are_scheduled_ = false;
break;
}
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698