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(), |