| OLD | NEW |
| 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 length = png_get_uint_32(chunk); | 527 length = png_get_uint_32(chunk); |
| 528 | 528 |
| 529 if (isChunk(chunk, "IDAT")) { | 529 if (isChunk(chunk, "IDAT")) { |
| 530 // Done with header chunks. | 530 // Done with header chunks. |
| 531 m_idatOffset = m_readOffset; | 531 m_idatOffset = m_readOffset; |
| 532 m_fctlNeedsDatChunk = false; | 532 m_fctlNeedsDatChunk = false; |
| 533 if (m_ignoreAnimation) | 533 if (m_ignoreAnimation) |
| 534 m_isAnimated = false; | 534 m_isAnimated = false; |
| 535 if (!m_isAnimated || 1 == m_reportedFrameCount) | 535 if (!m_isAnimated || 1 == m_reportedFrameCount) |
| 536 m_decoder->setRepetitionCount(cAnimationNone); | 536 m_decoder->setRepetitionCount(cAnimationNone); |
| 537 if (!m_decoder->setSize(m_width, m_height)) |
| 538 return false; |
| 539 m_decoder->setColorSpace(); |
| 537 m_decoder->headerAvailable(); | 540 m_decoder->headerAvailable(); |
| 538 return true; | 541 return true; |
| 539 } | 542 } |
| 540 | 543 |
| 541 // Wait until the entire chunk is available for parsing simplicity. | 544 // Wait until the entire chunk is available for parsing simplicity. |
| 542 if (reader.size() < m_readOffset + length + 12) | 545 if (reader.size() < m_readOffset + length + 12) |
| 543 break; | 546 break; |
| 544 | 547 |
| 545 if (isChunk(chunk, "acTL")) { | 548 if (isChunk(chunk, "acTL")) { |
| 546 if (m_ignoreAnimation) | 549 if (m_ignoreAnimation) |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 break; | 676 break; |
| 674 default: | 677 default: |
| 675 return false; | 678 return false; |
| 676 } | 679 } |
| 677 | 680 |
| 678 m_fctlNeedsDatChunk = true; | 681 m_fctlNeedsDatChunk = true; |
| 679 return true; | 682 return true; |
| 680 } | 683 } |
| 681 | 684 |
| 682 } // namespace blink | 685 } // namespace blink |
| OLD | NEW |