- Timestamp:
- 08/15/08 13:25:16 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/BAL/WKAL/Concretizations/Graphics/WK/BCBitmapImageWK.cpp
r298 r437 55 55 , m_haveSize(false) 56 56 , m_sizeAvailable(false) 57 , m_hasUniformFrameSize(true) 57 58 , m_decodedSize(0) 58 59 , m_haveFrameCount(false) … … 126 127 m_frames[index].m_duration = m_source.frameDurationAtIndex(index); 127 128 m_frames[index].m_hasAlpha = m_source.frameHasAlphaAtIndex(index); 128 129 int sizeChange = m_frames[index].m_frame ? m_size.width() * m_size.height() * 4 : 0; 129 130 int sizeChange; 131 if (index) { 132 IntSize frameSize = m_source.frameSizeAtIndex(index); 133 if (frameSize != m_size) 134 m_hasUniformFrameSize = false; 135 sizeChange = m_frames[index].m_frame ? frameSize.width() * frameSize.height() * 4 : 0; 136 } else 137 sizeChange = m_frames[index].m_frame ? m_size.width() * m_size.height() * 4 : 0; 138 130 139 if (sizeChange) { 131 140 m_decodedSize += sizeChange; … … 144 153 } 145 154 155 IntSize BitmapImage::currentFrameSize() const 156 { 157 if (!m_currentFrame || m_hasUniformFrameSize) 158 return size(); 159 return m_source.frameSizeAtIndex(m_currentFrame); 160 } 161 146 162 bool BitmapImage::dataChanged(bool allDataReceived) 147 163 { … … 154 170 // Clear the frame count. 155 171 m_haveFrameCount = false; 172 173 m_hasUniformFrameSize = true; 156 174 157 175 // Image properties will not be available until the first frame of the file
