| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // Returns the total number of bytes allocated for all framebuffers, i.e. | 133 // Returns the total number of bytes allocated for all framebuffers, i.e. |
| 134 // the sum of m_source.frameBytesAtIndex(...) for all frames. | 134 // the sum of m_source.frameBytesAtIndex(...) for all frames. |
| 135 size_t TotalFrameBytes(); | 135 size_t TotalFrameBytes(); |
| 136 | 136 |
| 137 // Called to wipe out the entire frame buffer cache and tell the image | 137 // Called to wipe out the entire frame buffer cache and tell the image |
| 138 // source to destroy everything; this is used when e.g. we want to free | 138 // source to destroy everything; this is used when e.g. we want to free |
| 139 // some room in the image cache. | 139 // some room in the image cache. |
| 140 void DestroyDecodedData() override; | 140 void DestroyDecodedData() override; |
| 141 | 141 |
| 142 PassRefPtr<SharedBuffer> Data() override; | |
| 143 | |
| 144 // Notifies observers that the memory footprint has changed. | 142 // Notifies observers that the memory footprint has changed. |
| 145 void NotifyMemoryChanged(); | 143 void NotifyMemoryChanged(); |
| 146 | 144 |
| 147 // Whether or not size is available yet. | 145 // Whether or not size is available yet. |
| 148 bool IsSizeAvailable(); | 146 bool IsSizeAvailable(); |
| 149 | 147 |
| 150 // Animation. | 148 // Animation. |
| 151 // We start and stop animating lazily. Animation starts when the image is | 149 // We start and stop animating lazily. Animation starts when the image is |
| 152 // rendered, and automatically stops once no observer wants to render the | 150 // rendered, and automatically stops once no observer wants to render the |
| 153 // image. | 151 // image. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 size_t frame_count_; | 217 size_t frame_count_; |
| 220 | 218 |
| 221 RefPtr<WebTaskRunner> task_runner_; | 219 RefPtr<WebTaskRunner> task_runner_; |
| 222 }; | 220 }; |
| 223 | 221 |
| 224 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 222 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
| 225 | 223 |
| 226 } // namespace blink | 224 } // namespace blink |
| 227 | 225 |
| 228 #endif | 226 #endif |
| OLD | NEW |