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

Side by Side Diff: Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

Issue 207783002: Omit "int" when using "unsigned" modifier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * 3 *
4 * Portions are Copyright (C) 2001-6 mozilla.org 4 * Portions are Copyright (C) 2001-6 mozilla.org
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Stuart Parmenter <stuart@mozilla.com> 7 * Stuart Parmenter <stuart@mozilla.com>
8 * 8 *
9 * Copyright (C) 2007-2009 Torch Mobile, Inc. 9 * Copyright (C) 2007-2009 Torch Mobile, Inc.
10 * 10 *
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 return ImageOrientation(); 214 return ImageOrientation();
215 } 215 }
216 216
217 #if USE(QCMSLIB) 217 #if USE(QCMSLIB)
218 static void readColorProfile(jpeg_decompress_struct* info, ColorProfile& colorPr ofile) 218 static void readColorProfile(jpeg_decompress_struct* info, ColorProfile& colorPr ofile)
219 { 219 {
220 #if USE(ICCJPEG) 220 #if USE(ICCJPEG)
221 JOCTET* profile; 221 JOCTET* profile;
222 unsigned int profileLength; 222 unsigned profileLength;
223 223
224 if (!read_icc_profile(info, &profile, &profileLength)) 224 if (!read_icc_profile(info, &profile, &profileLength))
225 return; 225 return;
226 226
227 // Only accept RGB color profiles from input class devices. 227 // Only accept RGB color profiles from input class devices.
228 bool ignoreProfile = false; 228 bool ignoreProfile = false;
229 char* profileData = reinterpret_cast<char*>(profile); 229 char* profileData = reinterpret_cast<char*>(profile);
230 if (profileLength < ImageDecoder::iccColorProfileHeaderLength) 230 if (profileLength < ImageDecoder::iccColorProfileHeaderLength)
231 ignoreProfile = true; 231 ignoreProfile = true;
232 else if (!ImageDecoder::rgbColorProfile(profileData, profileLength)) 232 else if (!ImageDecoder::rgbColorProfile(profileData, profileLength))
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 // has failed. 796 // has failed.
797 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) 797 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived())
798 setFailed(); 798 setFailed();
799 // If we're done decoding the image, we don't need the JPEGImageReader 799 // If we're done decoding the image, we don't need the JPEGImageReader
800 // anymore. (If we failed, |m_reader| has already been cleared.) 800 // anymore. (If we failed, |m_reader| has already been cleared.)
801 else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() == ImageFrame::FrameComplete)) 801 else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() == ImageFrame::FrameComplete))
802 m_reader.clear(); 802 m_reader.clear();
803 } 803 }
804 804
805 } 805 }
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/WebGLImageConversion.cpp ('k') | Source/platform/image-encoders/skia/JPEGImageEncoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698