Implement preferLowPowerToHighPerformance for WebGL
https://bugs.webkit.org/show_bug.cgi?id=161017
<rdar://problem/
26819135>
Reviewed by Myles Maxfield.
.:
A manual test that creates contexts with and without preferLowPowerToHighPerformance
to see what is used. This has to be manual because it depends on the hardware
configuration, and we don't have a way to detect it up-front. Also, if the
code was failing, it would be the same result as on a single GPU system.
* ManualTests/webgl-preferLowPowerToHighPerformance.html: Added.
Source/WebCore:
Implement preferLowPowerToHighPerformance on macOS by
passing the correct CGL attribute when creating the
pixel format.
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::get3DContextAttributes):
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::setPixelFormat):
(WebCore::GraphicsContext3D::GraphicsContext3D):
LayoutTests:
Now that we implement preferLowPowerToHighPerformance we can
retain its value in the context creation attributes object.
* fast/canvas/webgl/context-creation-attributes-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204664
268f45cc-cd09-0410-ab3c-
d52691b4dbfc