#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/base/resource/resource_scale_factor.h"
#include <algorithm>
#include <cmath>
#include <iterator>
#include <limits>
#include <memory>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/containers/contains.h"
namespace ui {
namespace {
std::vector<ResourceScaleFactor>* g_supported_resource_scale_factors = …;
const float kResourceScaleFactorScales[] = …;
static_assert …;
const float kFallbackToSmallerScaleDiff = …;
}
float GetScaleForResourceScaleFactor(ResourceScaleFactor scale_factor) { … }
void SetSupportedResourceScaleFactors(
const std::vector<ResourceScaleFactor>& scale_factors) { … }
const std::vector<ResourceScaleFactor>& GetSupportedResourceScaleFactors() { … }
ResourceScaleFactor GetSupportedResourceScaleFactor(float scale) { … }
ResourceScaleFactor GetSupportedResourceScaleFactorForRescale(float scale) { … }
ResourceScaleFactor GetMaxSupportedResourceScaleFactor() { … }
float GetScaleForMaxSupportedResourceScaleFactor() { … }
bool IsScaleFactorSupported(ResourceScaleFactor scale_factor) { … }
namespace test {
ScopedSetSupportedResourceScaleFactors::ScopedSetSupportedResourceScaleFactors(
const std::vector<ResourceScaleFactor>& new_scale_factors) { … }
ScopedSetSupportedResourceScaleFactors::
~ScopedSetSupportedResourceScaleFactors() { … }
}
}