Bug 1162751 - Part 2: Always disable pallete index checking. r=seth

The original assumption was that PR_LOGGING wouldn't be enabled in release
builds. Considering that this warning isn't actionable and PR_LOGGING is now
always defined it's better to just always disable pallete index checking.
This commit is contained in:
Eric Rahm 2015-05-11 13:42:30 -07:00
Родитель 330f80fa92
Коммит ceeb71f5f9
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -286,15 +286,13 @@ nsPNGDecoder::InitInternal()
#endif
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
#ifndef PR_LOGGING
// Disallow palette-index checking, for speed; we would ignore the warning
// anyhow unless we have defined PR_LOGGING. This feature was added at
// libpng version 1.5.10 and is disabled in the embedded libpng but enabled
// by default in the system libpng. This call also disables it in the
// system libpng, for decoding speed. Bug #745202.
// anyhow. This feature was added at libpng version 1.5.10 and is disabled
// in the embedded libpng but enabled by default in the system libpng. This
// call also disables it in the system libpng, for decoding speed.
// Bug #745202.
png_set_check_for_invalid_index(mPNG, 0);
#endif
#endif
#if defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_sRGB_PROFILE_CHECKS) && \
PNG_sRGB_PROFILE_CHECKS >= 0