OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
4 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 4 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 // Returns the total number of bytes allocated for all framebuffers, i.e. | 121 // Returns the total number of bytes allocated for all framebuffers, i.e. |
122 // the sum of m_source.frameBytesAtIndex(...) for all frames. | 122 // the sum of m_source.frameBytesAtIndex(...) for all frames. |
123 size_t totalFrameBytes(); | 123 size_t totalFrameBytes(); |
124 | 124 |
125 // Called to wipe out the entire frame buffer cache and tell the image | 125 // Called to wipe out the entire frame buffer cache and tell the image |
126 // source to destroy everything; this is used when e.g. we want to free | 126 // source to destroy everything; this is used when e.g. we want to free |
127 // some room in the image cache. | 127 // some room in the image cache. |
128 void destroyDecodedData() override; | 128 void destroyDecodedData() override; |
129 | 129 |
| 130 bool clear() override; |
130 PassRefPtr<SharedBuffer> data() override; | 131 PassRefPtr<SharedBuffer> data() override; |
131 | 132 |
132 // Notifies observers that the memory footprint has changed. | 133 // Notifies observers that the memory footprint has changed. |
133 void notifyMemoryChanged(); | 134 void notifyMemoryChanged(); |
134 | 135 |
135 // Whether or not size is available yet. | 136 // Whether or not size is available yet. |
136 bool isSizeAvailable(); | 137 bool isSizeAvailable(); |
137 | 138 |
138 // Animation. | 139 // Animation. |
139 // We start and stop animating lazily. Animation starts when the image is | 140 // We start and stop animating lazily. Animation starts when the image is |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable
has the final overall image size yet. | 191 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable
has the final overall image size yet. |
191 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. | 192 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. |
192 mutable bool m_haveFrameCount : 1; | 193 mutable bool m_haveFrameCount : 1; |
193 }; | 194 }; |
194 | 195 |
195 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 196 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
196 | 197 |
197 } // namespace blink | 198 } // namespace blink |
198 | 199 |
199 #endif | 200 #endif |
OLD | NEW |