<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[285141] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/285141">285141</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2021-11-01 16:05:46 -0700 (Mon, 01 Nov 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename GPUDevice to GPUPrewarming because it conflicts with WebGPU's GPUDevice
https://bugs.webkit.org/show_bug.cgi?id=232549

Reviewed by Tim Horton.

We should have called it GPUPrewarming from the beginning, because that's what it does.

No new tests because there is no behavior change.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/ProcessWarming.cpp:
* platform/graphics/gpu/GPUPrewarming.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUDevice.h.
* platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm: Renamed from Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreSourcesCocoatxt">trunk/Source/WebCore/SourcesCocoa.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepageProcessWarmingcpp">trunk/Source/WebCore/page/ProcessWarming.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUPrewarmingh">trunk/Source/WebCore/platform/graphics/gpu/GPUPrewarming.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpucocoaGPUPrewarmingMetalmm">trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpuGPUDeviceh">trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgpucocoaGPUDeviceMetalmm">trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (285140 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-11-01 22:50:11 UTC (rev 285140)
+++ trunk/Source/WebCore/ChangeLog      2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2021-11-01  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Rename GPUDevice to GPUPrewarming because it conflicts with WebGPU's GPUDevice
+        https://bugs.webkit.org/show_bug.cgi?id=232549
+
+        Reviewed by Tim Horton.
+
+        We should have called it GPUPrewarming from the beginning, because that's what it does.
+
+        No new tests because there is no behavior change.
+
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/ProcessWarming.cpp:
+        * platform/graphics/gpu/GPUPrewarming.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUDevice.h.
+        * platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm: Renamed from Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm.
+
</ins><span class="cx"> 2021-11-01  Alan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [LFC][IFC] Stop measuring text while collecting inline items when content needs bidi split
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcesCocoatxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/SourcesCocoa.txt (285140 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/SourcesCocoa.txt    2021-11-01 22:50:11 UTC (rev 285140)
+++ trunk/Source/WebCore/SourcesCocoa.txt       2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -401,7 +401,7 @@
</span><span class="cx"> platform/graphics/cv/PixelBufferConformerCV.cpp
</span><span class="cx"> platform/graphics/cv/GraphicsContextGLCVANGLE.cpp
</span><span class="cx"> platform/graphics/coreimage/FilterEffectRendererCoreImage.mm
</span><del>-platform/graphics/gpu/cocoa/GPUDeviceMetal.mm
</del><ins>+platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm
</ins><span class="cx"> platform/graphics/ios/DisplayRefreshMonitorIOS.mm
</span><span class="cx"> platform/graphics/ios/IconIOS.mm
</span><span class="cx"> platform/graphics/mac/ColorMac.mm
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (285140 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2021-11-01 22:50:11 UTC (rev 285140)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -7080,8 +7080,8 @@
</span><span class="cx">          1CDD45E40BA9C84600F90147 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
</span><span class="cx">          1CDD45E50BA9C84600F90147 /* WebCore.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebCore.xcconfig; sourceTree = "<group>"; };
</span><span class="cx">          1CDD45E60BA9C84600F90147 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
</span><del>-               1CE3497A26B33B7A008306BD /* GPUDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUDevice.h; sourceTree = "<group>"; };
-               1CE3497C26B33BAE008306BD /* GPUDeviceMetal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUDeviceMetal.mm; sourceTree = "<group>"; };
</del><ins>+                1CE3497A26B33B7A008306BD /* GPUPrewarming.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUPrewarming.h; sourceTree = "<group>"; };
+               1CE3497C26B33BAE008306BD /* GPUPrewarmingMetal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUPrewarmingMetal.mm; sourceTree = "<group>"; };
</ins><span class="cx">           1CE8863E26105A5F000C816C /* InMemoryDisplayList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InMemoryDisplayList.cpp; sourceTree = "<group>"; };
</span><span class="cx">          1CE8863F26105A5F000C816C /* InMemoryDisplayList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InMemoryDisplayList.h; sourceTree = "<group>"; };
</span><span class="cx">          1CE8D12526185BD800FC3AEF /* DisplayListItemBufferIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayListItemBufferIdentifier.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -18644,11 +18644,11 @@
</span><span class="cx">          1A569CC40D7E2B60007C3983 /* bridge */ = {
</span><span class="cx">                  isa = PBXGroup;
</span><span class="cx">                  children = (
</span><ins>+                               59B5977111086556007159E8 /* jsc */,
+                               1A569CE20D7E2B82007C3983 /* objc */,
</ins><span class="cx">                           599E758F11055A1F00D904FA /* Bridge.h */,
</span><span class="cx">                          1A71D5790F33819000F9CE4E /* IdentifierRep.cpp */,
</span><span class="cx">                          1A71D57A0F33819000F9CE4E /* IdentifierRep.h */,
</span><del>-                               59B5977111086556007159E8 /* jsc */,
-                               1A569CE20D7E2B82007C3983 /* objc */,
</del><span class="cx">                           1A569CEF0D7E2B82007C3983 /* runtime_array.cpp */,
</span><span class="cx">                          1A569CF00D7E2B82007C3983 /* runtime_array.h */,
</span><span class="cx">                          1A569CF10D7E2B82007C3983 /* runtime_method.cpp */,
</span><span class="lines">@@ -19240,7 +19240,7 @@
</span><span class="cx">                  isa = PBXGroup;
</span><span class="cx">                  children = (
</span><span class="cx">                          1CE3497B26B33B8C008306BD /* cocoa */,
</span><del>-                               1CE3497A26B33B7A008306BD /* GPUDevice.h */,
</del><ins>+                                1CE3497A26B33B7A008306BD /* GPUPrewarming.h */,
</ins><span class="cx">                   );
</span><span class="cx">                  path = gpu;
</span><span class="cx">                  sourceTree = "<group>";
</span><span class="lines">@@ -19248,7 +19248,7 @@
</span><span class="cx">          1CE3497B26B33B8C008306BD /* cocoa */ = {
</span><span class="cx">                  isa = PBXGroup;
</span><span class="cx">                  children = (
</span><del>-                               1CE3497C26B33BAE008306BD /* GPUDeviceMetal.mm */,
</del><ins>+                                1CE3497C26B33BAE008306BD /* GPUPrewarmingMetal.mm */,
</ins><span class="cx">                   );
</span><span class="cx">                  path = cocoa;
</span><span class="cx">                  sourceTree = "<group>";
</span></span></pre></div>
<a id="trunkSourceWebCorepageProcessWarmingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ProcessWarming.cpp (285140 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ProcessWarming.cpp     2021-11-01 22:50:11 UTC (rev 285140)
+++ trunk/Source/WebCore/page/ProcessWarming.cpp        2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> #include "XMLNames.h"
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(GPU_DRIVER_PREWARMING)
</span><del>-#include "GPUDevice.h"
</del><ins>+#include "GPUPrewarming.h"
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUDeviceh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h (285140 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h   2021-11-01 22:50:11 UTC (rev 285140)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h      2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -1,32 +0,0 @@
</span><del>-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-namespace WebCore {
-
-void prewarmGPU();
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpuGPUPrewarminghfromrev285138trunkSourceWebCoreplatformgraphicsgpuGPUDeviceh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/gpu/GPUPrewarming.h (from rev 285138, trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h) (0 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/GPUPrewarming.h                               (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/GPUPrewarming.h  2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+void prewarmGPU();
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpucocoaGPUDeviceMetalmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm (285140 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm       2021-11-01 22:50:11 UTC (rev 285140)
+++ trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm  2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "GPUDevice.h"
-
-#import <Metal/Metal.h>
-
-namespace WebCore {
-
-void prewarmGPU()
-{
-#if PLATFORM(MAC)
-    // Call MTLCopyAllDevices() on a background thread to avoid hanging the main thread.
-    dispatch_async(dispatch_get_global_queue(0, 0), ^{
-        auto devices = adoptNS(MTLCopyAllDevices());
-    });
-#endif
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgpucocoaGPUPrewarmingMetalmmfromrev285138trunkSourceWebCoreplatformgraphicsgpucocoaGPUDeviceMetalmm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm (from rev 285138, trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm) (0 => 285141)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm                           (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUPrewarmingMetal.mm      2021-11-01 23:05:46 UTC (rev 285141)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "GPUPrewarming.h"
+
+#import <Metal/Metal.h>
+
+namespace WebCore {
+
+void prewarmGPU()
+{
+#if PLATFORM(MAC)
+    // Call MTLCopyAllDevices() on a background thread to avoid hanging the main thread.
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        auto devices = adoptNS(MTLCopyAllDevices());
+    });
+#endif
+}
+
+} // namespace WebCore
</ins></span></pre>
</div>
</div>

</body>
</html>