Changeset 269118 in webkit
- Timestamp:
- Oct 28, 2020, 1:26:13 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
-
ThirdParty/ANGLE/ChangeLog (modified) (1 diff)
-
ThirdParty/ANGLE/src/gpu_info_util/SystemInfo.h (modified) (1 diff)
-
ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_apple.mm (modified) (1 diff)
-
ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_macos.mm (modified) (1 diff)
-
ThirdParty/ANGLE/src/libANGLE/Display.cpp (modified) (1 diff)
-
ThirdParty/ANGLE/src/libANGLE/formatutils.cpp (modified) (1 diff)
-
ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (modified) (5 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/UIProcess/mac/HighPerformanceGPUManager.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/ANGLE/ChangeLog
r268420 r269118 1 2020-10-28 Tim Horton <timothy_horton@apple.com> 2 3 macCatalyst WebGL on Apple Silicon devices is using a software renderer 4 https://bugs.webkit.org/show_bug.cgi?id=218303 5 <rdar://problem/70587571> 6 7 Reviewed by Geoffrey Garen. 8 9 * src/gpu_info_util/SystemInfo.h: 10 * src/gpu_info_util/SystemInfo_apple.mm: 11 (angle::GetSystemInfo): 12 We can just use the macOS version of GetSystemInfo in macCatalyst. 13 14 * src/gpu_info_util/SystemInfo_macos.mm: 15 (angle::GetSystemInfo_mac): 16 * src/libANGLE/Display.cpp: 17 * src/libANGLE/formatutils.cpp: 18 (gl::BuildInternalFormatInfoMap): 19 * src/libANGLE/renderer/gl/renderergl_utils.cpp: 20 (rx::nativegl_gl::GenerateCaps): 21 It turns out we must use EAGL in macCatalyst on Apple Silicon in all cases, 22 not just in-process in iOS apps (the problem is not just about coexistence 23 of the two GLs, but actually about our ability to load the accelerated 24 renderer /at all/ in macCatalyst processes). 25 26 I left the runtime switching in place, because there is a future in which 27 we /can/ use CGL in non-iOS-app processes, but that future is not now. 28 1 29 2020-10-13 Keith Rollin <krollin@apple.com> 2 30 -
trunk/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo.h
r267602 r269118 68 68 // Only true on dual-GPU Mac laptops. 69 69 bool isMacSwitchable = false; 70 // Only true on Apple Silicon Macs when running iOS binaries. 71 // See https://developer.apple.com/documentation/foundation/nsprocessinfo/3608556-iosapponmac 72 bool isiOSAppOnMac = false; 70 // Only true on Apple Silicon Macs when running in macCatalyst. 71 bool needsEAGLOnMac = false; 73 72 74 73 // Only available on Android -
trunk/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_apple.mm
r267602 r269118 20 20 bool GetSystemInfo(SystemInfo *info) 21 21 { 22 #if defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64) 23 static bool isiOSAppOnMac = false; 24 static dispatch_once_t once; 25 dispatch_once(&once, ^{ 26 isiOSAppOnMac = [[NSProcessInfo processInfo] isiOSAppOnMac]; 27 }); 28 29 if (isiOSAppOnMac) 30 { 31 GetSystemInfo_ios(info); 32 if (info) 33 { 34 info->isiOSAppOnMac = true; 35 } 36 return info; 37 } 38 39 return GetSystemInfo_mac(info); 40 #elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST) 22 #if defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST) 41 23 return GetSystemInfo_mac(info); 42 24 #else -
trunk/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_macos.mm
r267602 r269118 248 248 info->isMacSwitchable = true; 249 249 } 250 251 #if defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64) 252 info->needsEAGLOnMac = true; 253 #endif 250 254 251 255 return true; -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp
r267869 r269118 280 280 } 281 281 282 if (info. isiOSAppOnMac)282 if (info.needsEAGLOnMac) 283 283 { 284 284 impl = new rx::DisplayEAGL(state); -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp
r267602 r269118 1036 1036 if (angle::GetSystemInfo(&info)) 1037 1037 { 1038 if (info. isiOSAppOnMac)1038 if (info.needsEAGLOnMac) 1039 1039 { 1040 1040 // Using OpenGLES.framework. -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp
r267770 r269118 1360 1360 if (angle::GetSystemInfo(&info)) 1361 1361 { 1362 if (!info. isiOSAppOnMac)1362 if (!info.needsEAGLOnMac) 1363 1363 { 1364 1364 VendorID vendor = GetVendorID(functions); -
trunk/Source/WebCore/ChangeLog
r269116 r269118 1 2020-10-28 Tim Horton <timothy_horton@apple.com> 2 3 macCatalyst WebGL on Apple Silicon devices is using a software renderer 4 https://bugs.webkit.org/show_bug.cgi?id=218303 5 <rdar://problem/70587571> 6 7 Reviewed by Geoffrey Garen. 8 9 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 10 (WebCore::needsEAGLOnMac): 11 (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): 12 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTarget): 13 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTargetQuery): 14 (WebCore::GraphicsContextGLOpenGL::EGLIOSurfaceTextureTarget): 15 (WebCore::isiOSAppOnMac): Deleted. 16 See ANGLE ChangeLog. 17 1 18 2020-10-28 Fujii Hironori <Hironori.Fujii@sony.com> 2 19 -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
r269025 r269118 109 109 110 110 #if PLATFORM(MAC) || PLATFORM(MACCATALYST) 111 static bool isiOSAppOnMac()111 static bool needsEAGLOnMac() 112 112 { 113 113 #if PLATFORM(MACCATALYST) && CPU(ARM64) 114 static bool isiOSAppOnMac = false; 115 static dispatch_once_t once; 116 dispatch_once(&once, ^{ 117 isiOSAppOnMac = [[NSProcessInfo processInfo] isiOSAppOnMac]; 118 }); 119 return isiOSAppOnMac; 114 return true; 120 115 #else 121 116 return false; … … 298 293 ExtensionsGL& extensions = getExtensions(); 299 294 300 if (! isiOSAppOnMac()) {295 if (!needsEAGLOnMac()) { 301 296 static constexpr const char* requiredExtensions[] = { 302 297 "GL_ANGLE_texture_rectangle", // For IOSurface-backed textures. … … 431 426 { 432 427 #if PLATFORM(MACCATALYST) 433 if ( isiOSAppOnMac())428 if (needsEAGLOnMac()) 434 429 return TEXTURE_2D; 435 430 return TEXTURE_RECTANGLE_ARB; … … 444 439 { 445 440 #if PLATFORM(MACCATALYST) 446 if ( isiOSAppOnMac())441 if (needsEAGLOnMac()) 447 442 return TEXTURE_BINDING_2D; 448 443 return TEXTURE_BINDING_RECTANGLE_ARB; … … 457 452 { 458 453 #if PLATFORM(MACCATALYST) 459 if ( isiOSAppOnMac())454 if (needsEAGLOnMac()) 460 455 return EGL_TEXTURE_2D; 461 456 return EGL_TEXTURE_RECTANGLE_ANGLE; -
trunk/Source/WebKit/ChangeLog
r269111 r269118 1 2020-10-28 Tim Horton <timothy_horton@apple.com> 2 3 macCatalyst WebGL on Apple Silicon devices is using a software renderer 4 https://bugs.webkit.org/show_bug.cgi?id=218303 5 <rdar://problem/70587571> 6 7 Reviewed by Geoffrey Garen. 8 9 * UIProcess/mac/HighPerformanceGPUManager.mm: 10 (WebKit::HighPerformanceGPUManager::addProcessRequiringHighPerformance): 11 (WebKit::HighPerformanceGPUManager::removeProcessRequiringHighPerformance): 12 (WebKit::HighPerformanceGPUManager::updateState): 13 (WebKit::isiOSAppOnMac): Deleted. 14 HighPerformanceGPUManager is PLATFORM(MAC)-only, which is not true 15 for MACCATALYST, so delete this dead code. 16 1 17 2020-10-28 Sam Weinig <weinig@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.mm
r267602 r269118 35 35 namespace WebKit { 36 36 37 static bool isiOSAppOnMac()38 {39 #if PLATFORM(MACCATALYST) && CPU(ARM64)40 static bool isiOSAppOnMac = false;41 static dispatch_once_t once;42 dispatch_once(&once, ^{43 isiOSAppOnMac = [[NSProcessInfo processInfo] isiOSAppOnMac];44 });45 return isiOSAppOnMac;46 #else47 return false;48 #endif49 }50 51 37 // FIXME: This class is using OpenGL to control the muxing of GPUs. Ultimately 52 38 // we want to use Metal, but currently there isn't a way to "release" a … … 61 47 void HighPerformanceGPUManager::addProcessRequiringHighPerformance(WebProcessProxy* process) 62 48 { 63 if (isiOSAppOnMac())64 return;65 66 49 if (!WebCore::hasLowAndHighPowerGPUs()) 67 50 return; … … 78 61 void HighPerformanceGPUManager::removeProcessRequiringHighPerformance(WebProcessProxy* process) 79 62 { 80 if (isiOSAppOnMac())81 return;82 83 63 if (!WebCore::hasLowAndHighPowerGPUs()) 84 64 return; … … 95 75 void HighPerformanceGPUManager::updateState() 96 76 { 97 if (isiOSAppOnMac())98 return;99 100 77 if (m_processesRequiringHighPerformance.size()) { 101 78 if (!m_pixelFormatObj) {
Note:
See TracChangeset
for help on using the changeset viewer.