| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // other functions to read. This should not be called on the UI or IO thread. | 68 // other functions to read. This should not be called on the UI or IO thread. |
| 69 static void UpdateCachedProfilesOnBackgroundThread(); | 69 static void UpdateCachedProfilesOnBackgroundThread(); |
| 70 static bool CachedProfilesNeedUpdate(); | 70 static bool CachedProfilesNeedUpdate(); |
| 71 #endif | 71 #endif |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 friend ICCProfile ICCProfileForTestingAdobeRGB(); | 74 friend ICCProfile ICCProfileForTestingAdobeRGB(); |
| 75 friend ICCProfile ICCProfileForTestingColorSpin(); | 75 friend ICCProfile ICCProfileForTestingColorSpin(); |
| 76 friend ICCProfile ICCProfileForTestingGenericRGB(); | 76 friend ICCProfile ICCProfileForTestingGenericRGB(); |
| 77 friend ICCProfile ICCProfileForTestingSRGB(); | 77 friend ICCProfile ICCProfileForTestingSRGB(); |
| 78 friend ICCProfile ICCProfileForTestingNoAnalyticTrFn(); |
| 78 static const uint64_t test_id_adobe_rgb_; | 79 static const uint64_t test_id_adobe_rgb_; |
| 79 static const uint64_t test_id_color_spin_; | 80 static const uint64_t test_id_color_spin_; |
| 80 static const uint64_t test_id_generic_rgb_; | 81 static const uint64_t test_id_generic_rgb_; |
| 81 static const uint64_t test_id_srgb_; | 82 static const uint64_t test_id_srgb_; |
| 83 static const uint64_t test_id_no_analytic_tr_fn_; |
| 82 | 84 |
| 83 // Populate |icc_profile| with the ICCProfile corresponding to id |id|. Return | 85 // Populate |icc_profile| with the ICCProfile corresponding to id |id|. Return |
| 84 // false if |id| is not in the cache. If |only_if_needed| is true, then return | 86 // false if |id| is not in the cache. If |only_if_needed| is true, then return |
| 85 // false if |color_space_is_accurate_| is true for this profile (that is, if | 87 // false if |color_space_is_accurate_| is true for this profile (that is, if |
| 86 // the ICCProfile is needed to know the space precisely). | 88 // the ICCProfile is needed to know the space precisely). |
| 87 static bool FromId(uint64_t id, bool only_if_needed, ICCProfile* icc_profile); | 89 static bool FromId(uint64_t id, bool only_if_needed, ICCProfile* icc_profile); |
| 88 | 90 |
| 89 // This method is used to hard-code the |id_| to a specific value, and is | 91 // This method is used to hard-code the |id_| to a specific value, and is |
| 90 // used by test methods to ensure that they don't conflict with the values | 92 // used by test methods to ensure that they don't conflict with the values |
| 91 // generated in the browser. | 93 // generated in the browser. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 115 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 117 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
| 116 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); | 118 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); |
| 117 friend class ColorSpace; | 119 friend class ColorSpace; |
| 118 friend class ColorTransformInternal; | 120 friend class ColorTransformInternal; |
| 119 friend struct IPC::ParamTraits<gfx::ICCProfile>; | 121 friend struct IPC::ParamTraits<gfx::ICCProfile>; |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 } // namespace gfx | 124 } // namespace gfx |
| 123 | 125 |
| 124 #endif // UI_GFX_ICC_PROFILE_H_ | 126 #endif // UI_GFX_ICC_PROFILE_H_ |
| OLD | NEW |