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 frame_index) override; | 74 void ClearFrameBuffer(size_t frame_index) override; |
75 virtual void DecodeSize() { Parse(kGIFSizeQuery); } | 75 virtual void DecodeSize() { Parse(kGIFSizeQuery); } |
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 current_buffer_saw_alpha_; | |
95 mutable int repetition_count_; | 90 mutable int repetition_count_; |
96 std::unique_ptr<GIFImageReader> reader_; | 91 std::unique_ptr<GIFImageReader> reader_; |
97 }; | 92 }; |
98 | 93 |
99 } // namespace blink | 94 } // namespace blink |
100 | 95 |
101 #endif | 96 #endif |
OLD | NEW |