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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual size_t clearCacheExceptFrame(size_t) OVERRIDE; |
54 // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid | 54 // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid |
55 // accessing deleted memory, especially when calling this from inside | 55 // accessing deleted memory, especially when calling this from inside |
56 // GIFImageReader! | 56 // GIFImageReader! |
57 virtual bool setFailed() OVERRIDE; | 57 virtual bool setFailed() OVERRIDE; |
58 | 58 |
59 // Callbacks from the GIF reader. | 59 // Callbacks from the GIF reader. |
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 haveDecodedRow(size_t frameIndex, Vector<unsigned char>::const_iter
ator rowBegin, size_t width, size_t rowNumber, unsigned repeatCount, bool writeT
ransparentPixels); |
61 bool frameComplete(size_t frameIndex); | 61 bool frameComplete(size_t frameIndex); |
62 | 62 |
63 // For testing. | 63 // For testing. |
64 bool parseCompleted() const; | 64 bool parseCompleted() const; |
65 | 65 |
66 private: | 66 private: |
67 virtual void clearFrameBuffer(size_t frameIndex) OVERRIDE; | 67 virtual void clearFrameBuffer(size_t frameIndex) OVERRIDE; |
68 | 68 |
69 // Parses as much as is needed to answer the query, ignoring bitmap | 69 // Parses as much as is needed to answer the query, ignoring bitmap |
70 // data. If parsing fails, sets the "decode failure" flag. | 70 // data. If parsing fails, sets the "decode failure" flag. |
(...skipping 10 matching lines...) Expand all Loading... |
81 bool initFrameBuffer(size_t frameIndex); | 81 bool initFrameBuffer(size_t frameIndex); |
82 | 82 |
83 bool m_currentBufferSawAlpha; | 83 bool m_currentBufferSawAlpha; |
84 mutable int m_repetitionCount; | 84 mutable int m_repetitionCount; |
85 OwnPtr<GIFImageReader> m_reader; | 85 OwnPtr<GIFImageReader> m_reader; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace WebCore | 88 } // namespace WebCore |
89 | 89 |
90 #endif | 90 #endif |
OLD | NEW |