Changeset 187215 in webkit


Ignore:
Timestamp:
Jul 22, 2015 10:09:16 PM (9 years ago)
Author:
timothy_horton@apple.com
Message:

Use updated CoreAnimation snapshot SPI.
https://bugs.webkit.org/show_bug.cgi?id=147197
<rdar://problem/21032083>

Reviewed by Tim Horton.
Patch by James Savage.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

  • platform/spi/cocoa/QuartzCoreSPI.h:
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r187211 r187215  
     12015-07-22  James Savage  <james.savage@apple.com>
     2
     3        Use updated CoreAnimation snapshot SPI.
     4        https://bugs.webkit.org/show_bug.cgi?id=147197
     5        <rdar://problem/21032083>
     6
     7        Reviewed by Tim Horton.
     8        Patch by James Savage.
     9
     10        * platform/spi/cocoa/QuartzCoreSPI.h:
     11
    1122015-07-22  Joseph Pecoraro  <pecoraro@apple.com>
    213
  • trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h

    r187202 r187215  
    3333
    3434#ifdef __OBJC__
     35#import <QuartzCore/CADisplay.h>
    3536#import <QuartzCore/CALayerHost.h>
    3637#import <QuartzCore/CALayerPrivate.h>
     
    150151
    151152#if USE(IOSURFACE)
    152 EXTERN_C void CARenderServerRenderLayerWithTransform(mach_port_t server_port, uint32_t client_id, uint64_t layer_id, IOSurfaceRef iosurface, int32_t ox, int32_t oy, const CATransform3D *matrix);
     153EXTERN_C void CARenderServerRenderDisplayLayerWithTransformAndTimeOffset(mach_port_t server_port, CFStringRef display_name, uint32_t client_id, uint64_t layer_id, IOSurfaceRef iosurface, int32_t ox, int32_t oy, const CATransform3D *matrix, CFTimeInterval offset);
    153154#endif
    154155
  • trunk/Source/WebKit2/ChangeLog

    r187212 r187215  
     12015-07-22  James Savage  <james.savage@apple.com>
     2
     3        Use updated CoreAnimation snapshot SPI.
     4        https://bugs.webkit.org/show_bug.cgi?id=147197
     5        <rdar://problem/21032083>
     6
     7        Reviewed by Tim Horton.
     8        Patch by James Savage.
     9
     10        * Platform/spi/ios/UIKitSPI.h:
     11        * UIProcess/API/Cocoa/WKWebView.mm:
     12        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
     13
    1142015-07-22  Timothy Horton  <timothy_horton@apple.com>
    215
  • trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h

    r187202 r187215  
    248248@end
    249249
     250@class CADisplay;
     251@interface UIScreen (Details)
     252- (CADisplay *)_display;
     253@end
     254
    250255@interface UIScrollView (Details)
    251256- (void)_stopScrollingAndZoomingAnimations;
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r187202 r187215  
    28862886#if USE(IOSURFACE)
    28872887    // If we are parented and thus won't incur a significant penalty from paging in tiles, snapshot the view hierarchy directly.
    2888     if (self.window) {
     2888    if (CADisplay *display = self.window.screen._display) {
    28892889        auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::ColorSpaceDeviceRGB);
    28902890        CGFloat imageScaleInViewCoordinates = imageWidth / rectInViewCoordinates.size.width;
    28912891        CATransform3D transform = CATransform3DMakeScale(imageScaleInViewCoordinates, imageScaleInViewCoordinates, 1);
    28922892        transform = CATransform3DTranslate(transform, -rectInViewCoordinates.origin.x, -rectInViewCoordinates.origin.y, 0);
    2893         CARenderServerRenderLayerWithTransform(MACH_PORT_NULL, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform);
     2893        CARenderServerRenderDisplayLayerWithTransformAndTimeOffset(MACH_PORT_NULL, (CFStringRef)display.name, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform, 0);
    28942894        completionHandler(surface->createImage().get());
    2895 
    28962895        return;
    28972896    }
Note: See TracChangeset for help on using the changeset viewer.