Changeset 162936 in webkit


Ignore:
Timestamp:
Jan 28, 2014 9:19:05 AM (10 years ago)
Author:
timothy_horton@apple.com
Message:

WebKit2 View Gestures (Swipe): Use CGSCaptureWindowsContentsToRect for now
https://bugs.webkit.org/show_bug.cgi?id=127768
<rdar://problem/15923662>

Reviewed by Simon Fraser.

  • UIProcess/API/mac/WKView.mm:

(-[WKView _takeViewSnapshot]):
Until <rdar://problem/15709646> is resolved, we'll use
CGSCaptureWindowsContentsToRect instead of CGWindowListCreateImage.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r162929 r162936  
     12014-01-28  Tim Horton  <timothy_horton@apple.com>
     2
     3        WebKit2 View Gestures (Swipe): Use CGSCaptureWindowsContentsToRect for now
     4        https://bugs.webkit.org/show_bug.cgi?id=127768
     5        <rdar://problem/15923662>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * UIProcess/API/mac/WKView.mm:
     10        (-[WKView _takeViewSnapshot]):
     11        Until <rdar://problem/15709646> is resolved, we'll use
     12        CGSCaptureWindowsContentsToRect instead of CGWindowListCreateImage.
     13
    1142014-01-28  Mark Rowe  <mrowe@apple.com>
    215
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r162929 r162936  
    118118#if defined(__has_include) && __has_include(<CoreGraphics/CoreGraphicsPrivate.h>)
    119119#import <CoreGraphics/CoreGraphicsPrivate.h>
     120#import <CoreGraphics/CGSCapture.h>
    120121#endif
    121122
     
    125126CGSConnectionID CGSMainConnectionID(void);
    126127CGError CGSGetScreenRectForWindow(CGSConnectionID cid, CGSWindowID wid, CGRect *rect);
     128CGError CGSCaptureWindowsContentsToRect(CGSConnectionID cid, const CGSWindowID windows[], uint32_t windowCount, CGRect rect, CGImageRef *outImage);
    127129};
    128130
     
    25462548        return nullptr;
    25472549
    2548     RetainPtr<CGImageRef> windowSnapshotImage = adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque));
     2550    // FIXME: This should use CGWindowListCreateImage once <rdar://problem/15709646> is resolved.
     2551    CGSWindowID windowID = [window windowNumber];
     2552    CGImageRef cgWindowImage = nullptr;
     2553    CGSCaptureWindowsContentsToRect(CGSMainConnectionID(), &windowID, 1, CGRectNull, &cgWindowImage);
     2554    RetainPtr<CGImageRef> windowSnapshotImage = adoptCF(cgWindowImage);
    25492555
    25502556    NSRect windowCaptureRect = [self convertRect:self.bounds toView:nil];
Note: See TracChangeset for help on using the changeset viewer.