Changeset 211126 in webkit
- Timestamp:
- Jan 24, 2017, 5:44:09 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/cocoa/IOSurface.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/API/Cocoa/WKWebView.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r211125 r211126 1 2017-01-24 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Avoid IOSurface readback for snapshot creation 4 https://bugs.webkit.org/show_bug.cgi?id=167397 5 rdar://problem/30174873 6 7 Reviewed by Tim Horton. 8 9 Export sinkIntoImage(). 10 11 * platform/graphics/cocoa/IOSurface.h: 12 1 13 2017-01-24 Brent Fulgham <bfulgham@apple.com> 2 14 -
trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h
r209369 r211126 63 63 // the surface, or an expensive GPU readback can result. 64 64 WEBCORE_EXPORT RetainPtr<CGImageRef> createImage(); 65 static RetainPtr<CGImageRef> sinkIntoImage(std::unique_ptr<IOSurface>);65 WEBCORE_EXPORT static RetainPtr<CGImageRef> sinkIntoImage(std::unique_ptr<IOSurface>); 66 66 67 67 id asLayerContents() const { return (id)(CFTypeRef)m_surface.get(); } -
trunk/Source/WebKit2/ChangeLog
r211121 r211126 1 2017-01-24 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Avoid IOSurface readback for snapshot creation 4 https://bugs.webkit.org/show_bug.cgi?id=167397 5 rdar://problem/30174873 6 7 Reviewed by Tim Horton. 8 9 Use IOSurface::sinkIntoImage() for snapshots, to avoid GPU readback. 10 11 * UIProcess/API/Cocoa/WKWebView.mm: 12 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): 13 1 14 2017-01-24 Tim Horton <timothy_horton@apple.com> 2 15 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r211121 r211126 4420 4420 transform = CATransform3DTranslate(transform, -rectInViewCoordinates.origin.x, -rectInViewCoordinates.origin.y, 0); 4421 4421 CARenderServerRenderDisplayLayerWithTransformAndTimeOffset(MACH_PORT_NULL, (CFStringRef)display.name, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform, 0); 4422 completionHandler( surface->createImage().get());4422 completionHandler(WebCore::IOSurface::sinkIntoImage(WTFMove(surface)).get()); 4423 4423 return; 4424 4424 }
Note:
See TracChangeset
for help on using the changeset viewer.