Changeset 247422 in webkit
- Timestamp:
- Jul 14, 2019 1:21:38 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247421 r247422 1 2019-07-14 Dean Jackson <dino@apple.com> 2 3 WebGL not supported on WKWebView on UIKit for Mac 4 https://bugs.webkit.org/show_bug.cgi?id=199785 5 <rdar://problem/52911449> 6 7 Reviewed by Antoine Quint. 8 9 Even though we don't yet run tests on UIKit for Mac, we 10 should have the most simple "is WebGL working?" ref test. 11 12 * webgl/smell-test-expected.html: Added. 13 * webgl/smell-test.html: Added. 14 1 15 2019-07-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 16 -
trunk/Source/WTF/ChangeLog
r247377 r247422 1 2019-07-14 Dean Jackson <dino@apple.com> 2 3 WebGL not supported on WKWebView on UIKit for Mac 4 https://bugs.webkit.org/show_bug.cgi?id=199785 5 <rdar://problem/52911449> 6 7 Reviewed by Antoine Quint. 8 9 MacCatalyst has Apple Graphics Control, although 10 this area is very messy, see <rdar://53062794>. 11 12 * wtf/Platform.h: 13 1 14 2019-07-11 Myles C. Maxfield <mmaxfield@apple.com> 2 15 -
trunk/Source/WTF/wtf/Platform.h
r247377 r247422 1218 1218 #endif 1219 1219 1220 #if PLATFORM(MAC) || PLATFORM(MACCATALYST) 1221 #define HAVE_APPLE_GRAPHICS_CONTROL 1 1222 #endif 1223 1220 1224 #if PLATFORM(MAC) 1221 #define HAVE_APPLE_GRAPHICS_CONTROL 11222 1225 #define USE_COREAUDIO 1 1223 1226 #endif -
trunk/Source/WebCore/ChangeLog
r247421 r247422 1 2019-07-14 Dean Jackson <dino@apple.com> 2 3 WebGL not supported on WKWebView on UIKit for Mac 4 https://bugs.webkit.org/show_bug.cgi?id=199785 5 <rdar://problem/52911449> 6 7 Reviewed by Antoine Quint. 8 9 UIKit for Mac was not creating a CGLPixelFormatObj because 10 it wasn't using the code hidden in PLATFORM(MAC). Instead 11 we should be guarding for USE(OPENGL). 12 13 There are still some inconsistencies: <rdar://53062794> 14 15 Test: webgl/smell-test.html 16 17 * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: 18 (WebCore::GraphicsContext3D::GraphicsContext3D): 19 (WebCore::GraphicsContext3D::allowOfflineRenderers const): We have to return 20 true for this, since we don't have access to the Window Server. 21 1 22 2019-07-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 23 -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm
r247315 r247422 181 181 } 182 182 183 #if PLATFORM(MAC) && USE(OPENGL) 183 #if PLATFORM(MAC) && USE(OPENGL) // FIXME: This probably should be just USE(OPENGL) - see <rdar://53062794>. 184 184 185 185 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 … … 266 266 , m_private(std::make_unique<GraphicsContext3DPrivate>(this)) 267 267 { 268 #if USE(ANGLE) 269 // In the ANGLE backend, the only shader compiler instantiated is 270 // the one ANGLE uses internally. 271 #else 272 #if PLATFORM(IOS_FAMILY) 268 #if !USE(ANGLE) 269 #if USE(OPENGL_ES) 273 270 if (m_attrs.isWebGL2) 274 271 m_compiler = ANGLEWebKitBridge(SH_ESSL_OUTPUT, SH_WEBGL2_SPEC); … … 278 275 if (m_attrs.isWebGL2) 279 276 m_compiler = ANGLEWebKitBridge(SH_GLSL_410_CORE_OUTPUT, SH_WEBGL2_SPEC); 280 #endif // PLATFORM(IOS_FAMILY)281 #endif // USE(ANGLE)277 #endif // USE(OPENGL_ES) 278 #endif // !USE(ANGLE) 282 279 283 280 #if USE(OPENGL_ES) … … 297 294 GLint numPixelFormats = 0; 298 295 296 #if HAVE(APPLE_GRAPHICS_CONTROL) 297 m_powerPreferenceUsedForCreation = (hasLowAndHighPowerGPUs() && attrs.powerPreference == GraphicsContext3DPowerPreference::HighPerformance) ? GraphicsContext3DPowerPreference::HighPerformance : GraphicsContext3DPowerPreference::Default; 298 #else 299 m_powerPreferenceUsedForCreation = GraphicsContext3DPowerPreference::Default; 300 #endif 301 299 302 // If we're configured to demand the software renderer, we'll 300 303 // do so. We attempt to create contexts in this order: … … 309 312 // 4) closest to 32 bit RGBA/16 bit depth/software renderer 310 313 // 311 // If none of that works, we simply fail and set m_contextObj to 0.314 // If none of that works, we fail and leave m_contextObj as nullptr. 312 315 313 316 bool useMultisampling = m_attrs.antialias; 314 315 #if HAVE(APPLE_GRAPHICS_CONTROL)316 m_powerPreferenceUsedForCreation = (hasLowAndHighPowerGPUs() && attrs.powerPreference == GraphicsContext3DPowerPreference::HighPerformance) ? GraphicsContext3DPowerPreference::HighPerformance : GraphicsContext3DPowerPreference::Default;317 #else318 m_powerPreferenceUsedForCreation = GraphicsContext3DPowerPreference::Default;319 #endif320 317 321 318 setPixelFormat(attribs, 32, 32, !attrs.forceSoftwareRenderer, true, false, useMultisampling, attrs.isWebGL2, allowOfflineRenderers()); … … 323 320 324 321 if (!numPixelFormats) { 325 setPixelFormat(attribs, 32, 32, !attrs.forceSoftwareRenderer, false, false, useMultisampling, attrs.isWebGL2, allowOfflineRenderers());322 setPixelFormat(attribs, 32, 32, !attrs.forceSoftwareRenderer, true, false, useMultisampling, attrs.isWebGL2, allowOfflineRenderers()); 326 323 CGLChoosePixelFormat(attribs.data(), &pixelFormatObj, &numPixelFormats); 327 324 328 325 if (!numPixelFormats) { 329 setPixelFormat(attribs, 32, 16, !attrs.forceSoftwareRenderer, false, false, useMultisampling, attrs.isWebGL2, allowOfflineRenderers());326 setPixelFormat(attribs, 32, 32, !attrs.forceSoftwareRenderer, false, false, useMultisampling, attrs.isWebGL2, allowOfflineRenderers()); 330 327 CGLChoosePixelFormat(attribs.data(), &pixelFormatObj, &numPixelFormats); 331 328 332 if (! attrs.forceSoftwareRenderer && !numPixelFormats) {333 setPixelFormat(attribs, 32, 16, false, false, true, false, attrs.isWebGL2, allowOfflineRenderers());329 if (!numPixelFormats) { 330 setPixelFormat(attribs, 32, 16, !attrs.forceSoftwareRenderer, false, false, useMultisampling, attrs.isWebGL2, allowOfflineRenderers()); 334 331 CGLChoosePixelFormat(attribs.data(), &pixelFormatObj, &numPixelFormats); 335 useMultisampling = false; 332 333 if (!attrs.forceSoftwareRenderer && !numPixelFormats) { 334 setPixelFormat(attribs, 32, 16, false, false, true, false, attrs.isWebGL2, allowOfflineRenderers()); 335 CGLChoosePixelFormat(attribs.data(), &pixelFormatObj, &numPixelFormats); 336 useMultisampling = false; 337 } 336 338 } 337 339 } … … 345 347 CGLSetParameter(m_contextObj, kCGLCPAbortOnGPURestartStatusBlacklisted, &abortOnBlacklist); 346 348 347 #if PLATFORM(MAC) 349 #if PLATFORM(MAC) // FIXME: This probably should be USE(OPENGL) - see <rdar://53062794>. 348 350 349 351 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 … … 815 817 if (primaryOpenGLDisplayMask()) 816 818 return true; 819 #elif PLATFORM(MACCATALYST) 820 // FIXME: <rdar://53062794> We're very inconsistent about WEBPROCESS_WINDOWSERVER_BLOCKING 821 // and MAC/MACCATALYST and OPENGL/OPENGLES. 822 return true; 817 823 #endif 818 824
Note: See TracChangeset
for help on using the changeset viewer.