chromium/third_party/skia/src/core/SkColorSpacePriv.h

/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef SkColorSpacePriv_DEFINED
#define SkColorSpacePriv_DEFINED

#include "include/core/SkColorSpace.h"
#include "include/private/base/SkTemplates.h"
#include "modules/skcms/skcms.h"

// A gamut narrower than sRGB, useful for testing.
static constexpr skcms_Matrix3x3 gNarrow_toXYZD50 =;

static inline bool color_space_almost_equal(float a, float b) {}

// Let's use a stricter version for transfer functions.  Worst case, these are encoded
// in ICC format, which offers 16-bits of fractional precision.
static inline bool transfer_fn_almost_equal(float a, float b) {}

static inline bool is_almost_srgb(const skcms_TransferFunction& coeffs) {}

static inline bool is_almost_2dot2(const skcms_TransferFunction& coeffs) {}

static inline bool is_almost_linear(const skcms_TransferFunction& coeffs) {}

// Return raw pointers to commonly used SkColorSpaces.
// No need to ref/unref these, but if you do, do it in pairs.
SkColorSpace* sk_srgb_singleton();
SkColorSpace* sk_srgb_linear_singleton();

#endif  // SkColorSpacePriv_DEFINED