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

Unified Diff: ui/gfx/color_space_x11.cc

Issue 2140803002: Color: Don't duplicate ICC profile data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment 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
« no previous file with comments | « ui/gfx/color_space_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_space_x11.cc
diff --git a/ui/gfx/color_space_x11.cc b/ui/gfx/color_space_x11.cc
index 7dacae21512d8b0a32efa84df0b54c88afd857d2..dfa1e129092e6f05baa7f65034ab41d2ad22cc08 100644
--- a/ui/gfx/color_space_x11.cc
+++ b/ui/gfx/color_space_x11.cc
@@ -17,7 +17,6 @@ namespace gfx {
// static
ColorSpace ColorSpace::FromBestMonitor() {
- ColorSpace color_space;
Atom property = XInternAtom(GetXDisplay(), "_ICC_PROFILE", true);
if (property != None) {
Atom prop_type = None;
@@ -30,11 +29,13 @@ ColorSpace ColorSpace::FromBestMonitor() {
0x1FFFFFFF /* MAXINT32 / 4 */, False, AnyPropertyType, &prop_type,
&prop_format, &nitems, &nbytes,
reinterpret_cast<unsigned char**>(&property_data)) == Success) {
- color_space.icc_profile_.assign(property_data, property_data + nitems);
+ std::vector<char> icc_profile;
+ icc_profile.assign(property_data, property_data + nitems);
XFree(property_data);
+ return FromICCProfile(icc_profile);
}
}
- return color_space;
+ return ColorSpace();
}
} // namespace gfx
« no previous file with comments | « ui/gfx/color_space_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698