| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 static bool CachedProfilesNeedUpdate(); | 75 static bool CachedProfilesNeedUpdate(); |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 friend ICCProfile ICCProfileForTestingAdobeRGB(); | 79 friend ICCProfile ICCProfileForTestingAdobeRGB(); |
| 80 friend ICCProfile ICCProfileForTestingColorSpin(); | 80 friend ICCProfile ICCProfileForTestingColorSpin(); |
| 81 friend ICCProfile ICCProfileForTestingGenericRGB(); | 81 friend ICCProfile ICCProfileForTestingGenericRGB(); |
| 82 friend ICCProfile ICCProfileForTestingSRGB(); | 82 friend ICCProfile ICCProfileForTestingSRGB(); |
| 83 friend ICCProfile ICCProfileForTestingNoAnalyticTrFn(); | 83 friend ICCProfile ICCProfileForTestingNoAnalyticTrFn(); |
| 84 friend ICCProfile ICCProfileForTestingA2BOnly(); | 84 friend ICCProfile ICCProfileForTestingA2BOnly(); |
| 85 friend ICCProfile ICCProfileForTestingOvershoot(); |
| 85 static const uint64_t test_id_adobe_rgb_; | 86 static const uint64_t test_id_adobe_rgb_; |
| 86 static const uint64_t test_id_color_spin_; | 87 static const uint64_t test_id_color_spin_; |
| 87 static const uint64_t test_id_generic_rgb_; | 88 static const uint64_t test_id_generic_rgb_; |
| 88 static const uint64_t test_id_srgb_; | 89 static const uint64_t test_id_srgb_; |
| 89 static const uint64_t test_id_no_analytic_tr_fn_; | 90 static const uint64_t test_id_no_analytic_tr_fn_; |
| 90 static const uint64_t test_id_a2b_only_; | 91 static const uint64_t test_id_a2b_only_; |
| 92 static const uint64_t test_id_overshoot_; |
| 91 | 93 |
| 92 // Populate |icc_profile| with the ICCProfile corresponding to id |id|. Return | 94 // Populate |icc_profile| with the ICCProfile corresponding to id |id|. Return |
| 93 // false if |id| is not in the cache. | 95 // false if |id| is not in the cache. |
| 94 static bool FromId(uint64_t id, ICCProfile* icc_profile); | 96 static bool FromId(uint64_t id, ICCProfile* icc_profile); |
| 95 | 97 |
| 96 // 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 |
| 97 // 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 |
| 98 // generated in the browser. | 100 // generated in the browser. |
| 99 static ICCProfile FromDataWithId(const void* icc_profile, | 101 static ICCProfile FromDataWithId(const void* icc_profile, |
| 100 size_t size, | 102 size_t size, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 123 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 125 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
| 124 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); | 126 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); |
| 125 friend class ColorSpace; | 127 friend class ColorSpace; |
| 126 friend class ColorTransformInternal; | 128 friend class ColorTransformInternal; |
| 127 friend struct IPC::ParamTraits<gfx::ICCProfile>; | 129 friend struct IPC::ParamTraits<gfx::ICCProfile>; |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 } // namespace gfx | 132 } // namespace gfx |
| 131 | 133 |
| 132 #endif // UI_GFX_ICC_PROFILE_H_ | 134 #endif // UI_GFX_ICC_PROFILE_H_ |
| OLD | NEW |