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

Unified Diff: ui/gfx/icc_profile_mac.mm

Issue 2161293002: Color: Separate ICCProfile and ColorSpace structures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add parts to resource provider Created 4 years, 5 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_mac.mm
diff --git a/ui/gfx/color_space_mac.mm b/ui/gfx/icc_profile_mac.mm
similarity index 69%
rename from ui/gfx/color_space_mac.mm
rename to ui/gfx/icc_profile_mac.mm
index 630554b16e3ea7adfcb4034f98c6c7d752da4e0b..92fe8dde12f4e3db2f10a17539c561c8bf573c49 100644
--- a/ui/gfx/color_space_mac.mm
+++ b/ui/gfx/icc_profile_mac.mm
@@ -2,33 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gfx/color_space.h"
-
-#import <Cocoa/Cocoa.h>
-#include <stddef.h>
+#include "ui/gfx/icc_profile.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "ui/gfx/mac/coordinate_conversion.h"
namespace gfx {
// static
-ColorSpace ColorSpace::FromBestMonitor() {
+ICCProfile ICCProfile::FromBestMonitor() {
return FromCGColorSpace(base::mac::GetSystemColorSpace());
}
// static
-ColorSpace ColorSpace::FromCGColorSpace(CGColorSpaceRef cg_color_space) {
+ICCProfile ICCProfile::FromCGColorSpace(CGColorSpaceRef cg_color_space) {
base::ScopedCFTypeRef<CFDataRef> cf_icc_profile(
CGColorSpaceCopyICCProfile(cg_color_space));
if (!cf_icc_profile)
- return gfx::ColorSpace();
+ return gfx::ICCProfile();
size_t length = CFDataGetLength(cf_icc_profile);
const unsigned char* data = CFDataGetBytePtr(cf_icc_profile);
std::vector<char> vector_icc_profile;
vector_icc_profile.assign(data, data + length);
- return FromICCProfile(vector_icc_profile);
+ return FromData(vector_icc_profile);
}
} // namespace gfx
« ui/gfx/icc_profile.cc ('K') | « ui/gfx/icc_profile.cc ('k') | ui/gfx/icc_profile_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698