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

Unified Diff: cc/resources/picture_pile.cc

Issue 379823002: cc: skipping a horizontal sort by checking the value of vertical_density (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove TODO comment line Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 6341e88b3688889df468543cecf2c652136f20c9..9991b13753872320a650a5c7bfb9c4ceb9d0b6c3 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -116,8 +116,12 @@ float ClusterTiles(const std::vector<gfx::Rect>& invalid_tiles,
vertical_density = do_clustering(invalid_tiles_vertical,
&vertical_clustering);
+ if (vertical_density == 1) {
vmpstr 2014/07/09 23:29:11 nit: 1.f
hyunki 2014/07/09 23:43:44 Done.
+ *record_rects = vertical_clustering;
+ return vertical_density;
+ }
+
// Now try again with a horizontal sort, see which one is best
- // TODO(humper): Heuristics for skipping this step?
std::vector<gfx::Rect> invalid_tiles_horizontal = invalid_tiles;
vmpstr 2014/07/09 23:29:11 Is this used? I think this might have been a typo,
hyunki 2014/07/09 23:43:44 Sure. I think it is used. And possibly rename inva
std::sort(invalid_tiles_vertical.begin(),
invalid_tiles_vertical.end(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698