| 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 #ifndef COMPONENTS_FAVICON_BASE_FAVICON_UTIL_H_ | 5 #ifndef COMPONENTS_FAVICON_BASE_FAVICON_UTIL_H_ |
| 6 #define COMPONENTS_FAVICON_BASE_FAVICON_UTIL_H_ | 6 #define COMPONENTS_FAVICON_BASE_FAVICON_UTIL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "components/favicon_base/favicon_types.h" | 10 #include "components/favicon_base/favicon_types.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Generates a favicon_bitmap_result sized exactly to [desired_size, | 39 // Generates a favicon_bitmap_result sized exactly to [desired_size, |
| 40 // desired_size] from the provided result set. If the exact size is found in | 40 // desired_size] from the provided result set. If the exact size is found in |
| 41 // the set, it just returns that; otherwise, it will decode the PNG, scale, | 41 // the set, it just returns that; otherwise, it will decode the PNG, scale, |
| 42 // and encode a new PNG. | 42 // and encode a new PNG. |
| 43 favicon_base::FaviconRawBitmapResult ResizeFaviconBitmapResult( | 43 favicon_base::FaviconRawBitmapResult ResizeFaviconBitmapResult( |
| 44 const std::vector<favicon_base::FaviconRawBitmapResult>& | 44 const std::vector<favicon_base::FaviconRawBitmapResult>& |
| 45 favicon_bitmap_results, | 45 favicon_bitmap_results, |
| 46 int desired_size_in_pixel); | 46 int desired_size_in_pixel); |
| 47 | 47 |
| 48 } // namspace favicon_base | 48 // Returns a resampled bitmap of |desired_size|x|desired_size| by resampling the |
| 49 // best bitmap out of |input_bitmaps|. ResizeBitmapByDownsamplingIfPossible() is |
| 50 // similar to SelectFaviconFrames() but it operates on bitmaps which have |
| 51 // already been resampled via SelectFaviconFrames(). |
| 52 SkBitmap ResizeBitmapByDownsamplingIfPossible( |
| 53 const std::vector<SkBitmap>& input_bitmaps, |
| 54 int desired_size); |
| 55 |
| 56 } // namespace favicon_base |
| 49 | 57 |
| 50 #endif // COMPONENTS_FAVICON_BASE_FAVICON_UTIL_H_ | 58 #endif // COMPONENTS_FAVICON_BASE_FAVICON_UTIL_H_ |
| OLD | NEW |