| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 float GIFImageDecoder::frameDurationAtIndex(size_t index) const | 91 float GIFImageDecoder::frameDurationAtIndex(size_t index) const |
| 92 { | 92 { |
| 93 return (m_reader && (index < m_reader->imagesCount()) && | 93 return (m_reader && (index < m_reader->imagesCount()) && |
| 94 m_reader->frameContext(index)->isHeaderDefined()) ? | 94 m_reader->frameContext(index)->isHeaderDefined()) ? |
| 95 m_reader->frameContext(index)->delayTime() : 0; | 95 m_reader->frameContext(index)->delayTime() : 0; |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool GIFImageDecoder::setFailed() | 98 bool GIFImageDecoder::setFailed() |
| 99 { | 99 { |
| 100 m_reader.clear(); | 100 m_reader.reset(); |
| 101 return ImageDecoder::setFailed(); | 101 return ImageDecoder::setFailed(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool GIFImageDecoder::haveDecodedRow(size_t frameIndex, GIFRow::const_iterator r
owBegin, size_t width, size_t rowNumber, unsigned repeatCount, bool writeTranspa
rentPixels) | 104 bool GIFImageDecoder::haveDecodedRow(size_t frameIndex, GIFRow::const_iterator r
owBegin, size_t width, size_t rowNumber, unsigned repeatCount, bool writeTranspa
rentPixels) |
| 105 { | 105 { |
| 106 const GIFFrameContext* frameContext = m_reader->frameContext(frameIndex); | 106 const GIFFrameContext* frameContext = m_reader->frameContext(frameIndex); |
| 107 // The pixel data and coordinates supplied to us are relative to the frame's | 107 // The pixel data and coordinates supplied to us are relative to the frame's |
| 108 // origin within the entire image size, i.e. | 108 // origin within the entire image size, i.e. |
| 109 // (frameContext->xOffset, frameContext->yOffset). There is no guarantee | 109 // (frameContext->xOffset, frameContext->yOffset). There is no guarantee |
| 110 // that width == (size().width() - frameContext->xOffset), so | 110 // that width == (size().width() - frameContext->xOffset), so |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 // Update our status to be partially complete. | 369 // Update our status to be partially complete. |
| 370 buffer->setStatus(ImageFrame::FramePartial); | 370 buffer->setStatus(ImageFrame::FramePartial); |
| 371 | 371 |
| 372 // Reset the alpha pixel tracker for this frame. | 372 // Reset the alpha pixel tracker for this frame. |
| 373 m_currentBufferSawAlpha = false; | 373 m_currentBufferSawAlpha = false; |
| 374 return true; | 374 return true; |
| 375 } | 375 } |
| 376 | 376 |
| 377 } // namespace blink | 377 } // namespace blink |
| OLD | NEW |