| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/favicon_base/select_favicon_frames.h" | 5 #include "components/favicon_base/select_favicon_frames.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "base/macros.h" |
| 13 #include "components/favicon_base/favicon_util.h" | 14 #include "components/favicon_base/favicon_util.h" |
| 14 #include "skia/ext/image_operations.h" | 15 #include "skia/ext/image_operations.h" |
| 15 #include "third_party/skia/include/core/SkCanvas.h" | 16 #include "third_party/skia/include/core/SkCanvas.h" |
| 16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 17 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
| 18 #include "ui/gfx/image/image_skia.h" | 19 #include "ui/gfx/image/image_skia.h" |
| 19 #include "ui/gfx/image/image_skia_source.h" | 20 #include "ui/gfx/image/image_skia_source.h" |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // GetCandidateIndicesWithBestScores() will return duplicate indices if the | 271 // GetCandidateIndicesWithBestScores() will return duplicate indices if the |
| 271 // bitmap data with |frame_pixel_sizes[index]| should be used for multiple | 272 // bitmap data with |frame_pixel_sizes[index]| should be used for multiple |
| 272 // scale factors. Remove duplicates here such that |best_indices| contains | 273 // scale factors. Remove duplicates here such that |best_indices| contains |
| 273 // no duplicates. | 274 // no duplicates. |
| 274 if (already_added.find(index) == already_added.end()) { | 275 if (already_added.find(index) == already_added.end()) { |
| 275 already_added.insert(index); | 276 already_added.insert(index); |
| 276 best_indices->push_back(index); | 277 best_indices->push_back(index); |
| 277 } | 278 } |
| 278 } | 279 } |
| 279 } | 280 } |
| OLD | NEW |