Title: [179858] tags/Safari-601.1.17.1/Source/WebCore
Revision
179858
Author
[email protected]
Date
2015-02-09 16:43:57 -0800 (Mon, 09 Feb 2015)

Log Message

Merged r179839.  rdar://problem/19520735

Modified Paths

Diff

Modified: tags/Safari-601.1.17.1/Source/WebCore/ChangeLog (179857 => 179858)


--- tags/Safari-601.1.17.1/Source/WebCore/ChangeLog	2015-02-10 00:32:31 UTC (rev 179857)
+++ tags/Safari-601.1.17.1/Source/WebCore/ChangeLog	2015-02-10 00:43:57 UTC (rev 179858)
@@ -1,3 +1,21 @@
+2015-02-09  Babak Shafiei  <[email protected]>
+
+        Merge r179839.
+
+    2015-02-09  Commit Queue  <[email protected]>
+
+            Unreviewed, rolling out r179494.
+            https://bugs.webkit.org/show_bug.cgi?id=141395
+
+            Caused slowdown in a WebKit client test scenario (Requested by
+            kling on #webkit).
+
+            Reverted changeset:
+
+            "[Cocoa] Make decoded image data purgeable ASAP."
+            https://bugs.webkit.org/show_bug.cgi?id=140298
+            http://trac.webkit.org/changeset/179494
+
 2015-02-04  Eric Carlson  <[email protected]>
 
         [iOS] add method to toggle playback when in the background

Modified: tags/Safari-601.1.17.1/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (179857 => 179858)


--- tags/Safari-601.1.17.1/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2015-02-10 00:32:31 UTC (rev 179857)
+++ tags/Safari-601.1.17.1/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2015-02-10 00:43:57 UTC (rev 179858)
@@ -347,7 +347,20 @@
 
     RetainPtr<CGImageRef> image = adoptCF(CGImageSourceCreateImageAtIndex(m_decoder, index, imageSourceOptions(subsamplingLevel).get()));
 
-    CGImageSetCachingFlags(image.get(), kCGImageCachingTransient);
+#if PLATFORM(IOS)
+    // <rdar://problem/7371198> - CoreGraphics changed the default caching behaviour in iOS 4.0 to kCGImageCachingTransient
+    // which caused a performance regression for us since the images had to be resampled/recreated every time we called
+    // CGContextDrawImage. We now tell CG to cache the drawn images. See also <rdar://problem/14366755> -
+    // CoreGraphics needs to un-deprecate kCGImageCachingTemporary since it's still not the default.
+#if COMPILER(CLANG)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+    CGImageSetCachingFlags(image.get(), kCGImageCachingTemporary);
+#if COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
+#endif // PLATFORM(IOS)
 
     CFStringRef imageUTI = CGImageSourceGetType(m_decoder);
     static const CFStringRef xbmUTI = CFSTR("public.xbitmap-image");
@@ -355,6 +368,13 @@
     if (!imageUTI)
         return image.leakRef();
 
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+    if (CFEqual(imageUTI, kUTTypeGIF)) {
+        CGImageSetCachingFlags(image.get(), kCGImageCachingTransient);
+        return image.leakRef();
+    }
+#endif
+
     if (!CFEqual(imageUTI, xbmUTI))
         return image.leakRef();
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to