| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/favicon/select_favicon_frames.h" | 5 #include "chrome/browser/history/select_favicon_frames.h" |
| 6 | 6 |
| 7 #include "skia/ext/image_operations.h" | 7 #include "skia/ext/image_operations.h" |
| 8 #include "third_party/skia/include/core/SkCanvas.h" | 8 #include "third_party/skia/include/core/SkCanvas.h" |
| 9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
| 10 #include "ui/gfx/image/image_skia.h" | 10 #include "ui/gfx/image/image_skia.h" |
| 11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 void SizesFromBitmaps(const std::vector<SkBitmap>& bitmaps, | 15 void SizesFromBitmaps(const std::vector<SkBitmap>& bitmaps, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 gfx::ImageSkia multi_image; | 239 gfx::ImageSkia multi_image; |
| 240 for (size_t i = 0; i < results.size(); ++i) { | 240 for (size_t i = 0; i < results.size(); ++i) { |
| 241 const SelectionResult& result = results[i]; | 241 const SelectionResult& result = results[i]; |
| 242 SkBitmap resized_bitmap = GetResizedBitmap(bitmaps[result.index], | 242 SkBitmap resized_bitmap = GetResizedBitmap(bitmaps[result.index], |
| 243 desired_size, result.scale_factor, result.resize_method); | 243 desired_size, result.scale_factor, result.resize_method); |
| 244 multi_image.AddRepresentation( | 244 multi_image.AddRepresentation( |
| 245 gfx::ImageSkiaRep(resized_bitmap, result.scale_factor)); | 245 gfx::ImageSkiaRep(resized_bitmap, result.scale_factor)); |
| 246 } | 246 } |
| 247 return multi_image; | 247 return multi_image; |
| 248 } | 248 } |
| OLD | NEW |