Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: ui/gfx/icc_profile.h

Issue 2784673006: color: Do not enforce T(0)=0 and T(1)=1 constraints in approxmation (Closed)
Patch Set: Fix the right error bound Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/color_space_unittest.cc ('k') | ui/gfx/icc_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/gfx/color_space_unittest.cc ('k') | ui/gfx/icc_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698