Title: [213774] trunk/Source/WebCore
Revision
213774
Author
[email protected]
Date
2017-03-12 16:52:30 -0700 (Sun, 12 Mar 2017)

Log Message

REGRESSION (r213764): Async image decoding is disabled for animated images
https://bugs.webkit.org/show_bug.cgi?id=169529

Patch by Said Abou-Hallawa <[email protected]> on 2017-03-12
Reviewed by Jon Lee.

The change r213764 causes the animated images to be decoded synchronously
because we were calling frameImageAtIndex() with an empty sizeForDrawing
but with a valid subsamplingLevel. This call is translated to be synchronous
image decoding. The fix is get the current image frame without any decoding.
This is because are sure that in the case of animated image, the current
image frame can not be deleted.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (213773 => 213774)


--- trunk/Source/WebCore/ChangeLog	2017-03-12 22:56:55 UTC (rev 213773)
+++ trunk/Source/WebCore/ChangeLog	2017-03-12 23:52:30 UTC (rev 213774)
@@ -1,3 +1,20 @@
+2017-03-12  Said Abou-Hallawa  <[email protected]>
+
+        REGRESSION (r213764): Async image decoding is disabled for animated images
+        https://bugs.webkit.org/show_bug.cgi?id=169529
+
+        Reviewed by Jon Lee.
+        
+        The change r213764 causes the animated images to be decoded synchronously
+        because we were calling frameImageAtIndex() with an empty sizeForDrawing
+        but with a valid subsamplingLevel. This call is translated to be synchronous
+        image decoding. The fix is get the current image frame without any decoding.
+        This is because are sure that in the case of animated image, the current
+        image frame can not be deleted.
+
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::draw):
+
 2017-03-12  Romain Bellessort  <[email protected]>
 
         [Readable Streams API] Implement ReadableStreamBYOBRequest respond() (closed stream state)

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (213773 => 213774)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-03-12 22:56:55 UTC (rev 213773)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-03-12 23:52:30 UTC (rev 213774)
@@ -196,7 +196,10 @@
         }
     } else {
         ASSERT(!frameIsBeingDecodedAtIndex(m_currentFrame, m_sizeForDrawing));
-        image = frameImageAtIndex(m_currentFrame, m_currentSubsamplingLevel, { }, &context);
+        if (shouldUseAsyncDecodingForAnimatedImage())
+            image = frameImageAtIndex(m_currentFrame);
+        else
+            image = frameImageAtIndex(m_currentFrame, m_currentSubsamplingLevel, { }, &context);
     }
 
     if (!image) // If it's too early we won't have an image yet.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to