| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_ICC_PROFILE_H_ | 5 #ifndef UI_GFX_ICC_PROFILE_H_ |
| 6 #define UI_GFX_ICC_PROFILE_H_ | 6 #define UI_GFX_ICC_PROFILE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // false if |id| is not in the cache. | 95 // false if |id| is not in the cache. |
| 96 static bool FromId(uint64_t id, ICCProfile* icc_profile); | 96 static bool FromId(uint64_t id, ICCProfile* icc_profile); |
| 97 | 97 |
| 98 // This method is used to hard-code the |id_| to a specific value, and is | 98 // This method is used to hard-code the |id_| to a specific value, and is |
| 99 // used by test methods to ensure that they don't conflict with the values | 99 // used by test methods to ensure that they don't conflict with the values |
| 100 // generated in the browser. | 100 // generated in the browser. |
| 101 static ICCProfile FromDataWithId(const void* icc_profile, | 101 static ICCProfile FromDataWithId(const void* icc_profile, |
| 102 size_t size, | 102 size_t size, |
| 103 uint64_t id); | 103 uint64_t id); |
| 104 | 104 |
| 105 static bool HasForcedProfile(); |
| 106 static ICCProfile GetForcedProfile(); |
| 107 |
| 105 void ComputeColorSpaceAndCache(); | 108 void ComputeColorSpaceAndCache(); |
| 106 | 109 |
| 107 // This globally identifies this ICC profile. It is used to look up this ICC | 110 // This globally identifies this ICC profile. It is used to look up this ICC |
| 108 // profile from a ColorSpace object created from it. The object is invalid if | 111 // profile from a ColorSpace object created from it. The object is invalid if |
| 109 // |id_| is zero. | 112 // |id_| is zero. |
| 110 uint64_t id_ = 0; | 113 uint64_t id_ = 0; |
| 111 std::vector<char> data_; | 114 std::vector<char> data_; |
| 112 | 115 |
| 113 // |color_space| always links back to this ICC profile, and its SkColorSpace | 116 // |color_space| always links back to this ICC profile, and its SkColorSpace |
| 114 // is always equal to the SkColorSpace created from this ICCProfile. | 117 // is always equal to the SkColorSpace created from this ICCProfile. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 125 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 128 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
| 126 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); | 129 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); |
| 127 friend class ColorSpace; | 130 friend class ColorSpace; |
| 128 friend class ColorTransformInternal; | 131 friend class ColorTransformInternal; |
| 129 friend struct IPC::ParamTraits<gfx::ICCProfile>; | 132 friend struct IPC::ParamTraits<gfx::ICCProfile>; |
| 130 }; | 133 }; |
| 131 | 134 |
| 132 } // namespace gfx | 135 } // namespace gfx |
| 133 | 136 |
| 134 #endif // UI_GFX_ICC_PROFILE_H_ | 137 #endif // UI_GFX_ICC_PROFILE_H_ |
| OLD | NEW |