Changeset 71162 in webkit
- Timestamp:
- Nov 2, 2010 1:48:40 PM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r71161 r71162 1 2010-11-02 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r71152. 4 http://trac.webkit.org/changeset/71152 5 https://bugs.webkit.org/show_bug.cgi?id=48866 6 7 Causes lots and lots of crashes (Requested by jamesr_ on 8 #webkit). 9 10 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: 11 (WebCore::JPEGImageReader::JPEGImageReader): 12 (WebCore::JPEGImageReader::decode): 13 (WebCore::JPEGImageDecoder::outputScanlines): 14 * platform/image-decoders/jpeg/JPEGImageDecoder.h: 15 1 16 2010-11-02 Alexey Proskuryakov <ap@apple.com> 2 17 -
trunk/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
r71152 r71162 52 52 53 53 extern "C" { 54 55 54 #include "jpeglib.h" 56 57 #if USE(ICCJPEG)58 #include "iccjpeg.h"59 #endif60 61 55 } 62 56 … … 92 86 JPEGImageReader* decoder; 93 87 }; 94 95 static ColorProfile readColorProfile(jpeg_decompress_struct* info)96 {97 #if USE(ICCJPEG)98 JOCTET* profile;99 unsigned int profileLength;100 101 if (!read_icc_profile(info, &profile, &profileLength))102 return ColorProfile();103 104 ColorProfile colorProfile;105 colorProfile.append(reinterpret_cast<char*>(profile), profileLength);106 free(profile);107 return colorProfile;108 #else109 return ColorProfile();110 #endif111 }112 88 113 89 class JPEGImageReader … … 148 124 src->pub.term_source = term_source; 149 125 src->decoder = this; 150 151 // Enable these markers for the ICC color profile.152 for (unsigned i = JPEG_APP0; i < JPEG_COM; ++i)153 jpeg_save_markers(&m_info, i, 0xFFFF);154 126 } 155 127 … … 241 213 return false; 242 214 243 m_decoder->setColorProfile(readColorProfile(info()));244 245 215 if (m_decodingSizeOnly) { 246 216 // We can stop here. Reduce our buffer length and available … … 452 422 buffer.setStatus(RGBA32Buffer::FramePartial); 453 423 buffer.setHasAlpha(false); 454 buffer.setColorProfile(m_colorProfile);455 424 456 425 // For JPEGs, the frame always fills the entire image. -
trunk/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h
r71152 r71162 55 55 void jpegComplete(); 56 56 57 void setColorProfile(const ColorProfile& colorProfile) { m_colorProfile = colorProfile; }58 59 57 private: 60 58 // Decodes the image. If |onlySize| is true, stops decoding after
Note: See TracChangeset
for help on using the changeset viewer.