Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: chrome/browser/favicon/favicon_util.cc

Issue 15388002: Supporting high dpi favicons in Instant Extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/favicon/favicon_types.cc ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_types.cc ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698