| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // ImageDecoder | 44 // ImageDecoder |
| 45 virtual String filenameExtension() const OVERRIDE { return "gif"; } | 45 virtual String filenameExtension() const OVERRIDE { return "gif"; } |
| 46 virtual void setData(SharedBuffer* data, bool allDataReceived) OVERRIDE; | 46 virtual void setData(SharedBuffer* data, bool allDataReceived) OVERRIDE; |
| 47 virtual bool isSizeAvailable() OVERRIDE; | 47 virtual bool isSizeAvailable() OVERRIDE; |
| 48 virtual size_t frameCount() OVERRIDE; | 48 virtual size_t frameCount() OVERRIDE; |
| 49 virtual int repetitionCount() const OVERRIDE; | 49 virtual int repetitionCount() const OVERRIDE; |
| 50 virtual ImageFrame* frameBufferAtIndex(size_t) OVERRIDE; | 50 virtual ImageFrame* frameBufferAtIndex(size_t) OVERRIDE; |
| 51 virtual bool frameIsCompleteAtIndex(size_t) const OVERRIDE; | 51 virtual bool frameIsCompleteAtIndex(size_t) const OVERRIDE; |
| 52 virtual float frameDurationAtIndex(size_t) const OVERRIDE; | 52 virtual float frameDurationAtIndex(size_t) const OVERRIDE; |
| 53 virtual size_t clearCacheExceptFrame(size_t) OVERRIDE; |
| 53 // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid | 54 // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid |
| 54 // accessing deleted memory, especially when calling this from inside | 55 // accessing deleted memory, especially when calling this from inside |
| 55 // GIFImageReader! | 56 // GIFImageReader! |
| 56 virtual bool setFailed() OVERRIDE; | 57 virtual bool setFailed() OVERRIDE; |
| 57 | 58 |
| 58 // Callbacks from the GIF reader. | 59 // Callbacks from the GIF reader. |
| 59 bool haveDecodedRow(size_t frameIndex, const Vector<unsigned char>& rowB
uffer, size_t width, size_t rowNumber, unsigned repeatCount, bool writeTranspare
ntPixels); | 60 bool haveDecodedRow(size_t frameIndex, const Vector<unsigned char>& rowB
uffer, size_t width, size_t rowNumber, unsigned repeatCount, bool writeTranspare
ntPixels); |
| 60 bool frameComplete(size_t frameIndex); | 61 bool frameComplete(size_t frameIndex); |
| 61 | 62 |
| 62 // For testing. | 63 // For testing. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 80 bool initFrameBuffer(size_t frameIndex); | 81 bool initFrameBuffer(size_t frameIndex); |
| 81 | 82 |
| 82 bool m_currentBufferSawAlpha; | 83 bool m_currentBufferSawAlpha; |
| 83 mutable int m_repetitionCount; | 84 mutable int m_repetitionCount; |
| 84 OwnPtr<GIFImageReader> m_reader; | 85 OwnPtr<GIFImageReader> m_reader; |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace WebCore | 88 } // namespace WebCore |
| 88 | 89 |
| 89 #endif | 90 #endif |
| OLD | NEW |