Changeset 156681 in webkit
- Timestamp:
- Sep 30, 2013 2:54:17 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156676 r156681 1 2013-09-30 Yongjun Zhang <yongjun_zhang@apple.com> 2 3 Don't attempt to destroy decoded frame if a BitmapImage doesn't have encoded raw data. 4 https://bugs.webkit.org/show_bug.cgi?id=122115 5 6 Reviewed by Daniel Bates. 7 8 With BitmapImage::create(PassNativeImagePtr, ImageObserver*), a BitmapImage could be created by 9 passing a native image. If this image is added to memory cache, we shouldn't attempt to destroy 10 its decoded frames since there is no encoded raw data and we won't be able to reconstruct the image again. 11 12 No new tests for now. Currently there isn't a code path to add to the memory cache a BitmapImage 13 that was created by adopting a native image. We'll add such a code path in a subsequent patch. 14 15 * platform/graphics/BitmapImage.cpp: 16 (WebCore::BitmapImage::destroyDecodedDataIfNecessary): 17 1 18 2013-09-30 Brady Eidson <beidson@apple.com> 2 19 -
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
r156465 r156681 99 99 // to one frame at a time. 100 100 static const unsigned cLargeAnimationCutoff = 5242880; 101 102 // If we have decoded frames but there is no encoded data, we shouldn't destroy 103 // the decoded image since we won't be able to reconstruct it later. 104 if (!data() && m_frames.size()) 105 return; 106 101 107 unsigned allFrameBytes = 0; 102 108 for (size_t i = 0; i < m_frames.size(); ++i)
Note: See TracChangeset
for help on using the changeset viewer.