Title: [232177] trunk/Source/WebCore
Revision
232177
Author
[email protected]
Date
2018-05-24 18:12:31 -0700 (Thu, 24 May 2018)

Log Message

Enable subsampling for progressive JPEG images
https://bugs.webkit.org/show_bug.cgi?id=185956

Reviewed by Said Abou-Hallawa.

Enable subsampling for progressive JPEG images now that it is supposed (rdar://problem/5191418).
I verified locally that such images are still loading and do not cause any hang on iOS.

* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoderCG::frameAllowSubsamplingAtIndex const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (232176 => 232177)


--- trunk/Source/WebCore/ChangeLog	2018-05-25 00:52:13 UTC (rev 232176)
+++ trunk/Source/WebCore/ChangeLog	2018-05-25 01:12:31 UTC (rev 232177)
@@ -1,5 +1,18 @@
 2018-05-24  Chris Dumez  <[email protected]>
 
+        Enable subsampling for progressive JPEG images
+        https://bugs.webkit.org/show_bug.cgi?id=185956
+
+        Reviewed by Said Abou-Hallawa.
+
+        Enable subsampling for progressive JPEG images now that it is supposed (rdar://problem/5191418).
+        I verified locally that such images are still loading and do not cause any hang on iOS.
+
+        * platform/graphics/cg/ImageDecoderCG.cpp:
+        (WebCore::ImageDecoderCG::frameAllowSubsamplingAtIndex const):
+
+2018-05-24  Chris Dumez  <[email protected]>
+
         Reduce copying of FontCascadeDescription objects by moving them around
         https://bugs.webkit.org/show_bug.cgi?id=185963
 

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp (232176 => 232177)


--- trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2018-05-25 00:52:13 UTC (rev 232176)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2018-05-25 01:12:31 UTC (rev 232177)
@@ -366,23 +366,6 @@
 
 bool ImageDecoderCG::frameAllowSubsamplingAtIndex(size_t) const
 {
-    RetainPtr<CFDictionaryRef> properties = adoptCF(CGImageSourceCopyPropertiesAtIndex(m_nativeDecoder.get(), 0, imageSourceOptions().get()));
-    if (!properties)
-        return false;
-    
-    CFDictionaryRef jfifProperties = static_cast<CFDictionaryRef>(CFDictionaryGetValue(properties.get(), kCGImagePropertyJFIFDictionary));
-    if (jfifProperties) {
-        CFBooleanRef isProgCFBool = static_cast<CFBooleanRef>(CFDictionaryGetValue(jfifProperties, kCGImagePropertyJFIFIsProgressive));
-        if (isProgCFBool) {
-            bool isProgressive = CFBooleanGetValue(isProgCFBool);
-            // Workaround for <rdar://problem/5184655> - Hang rendering very large progressive JPEG. Decoding progressive
-            // images hangs for a very long time right now. Until this is fixed, don't sub-sample progressive images. This
-            // will cause them to fail our large image check and they won't be decoded.
-            // FIXME: Remove once underlying issue is fixed (<rdar://problem/5191418>)
-            return !isProgressive;
-        }
-    }
-    
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to