diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-09-07 13:12:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-09 10:02:59 +0000 |
commit | 33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (patch) | |
tree | f6af110909c79b2759136554f1143d8b0572af0a /chromium/components/metal_util | |
parent | 7d2c5d177e9813077a621df8d18c0deda73099b3 (diff) | |
download | qtwebengine-chromium-33fc33aa94d4add0878ec30dc818e34e1dd3cc2a.tar.gz |
BASELINE: Update Chromium to 104.0.5112.120
Change-Id: I5d2726c2ab018d75d055739b6ba64317904f05bb
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438935
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/metal_util')
-rw-r--r-- | chromium/components/metal_util/device_removal.mm | 31 | ||||
-rw-r--r-- | chromium/components/metal_util/hdr_copier_layer.mm | 5 |
2 files changed, 16 insertions, 20 deletions
diff --git a/chromium/components/metal_util/device_removal.mm b/chromium/components/metal_util/device_removal.mm index 29a4cb3e61b..33a8a9253cb 100644 --- a/chromium/components/metal_util/device_removal.mm +++ b/chromium/components/metal_util/device_removal.mm @@ -11,23 +11,20 @@ namespace metal { void RegisterGracefulExitOnDeviceRemoval() { - if (@available(macOS 10.13, *)) { - id<NSObject> deviceObserver = nil; - MTLCopyAllDevicesWithObserver( - &deviceObserver, - ^(id<MTLDevice> device, MTLDeviceNotificationName name) { - if (name == MTLDeviceRemovalRequestedNotification || - name == MTLDeviceWasRemovedNotification) { - // Exit the GPU process without error. The browser process sees - // this error code as a graceful shutdown, so relaunches the GPU - // process without incrementing the crash count. - // - // Note this wouldn't work nicely with in-process-gpu (it would - // exit the browser), but we don't support that on macOS anyway. - base::Process::TerminateCurrentProcessImmediately(0); - } - }); - } + id<NSObject> deviceObserver = nil; + MTLCopyAllDevicesWithObserver( + &deviceObserver, ^(id<MTLDevice> device, MTLDeviceNotificationName name) { + if (name == MTLDeviceRemovalRequestedNotification || + name == MTLDeviceWasRemovedNotification) { + // Exit the GPU process without error. The browser process sees + // this error code as a graceful shutdown, so relaunches the GPU + // process without incrementing the crash count. + // + // Note this wouldn't work nicely with in-process-gpu (it would + // exit the browser), but we don't support that on macOS anyway. + base::Process::TerminateCurrentProcessImmediately(0); + } + }); } } // namespace metal diff --git a/chromium/components/metal_util/hdr_copier_layer.mm b/chromium/components/metal_util/hdr_copier_layer.mm index f690418f520..fe48c854454 100644 --- a/chromium/components/metal_util/hdr_copier_layer.mm +++ b/chromium/components/metal_util/hdr_copier_layer.mm @@ -139,8 +139,7 @@ uint32_t GetTransferFunctionIndex(const gfx::ColorSpace& color_space) { // Convert from an IOSurface's pixel format to a MTLPixelFormat. Crash on any // unsupported formats. -MTLPixelFormat IOSurfaceGetMTLPixelFormat(IOSurfaceRef buffer) - API_AVAILABLE(macos(10.13)) { +MTLPixelFormat IOSurfaceGetMTLPixelFormat(IOSurfaceRef buffer) { uint32_t format = IOSurfaceGetPixelFormat(buffer); switch (format) { case kCVPixelFormatType_64RGBAHalf: @@ -154,7 +153,7 @@ MTLPixelFormat IOSurfaceGetMTLPixelFormat(IOSurfaceRef buffer) } base::scoped_nsprotocol<id<MTLRenderPipelineState>> CreateRenderPipelineState( - id<MTLDevice> device) API_AVAILABLE(macos(10.13)) { + id<MTLDevice> device) { base::scoped_nsprotocol<id<MTLRenderPipelineState>> render_pipeline_state; base::scoped_nsprotocol<id<MTLLibrary>> library; |