chromium/ui/gfx/icc_profile.cc

// Copyright 2016 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/354829279): Remove this and convert code to safer constructs.
#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 =;

// An LRU cache mapping data to ICCProfile objects, to avoid re-parsing
// profiles every time they are read.
DataToProfileCacheBase;
class DataToProfileCache : public DataToProfileCacheBase {};
base::LazyInstance<DataToProfileCache>::Leaky g_data_to_profile_cache =;

// Lock that must be held to access |g_data_to_profile_cache|.
base::LazyInstance<base::Lock>::Leaky g_icc_profile_lock =;

}  // namespace

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 {}

// static
ICCProfile ICCProfile::FromData(const void* data_as_void, size_t size) {}

ColorSpace ICCProfile::GetColorSpace() const {}

ColorSpace ICCProfile::GetPrimariesOnlyColorSpace() const {}

bool ICCProfile::IsColorSpaceAccurate() const {}

// static
ICCProfile ICCProfile::FromColorSpace(const ColorSpace& color_space) {}

ICCProfile::Internals::Internals(std::vector<char> data)
    :{}

ICCProfile::Internals::~Internals() {}

}  // namespace gfx