Title: [173148] trunk/Source/WebCore
Revision
173148
Author
[email protected]
Date
2014-08-31 15:02:47 -0700 (Sun, 31 Aug 2014)

Log Message

Fix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary
https://bugs.webkit.org/show_bug.cgi?id=136412

Reviewed by Alexey Proskuryakov.

No new tests, just cleanup.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
Drop the leading 'c' and the 'static' on the cutoff parameter.
Remove the duplicated early return (seems like it happened in the merge).
Remove reference to the exact size in the comment, since it's different on iOS.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173147 => 173148)


--- trunk/Source/WebCore/ChangeLog	2014-08-31 22:01:34 UTC (rev 173147)
+++ trunk/Source/WebCore/ChangeLog	2014-08-31 22:02:47 UTC (rev 173148)
@@ -1,5 +1,20 @@
 2014-08-31  Tim Horton  <[email protected]>
 
+        Fix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary
+        https://bugs.webkit.org/show_bug.cgi?id=136412
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests, just cleanup.
+
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
+        Drop the leading 'c' and the 'static' on the cutoff parameter.
+        Remove the duplicated early return (seems like it happened in the merge).
+        Remove reference to the exact size in the comment, since it's different on iOS.
+
+2014-08-31  Tim Horton  <[email protected]>
+
         Use SinkDocument instead of PDFDocument; get rid of PDFDocument
         https://bugs.webkit.org/show_bug.cgi?id=136414
 

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (173147 => 173148)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2014-08-31 22:01:34 UTC (rev 173147)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2014-08-31 22:02:47 UTC (rev 173148)
@@ -124,17 +124,12 @@
 
 void BitmapImage::destroyDecodedDataIfNecessary(bool destroyAll)
 {
-    // Animated images >5MB are considered large enough that we'll only hang on
+    // Animated images over a certain size are considered large enough that we'll only hang on
     // to one frame at a time.
 #if PLATFORM(IOS)
-    static const unsigned cLargeAnimationCutoff = 2097152;
-
-     // If we have decoded frames but there is no encoded data, we shouldn't destroy
-     // the decoded image since we won't be able to reconstruct it later.
-     if (!data() && m_frames.size())
-         return;
+    const unsigned largeAnimationCutoff = 2097152;
 #else
-    static const unsigned cLargeAnimationCutoff = 5242880;
+    const unsigned largeAnimationCutoff = 5242880;
 #endif
 
     // If we have decoded frames but there is no encoded data, we shouldn't destroy
@@ -146,7 +141,7 @@
     for (size_t i = 0; i < m_frames.size(); ++i)
         allFrameBytes += m_frames[i].m_frameBytes;
 
-    if (allFrameBytes > cLargeAnimationCutoff)
+    if (allFrameBytes > largeAnimationCutoff)
         destroyDecodedData(destroyAll);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to