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

Unified Diff: cc/resources/tile_manager.cc

Issue 157743007: cc: Prevent usage of rasterize on-demand with delegating renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more unit test Created 6 years, 10 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 4f9f0aed6545b1792c93111f34313194c1268288..950323a5628fc88fb463829cb7a793a49111c483 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -170,6 +170,7 @@ scoped_ptr<TileManager> TileManager::Create(
ContextProvider* context_provider,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
bool use_map_image,
+ bool use_rasterize_on_demand,
size_t max_transfer_buffer_usage_bytes,
size_t max_raster_usage_bytes,
unsigned map_image_texture_target) {
@@ -184,7 +185,8 @@ scoped_ptr<TileManager> TileManager::Create(
context_provider,
max_transfer_buffer_usage_bytes),
max_raster_usage_bytes,
- rendering_stats_instrumentation));
+ rendering_stats_instrumentation,
+ use_rasterize_on_demand));
}
TileManager::TileManager(
@@ -192,7 +194,8 @@ TileManager::TileManager(
ResourceProvider* resource_provider,
scoped_ptr<RasterWorkerPool> raster_worker_pool,
size_t max_raster_usage_bytes,
- RenderingStatsInstrumentation* rendering_stats_instrumentation)
+ RenderingStatsInstrumentation* rendering_stats_instrumentation,
+ bool use_rasterize_on_demand)
: client_(client),
resource_pool_(
ResourcePool::Create(resource_provider,
@@ -210,7 +213,8 @@ TileManager::TileManager(
ever_exceeded_memory_budget_(false),
rendering_stats_instrumentation_(rendering_stats_instrumentation),
did_initialize_visible_tile_(false),
- did_check_for_completed_tasks_since_last_schedule_tasks_(true) {
+ did_check_for_completed_tasks_since_last_schedule_tasks_(true),
+ use_rasterize_on_demand_(use_rasterize_on_demand) {
raster_worker_pool_->SetClient(this);
}
@@ -324,7 +328,8 @@ void TileManager::DidFinishRunningTasks() {
// If we can't raster on demand, give up early (and don't activate).
if (!allow_rasterize_on_demand)
return;
- tile_version.set_rasterize_on_demand();
+ if (use_rasterize_on_demand_)
+ tile_version.set_rasterize_on_demand();
}
}
@@ -697,7 +702,7 @@ void TileManager::AssignGpuMemoryToTiles(
// This tile was already on screen and now its resources have been
// released. In order to prevent checkerboarding, set this tile as
// rasterize on demand immediately.
- if (mts.visible_and_ready_to_draw)
+ if (mts.visible_and_ready_to_draw && use_rasterize_on_demand_)
tile_version.set_rasterize_on_demand();
oomed = true;
« 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