#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/apps/icon_standardizer.h"
#include "base/trace_event/trace_event.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkMaskFilter.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/image/image_skia_rep.h"
namespace apps {
namespace {
constexpr float kCircleOutlineStrokeWidthRatio = …;
constexpr int kMinimumVisibleAlpha = …;
constexpr float kCircleShapePixelDifferenceThreshold = …;
constexpr float kIconScaleToFit = …;
constexpr float kBackgroundCircleScale = …;
constexpr float kMinimumVisibleCircularIconSizeRatio = …;
constexpr float kMaximumVisibleCircularIconSizeRatio = …;
float GetDistanceBetweenPoints(gfx::PointF first_point,
gfx::PointF second_point) { … }
float GetFarthestVisiblePointFromCenter(const SkBitmap& bitmap) { … }
bool IsIconRepCircleShaped(const gfx::ImageSkiaRep& rep) { … }
std::optional<gfx::ImageSkiaRep> StandardizeSizeOfImageRep(
const gfx::ImageSkiaRep& rep,
float scale) { … }
gfx::ImageSkia StandardizeSize(const gfx::ImageSkia& image) { … }
}
std::optional<gfx::ImageSkiaRep> CreateStandardIconImageRep(
const gfx::ImageSkiaRep& base_rep,
float scale) { … }
gfx::ImageSkia CreateStandardIconImage(const gfx::ImageSkia& image) { … }
}