| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void clearFrameBuffer(size_t frameIndex) override; | 74 void clearFrameBuffer(size_t frameIndex) override; |
| 75 virtual void decodeSize() { parse(GIFSizeQuery); } | 75 virtual void decodeSize() { parse(GIFSizeQuery); } |
| 76 size_t decodeFrameCount() override; | 76 size_t decodeFrameCount() override; |
| 77 void initializeNewFrame(size_t) override; | 77 void initializeNewFrame(size_t) override; |
| 78 void decode(size_t) override; | 78 void decode(size_t) override; |
| 79 | 79 |
| 80 // Parses as much as is needed to answer the query, ignoring bitmap | 80 // Parses as much as is needed to answer the query, ignoring bitmap |
| 81 // data. If parsing fails, sets the "decode failure" flag. | 81 // data. If parsing fails, sets the "decode failure" flag. |
| 82 void parse(GIFParseQuery); | 82 void parse(GIFParseQuery); |
| 83 | 83 |
| 84 // Reset the alpha tracker for this frame. Before calling this method, the | |
| 85 // caller must verify that the frame exists. | |
| 86 void onInitFrameBuffer(size_t) override; | |
| 87 | |
| 88 // When the disposal method of the frame is DisposeOverWritePrevious, the | 84 // When the disposal method of the frame is DisposeOverWritePrevious, the |
| 89 // next frame will use the previous frame's buffer as its starting state, so | 85 // next frame will use the previous frame's buffer as its starting state, so |
| 90 // we can't take over the data in that case. Before calling this method, the | 86 // we can't take over the data in that case. Before calling this method, the |
| 91 // caller must verify that the frame exists. | 87 // caller must verify that the frame exists. |
| 92 bool canReusePreviousFrameBuffer(size_t) const override; | 88 bool canReusePreviousFrameBuffer(size_t) const override; |
| 93 | 89 |
| 94 bool m_currentBufferSawAlpha; | |
| 95 mutable int m_repetitionCount; | 90 mutable int m_repetitionCount; |
| 96 std::unique_ptr<GIFImageReader> m_reader; | 91 std::unique_ptr<GIFImageReader> m_reader; |
| 97 }; | 92 }; |
| 98 | 93 |
| 99 } // namespace blink | 94 } // namespace blink |
| 100 | 95 |
| 101 #endif | 96 #endif |
| OLD | NEW |