Title: [179839] trunk/Source/WebCore
Revision
179839
Author
[email protected]
Date
2015-02-09 11:53:28 -0800 (Mon, 09 Feb 2015)

Log Message

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (179838 => 179839)


--- trunk/Source/WebCore/ChangeLog	2015-02-09 19:45:54 UTC (rev 179838)
+++ trunk/Source/WebCore/ChangeLog	2015-02-09 19:53:28 UTC (rev 179839)
@@ -1,3 +1,17 @@
+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-09  Jer Noble  <[email protected]>
 
         [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (179838 => 179839)


--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2015-02-09 19:45:54 UTC (rev 179838)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2015-02-09 19:53:28 UTC (rev 179839)
@@ -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