chromium/chrome/browser/apps/icon_standardizer.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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) {}

// Returns the distance for the farthest visible pixel away from the center of
// the icon.
float GetFarthestVisiblePointFromCenter(const SkBitmap& bitmap) {}

bool IsIconRepCircleShaped(const gfx::ImageSkiaRep& rep) {}

std::optional<gfx::ImageSkiaRep> StandardizeSizeOfImageRep(
    const gfx::ImageSkiaRep& rep,
    float scale) {}

// Returns an image with equal width and height. If necessary, padding is
// added to ensure the width and height are equal.
gfx::ImageSkia StandardizeSize(const gfx::ImageSkia& image) {}

}  // namespace

std::optional<gfx::ImageSkiaRep> CreateStandardIconImageRep(
    const gfx::ImageSkiaRep& base_rep,
    float scale) {}

gfx::ImageSkia CreateStandardIconImage(const gfx::ImageSkia& image) {}

}  // namespace apps