Index: ui/gfx/color_space_x11.cc |
diff --git a/ui/gfx/color_space_x11.cc b/ui/gfx/color_space_x11.cc |
index dfa1e129092e6f05baa7f65034ab41d2ad22cc08..7dacae21512d8b0a32efa84df0b54c88afd857d2 100644 |
--- a/ui/gfx/color_space_x11.cc |
+++ b/ui/gfx/color_space_x11.cc |
@@ -17,6 +17,7 @@ |
// static |
ColorSpace ColorSpace::FromBestMonitor() { |
+ ColorSpace color_space; |
Atom property = XInternAtom(GetXDisplay(), "_ICC_PROFILE", true); |
if (property != None) { |
Atom prop_type = None; |
@@ -29,13 +30,11 @@ |
0x1FFFFFFF /* MAXINT32 / 4 */, False, AnyPropertyType, &prop_type, |
&prop_format, &nitems, &nbytes, |
reinterpret_cast<unsigned char**>(&property_data)) == Success) { |
- std::vector<char> icc_profile; |
- icc_profile.assign(property_data, property_data + nitems); |
+ color_space.icc_profile_.assign(property_data, property_data + nitems); |
XFree(property_data); |
- return FromICCProfile(icc_profile); |
} |
} |
- return ColorSpace(); |
+ return color_space; |
} |
} // namespace gfx |