| 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/favicon_util.h" | 5 #include "chrome/browser/favicon/favicon_util.h" |
| 6 | 6 |
| 7 #include "chrome/browser/favicon/favicon_types.h" | |
| 8 #include "chrome/browser/history/select_favicon_frames.h" | 7 #include "chrome/browser/history/select_favicon_frames.h" |
| 8 #include "chrome/common/favicon/favicon_types.h" |
| 9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
| 10 #include "content/public/child/image_decoder_utils.h" | 10 #include "content/public/child/image_decoder_utils.h" |
| 11 #include "skia/ext/image_operations.h" | 11 #include "skia/ext/image_operations.h" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "ui/gfx/codec/png_codec.h" | 13 #include "ui/gfx/codec/png_codec.h" |
| 14 #include "ui/gfx/favicon_size.h" | 14 #include "ui/gfx/favicon_size.h" |
| 15 #include "ui/gfx/image/image_png_rep.h" | 15 #include "ui/gfx/image/image_png_rep.h" |
| 16 #include "ui/gfx/image/image_skia.h" | 16 #include "ui/gfx/image/image_skia.h" |
| 17 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
| 18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 int new_height = decoded.height(); | 220 int new_height = decoded.height(); |
| 221 gfx::CalculateFaviconTargetSize(&new_width, &new_height); | 221 gfx::CalculateFaviconTargetSize(&new_width, &new_height); |
| 222 decoded = skia::ImageOperations::Resize( | 222 decoded = skia::ImageOperations::Resize( |
| 223 decoded, skia::ImageOperations::RESIZE_LANCZOS3, new_width, new_height); | 223 decoded, skia::ImageOperations::RESIZE_LANCZOS3, new_width, new_height); |
| 224 } | 224 } |
| 225 | 225 |
| 226 // Encode our bitmap as a PNG. | 226 // Encode our bitmap as a PNG. |
| 227 gfx::PNGCodec::EncodeBGRASkBitmap(decoded, false, png_data); | 227 gfx::PNGCodec::EncodeBGRASkBitmap(decoded, false, png_data); |
| 228 return true; | 228 return true; |
| 229 } | 229 } |
| OLD | NEW |