| 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/history/select_favicon_frames.h" | |
| 8 #include "components/favicon_base/favicon_types.h" | 7 #include "components/favicon_base/favicon_types.h" |
| 8 #include "components/favicon_base/select_favicon_frames.h" |
| 9 #include "skia/ext/image_operations.h" | 9 #include "skia/ext/image_operations.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 #include "third_party/skia/include/core/SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
| 12 #include "ui/gfx/codec/png_codec.h" | 12 #include "ui/gfx/codec/png_codec.h" |
| 13 #include "ui/gfx/favicon_size.h" | 13 #include "ui/gfx/favicon_size.h" |
| 14 #include "ui/gfx/image/image_png_rep.h" | 14 #include "ui/gfx/image/image_png_rep.h" |
| 15 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
| 16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
| 17 | 17 |
| 18 #if defined(OS_MACOSX) && !defined(OS_IOS) | 18 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 scoped_refptr<base::RefCountedBytes> png_bytes(new base::RefCountedBytes()); | 243 scoped_refptr<base::RefCountedBytes> png_bytes(new base::RefCountedBytes()); |
| 244 if (gfx::PNGCodec::EncodeBGRASkBitmap( | 244 if (gfx::PNGCodec::EncodeBGRASkBitmap( |
| 245 resized_image_skia_reps[i].sk_bitmap(), false, &png_bytes->data())) { | 245 resized_image_skia_reps[i].sk_bitmap(), false, &png_bytes->data())) { |
| 246 png_reps.push_back(gfx::ImagePNGRep(png_bytes, | 246 png_reps.push_back(gfx::ImagePNGRep(png_bytes, |
| 247 resized_image_skia_reps[i].scale())); | 247 resized_image_skia_reps[i].scale())); |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 return gfx::Image(png_reps); | 251 return gfx::Image(png_reps); |
| 252 } | 252 } |
| OLD | NEW |