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

Side by Side Diff: Source/platform/image-decoders/ImageDecoder.h

Issue 389283004: Leaking CFData in ImageDecoder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698