Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with “'CGWindowListCreateImage' is unavailable: obsoleted in macOS 15.0” #32687

Conversation

eric-carlson
Copy link
Contributor

@eric-carlson eric-carlson commented Aug 25, 2024

ea20b8a

Build fails with “'CGWindowListCreateImage' is unavailable: obsoleted in macOS 15.0”
https://bugs.webkit.org/show_bug.cgi?id=277564
rdar://133237307

Reviewed by Jean-Yves Avenard.

Softlink `CGWindowListCreateImage` so we can call it in PAL to avoid the obsolete error
when building. Ultimately we should replace it by using ScreenCaptureKit, but doing so
causes a 2% Speedometer regression so do this for now.

* Source/WebCore/PAL/pal/cg/CoreGraphicsSoftLink.cpp:
* Source/WebCore/PAL/pal/cg/CoreGraphicsSoftLink.h:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/cg/CGWindowUtilities.cpp: Added.
(WebCore::cgWindowListCreateImage):
* Source/WebCore/platform/graphics/cg/CGWindowUtilities.h: Added.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _windowSnapshotInRect:withOptions:]):
* Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
(takeWindowSnapshot):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::takeWindowSnapshot):
* Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm:
(-[WebFullScreenController enterFullScreen:]):
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _windowSnapshotInRect:withOptions:]):
* Source/WebKitLegacy/mac/WebView/WebViewPrivate.h:
* Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm:
(takeWindowSnapshot):
* Tools/MiniBrowser/mac/BrowserWindowController.h:
* Tools/MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController windowSnapshotInRect:]):
(-[BrowserWindowController sharingService:transitionImageForShareItem:contentRect:]):
* Tools/MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController windowSnapshotInRect:]):
* Tools/MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController windowSnapshotInRect:]):
* Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::windowSnapshotImage):

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

25a0999

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 wincairo-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ❌ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@eric-carlson eric-carlson self-assigned this Aug 25, 2024
@eric-carlson eric-carlson added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Aug 25, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 25, 2024
Copy link
Member

@jyavenard jyavenard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ with comments

@eric-carlson eric-carlson removed the merging-blocked Applied to prevent a change from being merged label Aug 27, 2024
@eric-carlson eric-carlson force-pushed the soft-link-cg-window-list-create-image-patch branch from ec30bd2 to 25a0999 Compare August 27, 2024 04:39
@eric-carlson eric-carlson added the merge-queue Applied to send a pull request to merge-queue label Aug 27, 2024
… in macOS 15.0”

https://bugs.webkit.org/show_bug.cgi?id=277564
rdar://133237307

Reviewed by Jean-Yves Avenard.

Softlink `CGWindowListCreateImage` so we can call it in PAL to avoid the obsolete error
when building. Ultimately we should replace it by using ScreenCaptureKit, but doing so
causes a 2% Speedometer regression so do this for now.

* Source/WebCore/PAL/pal/cg/CoreGraphicsSoftLink.cpp:
* Source/WebCore/PAL/pal/cg/CoreGraphicsSoftLink.h:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/cg/CGWindowUtilities.cpp: Added.
(WebCore::cgWindowListCreateImage):
* Source/WebCore/platform/graphics/cg/CGWindowUtilities.h: Added.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _windowSnapshotInRect:withOptions:]):
* Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
(takeWindowSnapshot):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::takeWindowSnapshot):
* Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm:
(-[WebFullScreenController enterFullScreen:]):
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _windowSnapshotInRect:withOptions:]):
* Source/WebKitLegacy/mac/WebView/WebViewPrivate.h:
* Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm:
(takeWindowSnapshot):
* Tools/MiniBrowser/mac/BrowserWindowController.h:
* Tools/MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController windowSnapshotInRect:]):
(-[BrowserWindowController sharingService:transitionImageForShareItem:contentRect:]):
* Tools/MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController windowSnapshotInRect:]):
* Tools/MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController windowSnapshotInRect:]):
* Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::windowSnapshotImage):

Canonical link: https://commits.webkit.org/282791@main
@webkit-commit-queue webkit-commit-queue force-pushed the soft-link-cg-window-list-create-image-patch branch from 25a0999 to ea20b8a Compare August 27, 2024 15:34
@webkit-commit-queue
Copy link
Collaborator

Committed 282791@main (ea20b8a): https://commits.webkit.org/282791@main

Reviewed commits have been landed. Closing PR #32687 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit ea20b8a into WebKit:main Aug 27, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants