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

Side by Side Diff: Source/platform/image-decoders/png/PNGImageDecoder.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 * 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 * Portions are Copyright (C) 2001 mozilla.org 5 * Portions are Copyright (C) 2001 mozilla.org
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Stuart Parmenter <stuart@mozilla.com> 8 * Stuart Parmenter <stuart@mozilla.com>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #if USE(QCMSLIB) 46 #if USE(QCMSLIB)
47 #include "qcms.h" 47 #include "qcms.h"
48 #endif 48 #endif
49 49
50 #if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPN G_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4)) 50 #if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPN G_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4))
51 #define JMPBUF(png_ptr) png_jmpbuf(png_ptr) 51 #define JMPBUF(png_ptr) png_jmpbuf(png_ptr)
52 #else 52 #else
53 #define JMPBUF(png_ptr) png_ptr->jmpbuf 53 #define JMPBUF(png_ptr) png_ptr->jmpbuf
54 #endif 54 #endif
55 55
56 namespace WebCore { 56 namespace blink {
57 57
58 // Gamma constants. 58 // Gamma constants.
59 const double cMaxGamma = 21474.83; 59 const double cMaxGamma = 21474.83;
60 const double cDefaultGamma = 2.2; 60 const double cDefaultGamma = 2.2;
61 const double cInverseGamma = 0.45455; 61 const double cInverseGamma = 0.45455;
62 62
63 // Protect against large PNGs. See Mozilla's bug #251381 for more info. 63 // Protect against large PNGs. See Mozilla's bug #251381 for more info.
64 const unsigned long cMaxPNGSize = 1000000UL; 64 const unsigned long cMaxPNGSize = 1000000UL;
65 65
66 // Called if the decoding of the image fails. 66 // Called if the decoding of the image fails.
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 // If we couldn't decode the image but we've received all the data, decoding 537 // If we couldn't decode the image but we've received all the data, decoding
538 // has failed. 538 // has failed.
539 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) 539 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived())
540 setFailed(); 540 setFailed();
541 // If we're done decoding the image, we don't need the PNGImageReader 541 // If we're done decoding the image, we don't need the PNGImageReader
542 // anymore. (If we failed, |m_reader| has already been cleared.) 542 // anymore. (If we failed, |m_reader| has already been cleared.)
543 else if (isComplete()) 543 else if (isComplete())
544 m_reader.clear(); 544 m_reader.clear();
545 } 545 }
546 546
547 } // namespace WebCore 547 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/image-decoders/png/PNGImageDecoder.h ('k') | Source/platform/image-decoders/webp/WEBPImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698