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

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

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Rebase (again) Created 3 years, 10 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_win.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 static const uint64_t test_id_generic_rgb_; 77 static const uint64_t test_id_generic_rgb_;
78 static const uint64_t test_id_srgb_; 78 static const uint64_t test_id_srgb_;
79 79
80 // This method is used to hard-code the |id_| to a specific value, and is 80 // This method is used to hard-code the |id_| to a specific value, and is
81 // used by test methods to ensure that they don't conflict with the values 81 // used by test methods to ensure that they don't conflict with the values
82 // generated in the browser. 82 // generated in the browser.
83 static ICCProfile FromDataWithId(const void* icc_profile, 83 static ICCProfile FromDataWithId(const void* icc_profile,
84 size_t size, 84 size_t size,
85 uint64_t id); 85 uint64_t id);
86 86
87 // TODO(ccameron): Remove this function once its callerrs are gone.
88 static ICCProfile FromSkColorSpace(sk_sp<SkColorSpace> color_space);
89 static bool IsValidProfileLength(size_t length); 87 static bool IsValidProfileLength(size_t length);
90 void ComputeColorSpaceAndCache(); 88 void ComputeColorSpaceAndCache();
91 89
92 // This globally identifies this ICC profile. It is used to look up this ICC 90 // This globally identifies this ICC profile. It is used to look up this ICC
93 // profile from a ColorSpace object created from it. The object is invalid if 91 // profile from a ColorSpace object created from it. The object is invalid if
94 // |id_| is zero. 92 // |id_| is zero.
95 uint64_t id_ = 0; 93 uint64_t id_ = 0;
96 std::vector<char> data_; 94 std::vector<char> data_;
97 95
98 gfx::ColorSpace color_space_; 96 gfx::ColorSpace color_space_;
99 97
100 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, BT709toSRGBICC); 98 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, BT709toSRGBICC);
101 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 99 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
102 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); 100 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t);
103 friend class ColorSpace; 101 friend class ColorSpace;
104 friend struct IPC::ParamTraits<gfx::ICCProfile>; 102 friend struct IPC::ParamTraits<gfx::ICCProfile>;
105 }; 103 };
106 104
107 } // namespace gfx 105 } // namespace gfx
108 106
109 #endif // UI_GFX_ICC_PROFILE_H_ 107 #endif // UI_GFX_ICC_PROFILE_H_
OLDNEW
« no previous file with comments | « ui/gfx/color_space_win.cc ('k') | ui/gfx/icc_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698