Chromium Code Reviews| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 m_frames.grow(numFrames); | 160 m_frames.grow(numFrames); |
| 161 | 161 |
| 162 int deltaBytes = totalFrameBytes(); | 162 int deltaBytes = totalFrameBytes(); |
| 163 | 163 |
| 164 | 164 |
| 165 // We are caching frame snapshots. This is OK even for partially decoded fr ames, | 165 // We are caching frame snapshots. This is OK even for partially decoded fr ames, |
| 166 // as they are cleared by dataChanged() when new data arrives. | 166 // as they are cleared by dataChanged() when new data arrives. |
| 167 m_frames[index].m_frame = m_source.createFrameAtIndex(index); | 167 m_frames[index].m_frame = m_source.createFrameAtIndex(index); |
| 168 | 168 |
| 169 m_frames[index].m_orientation = m_source.orientationAtIndex(index); | 169 m_frames[index].m_orientation = m_source.orientationAtIndex(index); |
| 170 Platform::current()->histogramEnumeration("Blink.DecodedImageOrientation", m _frames[index].m_orientation.orientation(), OriginLeftBottom + 1); | |
|
Noel Gordon
2015/11/10 01:14:56
The actual image orientation is not known until is
| |
| 170 m_frames[index].m_haveMetadata = true; | 171 m_frames[index].m_haveMetadata = true; |
| 171 m_frames[index].m_isComplete = m_source.frameIsCompleteAtIndex(index); | 172 m_frames[index].m_isComplete = m_source.frameIsCompleteAtIndex(index); |
| 172 if (repetitionCount(false) != cAnimationNone) | 173 if (repetitionCount(false) != cAnimationNone) |
| 173 m_frames[index].m_duration = m_source.frameDurationAtIndex(index); | 174 m_frames[index].m_duration = m_source.frameDurationAtIndex(index); |
| 174 m_frames[index].m_hasAlpha = m_source.frameHasAlphaAtIndex(index); | 175 m_frames[index].m_hasAlpha = m_source.frameHasAlphaAtIndex(index); |
| 175 m_frames[index].m_frameBytes = m_source.frameBytesAtIndex(index); | 176 m_frames[index].m_frameBytes = m_source.frameBytesAtIndex(index); |
| 176 | 177 |
| 177 const IntSize frameSize(index ? m_source.frameSizeAtIndex(index) : m_size); | 178 const IntSize frameSize(index ? m_source.frameSizeAtIndex(index) : m_size); |
| 178 if (frameSize != m_size) | 179 if (frameSize != m_size) |
| 179 m_hasUniformFrameSize = false; | 180 m_hasUniformFrameSize = false; |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 663 destroyDecodedDataIfNecessary(); | 664 destroyDecodedDataIfNecessary(); |
| 664 | 665 |
| 665 // We need to draw this frame if we advanced to it while not skipping, or if | 666 // We need to draw this frame if we advanced to it while not skipping, or if |
| 666 // while trying to skip frames we hit the last frame and thus had to stop. | 667 // while trying to skip frames we hit the last frame and thus had to stop. |
| 667 if (skippingFrames != advancedAnimation) | 668 if (skippingFrames != advancedAnimation) |
| 668 imageObserver()->animationAdvanced(this); | 669 imageObserver()->animationAdvanced(this); |
| 669 return advancedAnimation; | 670 return advancedAnimation; |
| 670 } | 671 } |
| 671 | 672 |
| 672 } // namespace blink | 673 } // namespace blink |
| OLD | NEW |