#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/gfx/icc_profile.h"
#include <list>
#include <set>
#include "base/command_line.h"
#include "base/containers/lru_cache.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/synchronization/lock.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkData.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/encode/SkICC.h"
#include "third_party/skia/modules/skcms/skcms.h"
#include "ui/gfx/skia_color_space_util.h"
namespace gfx {
namespace {
static const size_t kMaxCachedICCProfiles = …;
DataToProfileCacheBase;
class DataToProfileCache : public DataToProfileCacheBase { … };
base::LazyInstance<DataToProfileCache>::Leaky g_data_to_profile_cache = …;
base::LazyInstance<base::Lock>::Leaky g_icc_profile_lock = …;
}
void ICCProfile::Internals::Initialize() { … }
ICCProfile::ICCProfile() = default;
ICCProfile::ICCProfile(ICCProfile&& other) = default;
ICCProfile::ICCProfile(const ICCProfile& other) = default;
ICCProfile& ICCProfile::operator=(ICCProfile&& other) = default;
ICCProfile& ICCProfile::operator=(const ICCProfile& other) = default;
ICCProfile::~ICCProfile() = default;
bool ICCProfile::operator==(const ICCProfile& other) const { … }
bool ICCProfile::operator!=(const ICCProfile& other) const { … }
bool ICCProfile::IsValid() const { … }
std::vector<char> ICCProfile::GetData() const { … }
ICCProfile ICCProfile::FromData(const void* data_as_void, size_t size) { … }
ColorSpace ICCProfile::GetColorSpace() const { … }
ColorSpace ICCProfile::GetPrimariesOnlyColorSpace() const { … }
bool ICCProfile::IsColorSpaceAccurate() const { … }
ICCProfile ICCProfile::FromColorSpace(const ColorSpace& color_space) { … }
ICCProfile::Internals::Internals(std::vector<char> data)
: … { … }
ICCProfile::Internals::~Internals() { … }
}