1cb93a386Sopenharmony_ci/*
2cb93a386Sopenharmony_ci * Copyright 2016 Google Inc.
3cb93a386Sopenharmony_ci *
4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be
5cb93a386Sopenharmony_ci * found in the LICENSE file.
6cb93a386Sopenharmony_ci */
7cb93a386Sopenharmony_ci
8cb93a386Sopenharmony_ci#ifndef SkICCPriv_DEFINED
9cb93a386Sopenharmony_ci#define SkICCPriv_DEFINED
10cb93a386Sopenharmony_ci
11cb93a386Sopenharmony_ci#include "include/core/SkColorSpace.h"
12cb93a386Sopenharmony_ci#include "include/core/SkTypes.h"
13cb93a386Sopenharmony_ci
14cb93a386Sopenharmony_ci// This is equal to the header size according to the ICC specification (128)
15cb93a386Sopenharmony_ci// plus the size of the tag count (4).  We include the tag count since we
16cb93a386Sopenharmony_ci// always require it to be present anyway.
17cb93a386Sopenharmony_cistatic constexpr size_t kICCHeaderSize = 132;
18cb93a386Sopenharmony_ci
19cb93a386Sopenharmony_ci// Contains a signature (4), offset (4), and size (4).
20cb93a386Sopenharmony_cistatic constexpr size_t kICCTagTableEntrySize = 12;
21cb93a386Sopenharmony_ci
22cb93a386Sopenharmony_cistatic constexpr uint32_t kRGB_ColorSpace     = SkSetFourByteTag('R', 'G', 'B', ' ');
23cb93a386Sopenharmony_cistatic constexpr uint32_t kCMYK_ColorSpace    = SkSetFourByteTag('C', 'M', 'Y', 'K');
24cb93a386Sopenharmony_cistatic constexpr uint32_t kGray_ColorSpace    = SkSetFourByteTag('G', 'R', 'A', 'Y');
25cb93a386Sopenharmony_cistatic constexpr uint32_t kDisplay_Profile    = SkSetFourByteTag('m', 'n', 't', 'r');
26cb93a386Sopenharmony_cistatic constexpr uint32_t kInput_Profile      = SkSetFourByteTag('s', 'c', 'n', 'r');
27cb93a386Sopenharmony_cistatic constexpr uint32_t kOutput_Profile     = SkSetFourByteTag('p', 'r', 't', 'r');
28cb93a386Sopenharmony_cistatic constexpr uint32_t kColorSpace_Profile = SkSetFourByteTag('s', 'p', 'a', 'c');
29cb93a386Sopenharmony_cistatic constexpr uint32_t kXYZ_PCSSpace       = SkSetFourByteTag('X', 'Y', 'Z', ' ');
30cb93a386Sopenharmony_cistatic constexpr uint32_t kLAB_PCSSpace       = SkSetFourByteTag('L', 'a', 'b', ' ');
31cb93a386Sopenharmony_cistatic constexpr uint32_t kACSP_Signature     = SkSetFourByteTag('a', 'c', 's', 'p');
32cb93a386Sopenharmony_ci
33cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_rXYZ = SkSetFourByteTag('r', 'X', 'Y', 'Z');
34cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_gXYZ = SkSetFourByteTag('g', 'X', 'Y', 'Z');
35cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_bXYZ = SkSetFourByteTag('b', 'X', 'Y', 'Z');
36cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_rTRC = SkSetFourByteTag('r', 'T', 'R', 'C');
37cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_gTRC = SkSetFourByteTag('g', 'T', 'R', 'C');
38cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_bTRC = SkSetFourByteTag('b', 'T', 'R', 'C');
39cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_kTRC = SkSetFourByteTag('k', 'T', 'R', 'C');
40cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_A2B0 = SkSetFourByteTag('A', '2', 'B', '0');
41cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_CICP = SkSetFourByteTag('c', 'i', 'c', 'p');
42cb93a386Sopenharmony_ci
43cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_CurveType     = SkSetFourByteTag('c', 'u', 'r', 'v');
44cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_ParaCurveType = SkSetFourByteTag('p', 'a', 'r', 'a');
45cb93a386Sopenharmony_cistatic constexpr uint32_t kTAG_TextType      = SkSetFourByteTag('m', 'l', 'u', 'c');
46cb93a386Sopenharmony_ci
47cb93a386Sopenharmony_cienum ParaCurveType {
48cb93a386Sopenharmony_ci    kExponential_ParaCurveType = 0,
49cb93a386Sopenharmony_ci    kGAB_ParaCurveType         = 1,
50cb93a386Sopenharmony_ci    kGABC_ParaCurveType        = 2,
51cb93a386Sopenharmony_ci    kGABDE_ParaCurveType       = 3,
52cb93a386Sopenharmony_ci    kGABCDEF_ParaCurveType     = 4,
53cb93a386Sopenharmony_ci};
54cb93a386Sopenharmony_ci
55cb93a386Sopenharmony_ci#endif  // SkICCPriv_DEFINED
56