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

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

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 namespace { 91 namespace {
92 92
93 const int exifMarker = JPEG_APP0 + 1; 93 const int exifMarker = JPEG_APP0 + 1;
94 94
95 // JPEG only supports a denominator of 8. 95 // JPEG only supports a denominator of 8.
96 const unsigned scaleDenominator = 8; 96 const unsigned scaleDenominator = 8;
97 97
98 } // namespace 98 } // namespace
99 99
100 namespace WebCore { 100 namespace blink {
101 101
102 struct decoder_error_mgr { 102 struct decoder_error_mgr {
103 struct jpeg_error_mgr pub; // "public" fields for IJG library 103 struct jpeg_error_mgr pub; // "public" fields for IJG library
104 jmp_buf setjmp_buffer; // For handling catastropic errors 104 jmp_buf setjmp_buffer; // For handling catastropic errors
105 }; 105 };
106 106
107 enum jstate { 107 enum jstate {
108 JPEG_HEADER, // Reading JFIF headers 108 JPEG_HEADER, // Reading JFIF headers
109 JPEG_START_DECOMPRESS, 109 JPEG_START_DECOMPRESS,
110 JPEG_DECOMPRESS_PROGRESSIVE, // Output progressive pixels 110 JPEG_DECOMPRESS_PROGRESSIVE, // Output progressive pixels
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 // has failed. 798 // has failed.
799 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) 799 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived())
800 setFailed(); 800 setFailed();
801 // If we're done decoding the image, we don't need the JPEGImageReader 801 // If we're done decoding the image, we don't need the JPEGImageReader
802 // anymore. (If we failed, |m_reader| has already been cleared.) 802 // anymore. (If we failed, |m_reader| has already been cleared.)
803 else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() == ImageFrame::FrameComplete)) 803 else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache[0].status() == ImageFrame::FrameComplete))
804 m_reader.clear(); 804 m_reader.clear();
805 } 805 }
806 806
807 } 807 }
OLDNEW
« no previous file with comments | « Source/platform/image-decoders/jpeg/JPEGImageDecoder.h ('k') | Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698