[WebGL] Remove software rendering and simplify context creation on macOS
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Jul 2019 22:27:45 +0000 (22:27 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Jul 2019 22:27:45 +0000 (22:27 +0000)
commit2c8f7573c50fc76e5a2f1e02db7d8afd21251488
tree55803dd52af696863557cb4f283d766b39e1ced1
parentc62ef549783230a2d6a473aed1b34f15491a6698
[WebGL] Remove software rendering and simplify context creation on macOS
https://bugs.webkit.org/show_bug.cgi?id=199789

Reviewed by Sam Weinig.

Source/WebCore:

We don't ever want to fall-back to the software renderer. We'd be better
off failing to create the context completely.

Also, the number of fall-back attempts we were making before hitting
the software renderer was overkill. All hardware we support should
handle a 32bpp buffer.

Lastly, we don't want to support supersampling - multisampling only.

I lied… there is one more thing - failing to create the context
was causing an ASSERT trying to remove the GC3D from the global list.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
* page/Settings.yaml: Remove forceSoftwareWebGL setting.
* platform/graphics/GraphicsContext3DAttributes.h:
* platform/graphics/GraphicsContext3DManager.cpp:
(WebCore::GraphicsContext3DManager::addContext):
(WebCore::GraphicsContext3DManager::removeContext):
(WebCore::GraphicsContext3DManager::removeContextRequiringHighPerformance):
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::setPixelFormat): Deleted.

Source/WebKit:

Remove force software WebGL setting.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetForceSoftwareWebGLRendering): Deleted.
(WKPreferencesGetForceSoftwareWebGLRendering): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

Remove force software WebGL setting.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences forceSoftwareWebGLRendering]): Deleted.
(-[WebPreferences setForceSoftwareWebGLRendering:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/page/Settings.yaml
Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h
Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp
Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm