зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1215361 (part 1) - Don't set mBPP twice in nsICODecoder.cpp. r=seth.
Seth's "XXX" comment is correct. --HG-- extra : rebase_source : 0a3c20d7c8a67e8eb0ec21cdd197a901a463c707
This commit is contained in:
Родитель
3e614fd566
Коммит
5203886b92
|
@ -390,7 +390,7 @@ nsICODecoder::ReadBIH(const char* aData)
|
|||
// Buffer the rest of the bitmap information header.
|
||||
memcpy(mBIHraw + PNGSIGNATURESIZE, aData, BITMAPINFOSIZE - PNGSIGNATURESIZE);
|
||||
|
||||
// Extracting the BPP from the BIH header; it should be trusted over the one
|
||||
// Extract the BPP from the BIH header; it should be trusted over the one
|
||||
// we have from the ICO header.
|
||||
mBPP = ReadBPP(mBIHraw);
|
||||
|
||||
|
@ -437,12 +437,6 @@ nsICODecoder::ReadBIH(const char* aData)
|
|||
return Transition::Terminate(ICOState::FAILURE);
|
||||
}
|
||||
|
||||
// Sometimes the ICO BPP header field is not filled out so we should trust the
|
||||
// contained resource over our own information.
|
||||
// XXX(seth): Is this ever different than the value we obtained from
|
||||
// ReadBPP() above?
|
||||
mBPP = bmpDecoder->GetBitsPerPixel();
|
||||
|
||||
// Check to make sure we have valid color settings.
|
||||
uint16_t numColors = GetNumColors();
|
||||
if (numColors == uint16_t(-1)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче