Title: [119053] branches/safari-536-branch/Source/WebKit2
- Revision
- 119053
- Author
- [email protected]
- Date
- 2012-05-30 21:45:47 -0700 (Wed, 30 May 2012)
Log Message
Merged r118896 -> <rdar://problem/11505987>
Modified Paths
Diff
Modified: branches/safari-536-branch/Source/WebKit2/ChangeLog (119052 => 119053)
--- branches/safari-536-branch/Source/WebKit2/ChangeLog 2012-05-31 04:39:36 UTC (rev 119052)
+++ branches/safari-536-branch/Source/WebKit2/ChangeLog 2012-05-31 04:45:47 UTC (rev 119053)
@@ -1,5 +1,26 @@
2012-05-30 Lucas Forschler <[email protected]>
+ Merge 118896
+
+ 2012-05-29 Jer Noble <[email protected]>
+
+ Noticeable delay taking an HTML5 trailer fullscreen.
+ https://bugs.webkit.org/show_bug.cgi?id=87794
+
+ Reviewed by Darin Adler.
+
+ Work around a not-entirely understood delay when using the results of a CGWindowListCreateImage()
+ call as the contents of a placeholder view. The backing of the resulting CGImageRef resides on
+ the WindowServer, and drawing that image requires synchronous calls to the WindowServer process.
+ By copying the image data, up front, into our own process, we can avoid those synchronous calls
+ later and avoid the delay-causing drawing behavior.
+
+ * UIProcess/mac/WKFullScreenWindowController.mm:
+ (CGImageDeepCopy): Added a helper function which copies the image data into a new CGImage.
+ (-[WKFullScreenWindowController enterFullScreen:]): Use the above.
+
+2012-05-30 Lucas Forschler <[email protected]>
+
Merge 118615
2012-05-25 Maciej Stachowiak <[email protected]>
Modified: branches/safari-536-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (119052 => 119053)
--- branches/safari-536-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2012-05-31 04:39:36 UTC (rev 119052)
+++ branches/safari-536-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2012-05-31 04:45:47 UTC (rev 119053)
@@ -183,6 +183,28 @@
#pragma mark -
#pragma mark Exposed Interface
+static RetainPtr<CGDataProviderRef> createImageProviderWithCopiedData(CGDataProviderRef sourceProvider)
+{
+ RetainPtr<CFDataRef> data = ""
+ return adoptCF(CGDataProviderCreateWithCFData(data.get()));
+}
+
+static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage)
+{
+ size_t width = CGImageGetWidth(sourceImage);
+ size_t height = CGImageGetHeight(sourceImage);
+ size_t bitsPerComponent = CGImageGetBitsPerComponent(sourceImage);
+ size_t bitsPerPixel = CGImageGetBitsPerPixel(sourceImage);
+ size_t bytesPerRow = CGImageGetBytesPerRow(sourceImage);
+ CGColorSpaceRef colorSpace = CGImageGetColorSpace(sourceImage);
+ CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(sourceImage);
+ RetainPtr<CGDataProviderRef> provider = createImageProviderWithCopiedData(CGImageGetDataProvider(sourceImage));
+ bool shouldInterpolate = CGImageGetShouldInterpolate(sourceImage);
+ CGColorRenderingIntent intent = CGImageGetRenderingIntent(sourceImage);
+
+ return adoptCF(CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpace, bitmapInfo, provider.get(), 0, shouldInterpolate, intent));
+}
+
- (void)enterFullScreen:(NSScreen *)screen
{
if (_isFullScreen)
@@ -204,6 +226,11 @@
CGWindowID windowID = [[_webView window] windowNumber];
RetainPtr<CGImageRef> webViewContents(AdoptCF, CGWindowListCreateImage(NSRectToCGRect(webViewFrame), kCGWindowListOptionIncludingWindow, windowID, kCGWindowImageShouldBeOpaque));
+ // Using the returned CGImage directly would result in calls to the WindowServer every time
+ // the image was painted. Instead, copy the image data into our own process to eliminate that
+ // future overhead.
+ webViewContents = createImageWithCopiedData(webViewContents.get());
+
// Screen updates to be re-enabled in beganEnterFullScreenWithInitialFrame:finalFrame:
NSDisableScreenUpdates();
[[self window] setAutodisplay:NO];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes