| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 return; | 290 return; |
| 291 } | 291 } |
| 292 | 292 |
| 293 const size_t oldSize = m_frameBufferCache.size(); | 293 const size_t oldSize = m_frameBufferCache.size(); |
| 294 m_frameBufferCache.resize(m_reader->imagesCount()); | 294 m_frameBufferCache.resize(m_reader->imagesCount()); |
| 295 | 295 |
| 296 for (size_t i = oldSize; i < m_reader->imagesCount(); ++i) { | 296 for (size_t i = oldSize; i < m_reader->imagesCount(); ++i) { |
| 297 ImageFrame& buffer = m_frameBufferCache[i]; | 297 ImageFrame& buffer = m_frameBufferCache[i]; |
| 298 const GIFFrameContext* frameContext = m_reader->frameContext(i); | 298 const GIFFrameContext* frameContext = m_reader->frameContext(i); |
| 299 buffer.setPremultiplyAlpha(m_premultiplyAlpha); | 299 buffer.setPremultiplyAlpha(m_premultiplyAlpha); |
| 300 buffer.setRequiredPreviousFrameIndex(findRequiredPreviousFrame(i)); | 300 buffer.setRequiredPreviousFrameIndex(findRequiredPreviousFrame(i, false)
); |
| 301 buffer.setDuration(frameContext->delayTime()); | 301 buffer.setDuration(frameContext->delayTime()); |
| 302 buffer.setDisposalMethod(frameContext->disposalMethod()); | 302 buffer.setDisposalMethod(frameContext->disposalMethod()); |
| 303 | 303 |
| 304 // Initialize the frame rect in our buffer. | 304 // Initialize the frame rect in our buffer. |
| 305 IntRect frameRect = frameContext->frameRect(); | 305 IntRect frameRect = frameContext->frameRect(); |
| 306 | 306 |
| 307 // Make sure the frameRect doesn't extend outside the buffer. | 307 // Make sure the frameRect doesn't extend outside the buffer. |
| 308 if (frameRect.maxX() > size().width()) | 308 if (frameRect.maxX() > size().width()) |
| 309 frameRect.setWidth(size().width() - frameRect.x()); | 309 frameRect.setWidth(size().width() - frameRect.x()); |
| 310 if (frameRect.maxY() > size().height()) | 310 if (frameRect.maxY() > size().height()) |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 376 |
| 377 // Update our status to be partially complete. | 377 // Update our status to be partially complete. |
| 378 buffer->setStatus(ImageFrame::FramePartial); | 378 buffer->setStatus(ImageFrame::FramePartial); |
| 379 | 379 |
| 380 // Reset the alpha pixel tracker for this frame. | 380 // Reset the alpha pixel tracker for this frame. |
| 381 m_currentBufferSawAlpha = false; | 381 m_currentBufferSawAlpha = false; |
| 382 return true; | 382 return true; |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace WebCore | 385 } // namespace WebCore |
| OLD | NEW |