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, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // decode any uncached (i.e. never-decoded or | 228 // decode any uncached (i.e. never-decoded or |
229 // cleared-on-a-previous-pass) frames! | 229 // cleared-on-a-previous-pass) frames! |
230 unsigned frameBytes = m_frames[i].m_frameBytes; | 230 unsigned frameBytes = m_frames[i].m_frameBytes; |
231 if (m_frames[i].m_haveMetadata && !m_frames[i].m_isComplete) | 231 if (m_frames[i].m_haveMetadata && !m_frames[i].m_isComplete) |
232 frameBytesCleared += (m_frames[i].clear(true) ? frameBytes : 0); | 232 frameBytesCleared += (m_frames[i].clear(true) ? frameBytes : 0); |
233 } | 233 } |
234 destroyMetadataAndNotify(frameBytesCleared); | 234 destroyMetadataAndNotify(frameBytesCleared); |
235 | 235 |
236 // Feed all the data we've seen so far to the image decoder. | 236 // Feed all the data we've seen so far to the image decoder. |
237 m_allDataReceived = allDataReceived; | 237 m_allDataReceived = allDataReceived; |
238 m_source.setData(data(), allDataReceived); | 238 ASSERT(data()); |
| 239 m_source.setData(*data(), allDataReceived); |
239 | 240 |
240 m_haveFrameCount = false; | 241 m_haveFrameCount = false; |
241 m_hasUniformFrameSize = true; | 242 m_hasUniformFrameSize = true; |
242 return isSizeAvailable(); | 243 return isSizeAvailable(); |
243 } | 244 } |
244 | 245 |
245 String BitmapImage::filenameExtension() const | 246 String BitmapImage::filenameExtension() const |
246 { | 247 { |
247 return m_source.filenameExtension(); | 248 return m_source.filenameExtension(); |
248 } | 249 } |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 } | 613 } |
613 return m_isSolidColor && !m_currentFrame; | 614 return m_isSolidColor && !m_currentFrame; |
614 } | 615 } |
615 | 616 |
616 Color BitmapImage::solidColor() const | 617 Color BitmapImage::solidColor() const |
617 { | 618 { |
618 return m_solidColor; | 619 return m_solidColor; |
619 } | 620 } |
620 | 621 |
621 } | 622 } |
OLD | NEW |