OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 : m_outputDeviceProfile(0) | 179 : m_outputDeviceProfile(0) |
180 { | 180 { |
181 // FIXME: Add optional ICCv4 support. | 181 // FIXME: Add optional ICCv4 support. |
182 #if OS(MACOSX) | 182 #if OS(MACOSX) |
183 RetainPtr<CGColorSpaceRef> monitorColorSpace(AdoptCF, CGDisplayCopyC
olorSpace(CGMainDisplayID())); | 183 RetainPtr<CGColorSpaceRef> monitorColorSpace(AdoptCF, CGDisplayCopyC
olorSpace(CGMainDisplayID())); |
184 CFDataRef iccProfile(CGColorSpaceCopyICCProfile(monitorColorSpace.ge
t())); | 184 CFDataRef iccProfile(CGColorSpaceCopyICCProfile(monitorColorSpace.ge
t())); |
185 if (iccProfile) { | 185 if (iccProfile) { |
186 size_t length = CFDataGetLength(iccProfile); | 186 size_t length = CFDataGetLength(iccProfile); |
187 const unsigned char* systemProfile = CFDataGetBytePtr(iccProfile
); | 187 const unsigned char* systemProfile = CFDataGetBytePtr(iccProfile
); |
188 m_outputDeviceProfile = qcms_profile_from_memory(systemProfile,
length); | 188 m_outputDeviceProfile = qcms_profile_from_memory(systemProfile,
length); |
| 189 CFRelease(iccProfile); |
189 } | 190 } |
190 #else | 191 #else |
191 // FIXME: add support for multiple monitors. | 192 // FIXME: add support for multiple monitors. |
192 ColorProfile profile; | 193 ColorProfile profile; |
193 screenColorProfile(profile); | 194 screenColorProfile(profile); |
194 if (!profile.isEmpty()) | 195 if (!profile.isEmpty()) |
195 m_outputDeviceProfile = qcms_profile_from_memory(profile.data(),
profile.size()); | 196 m_outputDeviceProfile = qcms_profile_from_memory(profile.data(),
profile.size()); |
196 #endif | 197 #endif |
197 if (m_outputDeviceProfile && qcms_profile_is_bogus(m_outputDevicePro
file)) { | 198 if (m_outputDeviceProfile && qcms_profile_is_bogus(m_outputDevicePro
file)) { |
198 qcms_profile_release(m_outputDeviceProfile); | 199 qcms_profile_release(m_outputDeviceProfile); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 299 |
299 IntSize m_size; | 300 IntSize m_size; |
300 bool m_sizeAvailable; | 301 bool m_sizeAvailable; |
301 bool m_isAllDataReceived; | 302 bool m_isAllDataReceived; |
302 bool m_failed; | 303 bool m_failed; |
303 }; | 304 }; |
304 | 305 |
305 } // namespace WebCore | 306 } // namespace WebCore |
306 | 307 |
307 #endif | 308 #endif |
OLD | NEW |