Title: [195975] trunk/Source/WebCore
Revision
195975
Author
[email protected]
Date
2016-02-01 12:47:10 -0800 (Mon, 01 Feb 2016)

Log Message

Snapshot surfaces are forever wired after being compressed
https://bugs.webkit.org/show_bug.cgi?id=153751
<rdar://problem/24354546>

Reviewed by Darin Adler.

* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::convertToFormat):
Allow IOSurfaceAccelerator to unwire surfaces after they're transformed.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (195974 => 195975)


--- trunk/Source/WebCore/ChangeLog	2016-02-01 20:40:42 UTC (rev 195974)
+++ trunk/Source/WebCore/ChangeLog	2016-02-01 20:47:10 UTC (rev 195975)
@@ -1,3 +1,15 @@
+2016-02-01  Tim Horton  <[email protected]>
+
+        Snapshot surfaces are forever wired after being compressed
+        https://bugs.webkit.org/show_bug.cgi?id=153751
+        <rdar://problem/24354546>
+
+        Reviewed by Darin Adler.
+
+        * platform/graphics/cocoa/IOSurface.mm:
+        (IOSurface::convertToFormat):
+        Allow IOSurfaceAccelerator to unwire surfaces after they're transformed.
+
 2016-02-01  Dan Bernstein  <[email protected]>
 
         <rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9

Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (195974 => 195975)


--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2016-02-01 20:40:42 UTC (rev 195974)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2016-02-01 20:47:10 UTC (rev 195975)
@@ -42,6 +42,11 @@
 CGImageRef CGIOSurfaceContextCreateImageReference(CGContextRef);
 }
 
+#if PLATFORM(IOS)
+// Move this into the SPI header once it's possible to put inside the APPLE_INTERNAL_SDK block.
+NSString * const WebIOSurfaceAcceleratorUnwireSurfaceKey = @"UnwireSurface";
+#endif
+
 using namespace WebCore;
 
 inline std::unique_ptr<IOSurface> IOSurface::surfaceFromPool(IntSize size, IntSize contextSize, ColorSpace colorSpace, Format pixelFormat)
@@ -410,7 +415,9 @@
         delete callback;
     };
 
-    IOReturn ret = IOSurfaceAcceleratorTransformSurface(accelerator, inSurface->surface(), destinationIOSurfaceRef, nullptr, nullptr, &completion, nullptr, nullptr);
+    NSDictionary *options = @{ WebIOSurfaceAcceleratorUnwireSurfaceKey : @YES };
+
+    IOReturn ret = IOSurfaceAcceleratorTransformSurface(accelerator, inSurface->surface(), destinationIOSurfaceRef, (CFDictionaryRef)options, nullptr, &completion, nullptr, nullptr);
     ASSERT_UNUSED(ret, ret == kIOReturnSuccess);
 }
 #endif // PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to