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

Unified Diff: ui/gfx/icc_profile.cc

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Rebase (again) Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/icc_profile.h ('k') | ui/gfx/icc_profile_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icc_profile.cc
diff --git a/ui/gfx/icc_profile.cc b/ui/gfx/icc_profile.cc
index ef823f389991cb7c99e2b04511d57392898fbb6b..2635586a946b8607554731cba31123e52381fbee 100644
--- a/ui/gfx/icc_profile.cc
+++ b/ui/gfx/icc_profile.cc
@@ -144,31 +144,6 @@ ICCProfile ICCProfile::FromColorSpace(const gfx::ColorSpace& color_space) {
return ICCProfile();
}
-ICCProfile ICCProfile::FromSkColorSpace(sk_sp<SkColorSpace> color_space) {
- ICCProfile icc_profile;
-
- Cache& cache = g_cache.Get();
- base::AutoLock lock(cache.lock);
-
- // Linearly search the cached ICC profiles to find one with the same data.
- // If it exists, re-use its id and touch it in the cache.
- for (auto iter = cache.id_to_icc_profile_mru.begin();
- iter != cache.id_to_icc_profile_mru.end(); ++iter) {
- sk_sp<SkColorSpace> iter_color_space =
- iter->second.color_space_.ToSkColorSpace();
- if (SkColorSpace::Equals(color_space.get(), iter_color_space.get())) {
- icc_profile = iter->second;
- cache.id_to_icc_profile_mru.Get(icc_profile.id_);
- return icc_profile;
- }
- }
-
- // TODO(ccameron): Support constructing ICC profiles from arbitrary
- // SkColorSpace objects.
- DLOG(ERROR) << "Failed to find ICC profile matching SkColorSpace.";
- return icc_profile;
-}
-
const std::vector<char>& ICCProfile::GetData() const {
return data_;
}
« no previous file with comments | « ui/gfx/icc_profile.h ('k') | ui/gfx/icc_profile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698