| 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 24 matching lines...) Expand all Loading... |
| 35 GIFImageDecoder::GIFImageDecoder(AlphaOption alphaOption, GammaAndColorProfileOp
tion colorOptions, size_t maxDecodedBytes) | 35 GIFImageDecoder::GIFImageDecoder(AlphaOption alphaOption, GammaAndColorProfileOp
tion colorOptions, size_t maxDecodedBytes) |
| 36 : ImageDecoder(alphaOption, colorOptions, maxDecodedBytes) | 36 : ImageDecoder(alphaOption, colorOptions, maxDecodedBytes) |
| 37 , m_repetitionCount(cAnimationLoopOnce) | 37 , m_repetitionCount(cAnimationLoopOnce) |
| 38 { | 38 { |
| 39 } | 39 } |
| 40 | 40 |
| 41 GIFImageDecoder::~GIFImageDecoder() | 41 GIFImageDecoder::~GIFImageDecoder() |
| 42 { | 42 { |
| 43 } | 43 } |
| 44 | 44 |
| 45 void GIFImageDecoder::onSetData(SharedBuffer* data) | 45 void GIFImageDecoder::onSetData(SegmentReader* data) |
| 46 { | 46 { |
| 47 if (m_reader) | 47 if (m_reader) |
| 48 m_reader->setData(data); | 48 m_reader->setData(data); |
| 49 } | 49 } |
| 50 | 50 |
| 51 int GIFImageDecoder::repetitionCount() const | 51 int GIFImageDecoder::repetitionCount() const |
| 52 { | 52 { |
| 53 // This value can arrive at any point in the image data stream. Most GIFs | 53 // This value can arrive at any point in the image data stream. Most GIFs |
| 54 // in the wild declare it near the beginning of the file, so it usually is | 54 // in the wild declare it near the beginning of the file, so it usually is |
| 55 // set by the time we've decoded the size, but (depending on the GIF and the | 55 // set by the time we've decoded the size, but (depending on the GIF and the |
| (...skipping 312 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 |