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

Unified Diff: ui/gfx/icc_profile.cc

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: 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
Index: ui/gfx/icc_profile.cc
diff --git a/ui/gfx/icc_profile.cc b/ui/gfx/icc_profile.cc
index 542434eb93fdcf411ee45ce64182b725b70acfe4..280a6442ba22d9aa7aa2247cebb72a811725e5e4 100644
--- a/ui/gfx/icc_profile.cc
+++ b/ui/gfx/icc_profile.cc
@@ -132,31 +132,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_;
}
« third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp ('K') | « ui/gfx/icc_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698