#include "components/favicon_base/favicon_util.h"
#include <stddef.h>
#include <cmath>
#include "base/ranges/algorithm.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "components/favicon_base/favicon_types.h"
#include "components/favicon_base/select_favicon_frames.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImage.h"
#include "ui/base/resource/resource_scale_factor.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image_png_rep.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"
#if BUILDFLAG(IS_MAC)
#include "base/mac/mac_util.h"
#endif
namespace favicon_base {
namespace {
std::vector<gfx::ImagePNGRep> SelectFaviconFramesFromPNGsWithoutResizing(
const std::vector<favicon_base::FaviconRawBitmapResult>& png_data,
const std::vector<float>& favicon_scales,
int favicon_size) { … }
SkBitmap ResizeBitmapByDownsamplingIfPossible(
const std::vector<SkBitmap>& input_bitmaps,
int desired_size) { … }
}
std::vector<float> GetFaviconScales() { … }
gfx::Image SelectFaviconFramesFromPNGs(
const std::vector<favicon_base::FaviconRawBitmapResult>& png_data,
const std::vector<float>& favicon_scales,
int favicon_size) { … }
favicon_base::FaviconRawBitmapResult ResizeFaviconBitmapResult(
int desired_size_in_pixel,
const std::vector<favicon_base::FaviconRawBitmapResult>&
favicon_bitmap_results) { … }
}