Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c5a8599e6092511e038b0f30325f511a6a2be432
      
https://github.com/WebKit/WebKit/commit/c5a8599e6092511e038b0f30325f511a6a2be432
  Author: Matt Woodrow <[email protected]>
  Date:   2025-07-08 (Tue, 08 Jul 2025)

  Changed paths:
    M Source/WebKit/Shared/ImageOptions.h
    M Source/WebKit/Shared/ImageOptions.serialization.in
    M Source/WebKit/Shared/WebImage.cpp
    M Source/WebKit/Shared/WebImage.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm
    M Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/mac/WKTextAnimationManagerMac.mm
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  -----------
  Rendering SDR thumbnails of HDR images is slow.
https://bugs.webkit.org/show_bug.cgi?id=295547
<rdar://151331198>

Reviewed by Simon Fraser.

Converts WebPage::takeSnapshot to return a ImageBufferBackendHandle, which
includes MachSendRight/IOSurface as well as the existing ShareableBitmap. Adds a
takeSnapshotLegacy variant for the callsites that currently only know how to
handle the ShareableBitmap.

Adds SnapshotOption::Accelerated, for callers (using the new API!) to request an
accelerated drawing context, if possible.

Converts WKThumbnailView to use the new snapshot API option, and to request
acceleration for the thumbnail snapshot.

* Source/WebKit/Shared/ImageOptions.h:
(WebKit::snapshotOptionsToImageOptions):
* Source/WebKit/Shared/ImageOptions.serialization.in:
* Source/WebKit/Shared/WebImage.cpp:
(WebKit::WebImage::create):
(WebKit::WebImage::createHandle const):
(WebKit::WebImage::createImageBufferBackendHandle const):
* Source/WebKit/Shared/WebImage.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView requestSnapshot]):
(-[_WKThumbnailView _didTakeSnapshot:size:]):
(-[_WKThumbnailView _didTakeSnapshot:]): Deleted.
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView 
_snapshotRectAfterScreenUpdates:rectInViewCoordinates:intoImageOfWidth:completionHandler:]):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::takeSnapshotLegacy):
(WebKit::WebPageProxy::takeSnapshot):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/mac/WKTextAnimationManagerMac.mm:
(-[WKTextAnimationManager textPreviewForRect:completion:]):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::snapshotAtSize):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

Canonical link: https://commits.webkit.org/297137@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to