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

Unified Diff: cc/resources/gpu_rasterizer.cc

Issue 884453003: cc: Prevent resources from being allocated for solid tiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add dcheck in else clause Created 5 years, 11 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 | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/gpu_rasterizer.cc
diff --git a/cc/resources/gpu_rasterizer.cc b/cc/resources/gpu_rasterizer.cc
index fe13af706ce5c91c421112f9c005e7b4d5a9dc33..f54f83668c165063067ab8b1f910c88df927dc3d 100644
--- a/cc/resources/gpu_rasterizer.cc
+++ b/cc/resources/gpu_rasterizer.cc
@@ -66,21 +66,17 @@ void GpuRasterizer::RasterizeTiles(
ScopedResourceWriteLocks locks;
for (Tile* tile : tiles) {
- // TODO(hendrikw): Don't create resources for solid color tiles.
- // See crbug.com/445919
- scoped_ptr<ScopedResource> resource =
- resource_pool->AcquireResource(tile->desired_texture_size(),
- resource_format);
- const ScopedResource* const_resource = resource.get();
-
RasterSource::SolidColorAnalysis analysis;
if (tile->use_picture_analysis())
PerformSolidColorAnalysis(tile, &analysis);
- if (!analysis.is_solid_color)
- AddToMultiPictureDraw(tile, const_resource, &locks);
-
+ scoped_ptr<ScopedResource> resource;
+ if (!analysis.is_solid_color) {
+ resource = resource_pool->AcquireResource(tile->desired_texture_size(),
+ resource_format);
+ AddToMultiPictureDraw(tile, resource.get(), &locks);
+ }
update_tile_draw_info.Run(tile, resource.Pass(), analysis);
}
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698