Changeset 291566 in webkit
- Timestamp:
- Mar 21, 2022, 10:53:58 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cocoa/GraphicsContextGLCocoa.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r291564 r291566 1 2022-03-21 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 Accessing WebGL content crashes in macOS Recovery OS 4 https://bugs.webkit.org/show_bug.cgi?id=238139 5 6 Reviewed by Antti Koivisto. 7 8 Add a quick fix trying to circumvent a Recovery OS crash. 9 Parts of this will be reverted once the true source is found. 10 11 * platform/graphics/cocoa/GraphicsContextGLCocoa.mm: 12 (WebCore::platformSupportsMetal): 13 1 14 2022-03-21 Tim Horton <timothy_horton@apple.com> 2 15 -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm
r291468 r291566 42 42 #import <pal/spi/cocoa/MetalSPI.h> 43 43 #import <wtf/BlockObjCExceptions.h> 44 #import <wtf/darwin/WeakLinking.h> 44 45 #import <wtf/text/CString.h> 45 46 … … 57 58 #import "ImageRotationSessionVT.h" 58 59 #endif 60 61 // Metal may not be available, for example in recovery OS. 62 WTF_WEAK_LINK_FORCE_IMPORT(MTLCreateSystemDefaultDevice); 59 63 60 64 namespace WebCore { … … 97 101 static bool platformSupportsMetal(bool isWebGL2) 98 102 { 103 // FIXME: Figure out why WebKit runs in recovery system using -framework Metal, but seemingly cannot call into Metal. 104 // The hunk about runnningInRecoverySystem should be removed once it is clear how WebKit can link strongly to Metal 105 // but run without Metal. 106 static bool runningInRecoverySystem = [] { 107 if (getenv("__OSINSTALL_ENVIRONMENT")) { 108 WTFLogAlways("WebGL: Running in recovery. Has access to Metal: %s", !MTLCreateSystemDefaultDevice ? "no" : "yes"); 109 return true; 110 } 111 return false; 112 }(); 113 if (runningInRecoverySystem) 114 return false; 115 116 if (!MTLCreateSystemDefaultDevice) 117 return false; 118 99 119 auto device = adoptNS(MTLCreateSystemDefaultDevice()); 100 120
Note:
See TracChangeset
for help on using the changeset viewer.