WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-220843-20210122143526.patch (text/plain), 57.84 KB, created by
Kimmo Kinnunen
on 2021-01-22 04:35:30 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kimmo Kinnunen
Created:
2021-01-22 04:35:30 PST
Size:
57.84 KB
patch
obsolete
>Subversion Revision: 271741 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a0e18570f7d25251fb16639e8b5a7c3d595804f1..379b3f04086cd9b71f893d6b09c5ac2bb77acf70 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,58 @@ >+2021-01-22 Kimmo Kinnunen <kkinnunen@apple.com> >+ >+ WebGL power preference and discrete/internal gpu selection implemented incorrectly with ANGLE >+ https://bugs.webkit.org/show_bug.cgi?id=220843 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use ANGLE extension EGL_ANGLE_power_preference to signal to ANGLE that the underlying >+ CGL context should be updated as a response to display reconfiguration signal. >+ This ensures that ANGLE state stays consistent with the actual CGL context behavior, as >+ we don't change the context behind ANGLE's back. >+ >+ Remove the feature where the context GPU is selected based on the display the window is >+ on. This cannot work with the logic of "powerPreference = "high-performance" goes to >+ discrete GPU". Also, this cannot work with ANGLE at all, since all contexts are backed >+ by a single platform context. Thus all contexts will use the same underlying GPU. >+ >+ No new tests due to the test runner missing features. The bug blockers track the testing. >+ >+ * PlatformMac.cmake: >+ * SourcesCocoa.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * html/canvas/WebGLRenderingContextBase.cpp: >+ (WebCore::isHighPerformanceContext): >+ * page/Chrome.cpp: >+ (WebCore::Chrome::windowScreenDidChange): >+ * platform/graphics/GraphicsContextGL.h: >+ * platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: >+ * platform/graphics/RemoteGraphicsContextGLProxyBase.h: >+ * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: >+ (WebCore::GraphicsContextGLOpenGL::create): >+ (WebCore::GraphicsContextGLOpenGL::createShared): >+ (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): >+ (WebCore::GraphicsContextGLOpenGL::setContextVisibility): >+ (WebCore::GraphicsContextGLOpenGL::displayWasReconfigured): >+ (WebCore::GraphicsContextGLOpenGL::simulateContextChanged): >+ * platform/graphics/mac/GraphicsChecksMac.cpp: Added. >+ (WebCore::attachToAppleGraphicsControl): >+ (WebCore::hasMuxCapability): >+ (WebCore::hasLowAndHighPowerGPUs): >+ * platform/graphics/mac/GraphicsChecksMac.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h. >+ * platform/graphics/mac/ScopedHighPerformanceGPURequest.h: Copied from Source/WebCore/platform/graphics/mac/SwitchingGPUClient.h. >+ (WebCore::ScopedHighPerformanceGPURequest::ScopedHighPerformanceGPURequest): >+ (WebCore::ScopedHighPerformanceGPURequest::~ScopedHighPerformanceGPURequest): >+ (WebCore::ScopedHighPerformanceGPURequest::operator=): >+ (WebCore::ScopedHighPerformanceGPURequest::acquire): >+ * platform/graphics/mac/SwitchingGPUClient.h: >+ * platform/graphics/opengl/GraphicsContextGLOpenGL.h: >+ * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: >+ (WebCore::GraphicsContextGLOpenGLManager::displayWasReconfigured): >+ (WebCore::GraphicsContextGLOpenGLManager::addContext): >+ (WebCore::GraphicsContextGLOpenGLManager::removeContext): >+ * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: >+ * testing/Internals.cpp: >+ > 2021-01-22 Youenn Fablet <youenn@apple.com> > > Validate ItemHandles when decoding them in GPUProcess >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 97890eb5ccaa1288a1dc65c8759d5df5bca09a09..352b1f7ed8d198fd0b29e47efa7a5a2393f79bbf 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,23 @@ >+2021-01-22 Kimmo Kinnunen <kkinnunen@apple.com> >+ >+ WebGL power preference and discrete/internal gpu selection implemented incorrectly with ANGLE >+ https://bugs.webkit.org/show_bug.cgi?id=220843 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Move the high-performance GPU shutdown timer from individual web processes to the main class >+ in the ui process. This simplifies the implementation and reduces the number of timers. >+ >+ * UIProcess/mac/HighPerformanceGPUManager.h: >+ * UIProcess/mac/HighPerformanceGPUManager.mm: >+ (WebKit::HighPerformanceGPUManager::HighPerformanceGPUManager): >+ (WebKit::HighPerformanceGPUManager::removeProcessRequiringHighPerformance): >+ (WebKit::HighPerformanceGPUManager::updateState): >+ * WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.cpp: >+ (WebKit::WebSwitchingGPUClient::requestHighPerformanceGPU): >+ (WebKit::WebSwitchingGPUClient::releaseHighPerformanceGPU): >+ * WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h: >+ > 2021-01-21 Peng Liu <peng.liu6@apple.com> > > PiP video subtitles stop updating when Safari is backgrounded >diff --git a/Source/WebCore/PlatformMac.cmake b/Source/WebCore/PlatformMac.cmake >index ac7015499799e4fb4ee2a0de01b43512b09a1f8e..cad26449c74c85cacb965b39c8fb752901fca6f1 100644 >--- a/Source/WebCore/PlatformMac.cmake >+++ b/Source/WebCore/PlatformMac.cmake >@@ -340,6 +340,7 @@ list(APPEND WebCore_SOURCES > platform/graphics/mac/FloatPointMac.mm > platform/graphics/mac/FloatSizeMac.mm > platform/graphics/mac/FontCustomPlatformData.cpp >+ platform/graphics/mac/GraphicsChecksMac.cpp > platform/graphics/mac/IconMac.mm > platform/graphics/mac/ImageMac.mm > platform/graphics/mac/IntPointMac.mm >diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt >index 3be1758cd875539ac7d2c6daa078f0cb302c8713..e87d4dd079a55f69d2173bdf112c2ef9f9a6ec44 100644 >--- a/Source/WebCore/SourcesCocoa.txt >+++ b/Source/WebCore/SourcesCocoa.txt >@@ -418,6 +418,7 @@ platform/graphics/mac/DisplayRefreshMonitorMac.cpp > platform/graphics/mac/FloatPointMac.mm > platform/graphics/mac/FloatSizeMac.mm > platform/graphics/mac/FontCustomPlatformData.cpp >+platform/graphics/mac/GraphicsChecksMac.cpp > platform/graphics/mac/IconMac.mm > platform/graphics/mac/ImageMac.mm > platform/graphics/mac/IntPointMac.mm >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index c8380e1b56a88592f394b7f638e38ae3cf58947c..bf65bda3991e60dd19f6fde789af280d4eaf6087 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2259,6 +2259,9 @@ > 7B90417025501142006EEB8C /* RemoteGraphicsContextGLProxyBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B90416E25501109006EEB8C /* RemoteGraphicsContextGLProxyBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7BB34A1725345CB200029D08 /* GraphicsContextGLANGLEUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB34A1625345CB200029D08 /* GraphicsContextGLANGLEUtilities.h */; }; > 7BB34A48253776CA00029D08 /* GraphicsContextGLImageExtractor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB34A45253776C600029D08 /* GraphicsContextGLImageExtractor.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 7BB680B225BA0D4A002B8738 /* ScopedHighPerformanceGPURequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB680B025BA0D4A002B8738 /* ScopedHighPerformanceGPURequest.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 7BB680B625BA1AE2002B8738 /* ScopedHighPerformanceGPURequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB680B425BA1AE1002B8738 /* ScopedHighPerformanceGPURequest.h */; }; >+ 7BB680BA25BA1BE4002B8738 /* GraphicsChecksMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB680B825BA1BE4002B8738 /* GraphicsChecksMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7BE7427381FA906FBB4F0F2C /* JSSVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 950C4C02BED8936F818E2F99 /* JSSVGGraphicsElement.h */; }; > 7C029C6E2493C8F800268204 /* ColorTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C029C6D2493C8F800268204 /* ColorTypes.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7C1843FE1C8B7283002EB973 /* Autofill.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1843FC1C8B7283002EB973 /* Autofill.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -10294,6 +10297,10 @@ > 7BB34A1625345CB200029D08 /* GraphicsContextGLANGLEUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLANGLEUtilities.h; sourceTree = "<group>"; }; > 7BB34A45253776C600029D08 /* GraphicsContextGLImageExtractor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLImageExtractor.h; sourceTree = "<group>"; }; > 7BB34A47253776C700029D08 /* GraphicsContextGLImageExtractor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLImageExtractor.cpp; sourceTree = "<group>"; }; >+ 7BB680B025BA0D4A002B8738 /* ScopedHighPerformanceGPURequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScopedHighPerformanceGPURequest.h; sourceTree = "<group>"; }; >+ 7BB680B425BA1AE1002B8738 /* ScopedHighPerformanceGPURequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScopedHighPerformanceGPURequest.h; sourceTree = "<group>"; }; >+ 7BB680B725BA1BE3002B8738 /* GraphicsChecksMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsChecksMac.cpp; sourceTree = "<group>"; }; >+ 7BB680B825BA1BE4002B8738 /* GraphicsChecksMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsChecksMac.h; sourceTree = "<group>"; }; > 7BE7265B25763B8D00E85D98 /* RemoteGraphicsContextGLProxyBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteGraphicsContextGLProxyBase.cpp; sourceTree = "<group>"; }; > 7C011F3D24FAD360005BEF10 /* Settings.cpp.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = Settings.cpp.erb; sourceTree = "<group>"; }; > 7C011F3E24FAD360005BEF10 /* InternalSettingsGenerated.cpp.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = InternalSettingsGenerated.cpp.erb; sourceTree = "<group>"; }; >@@ -26496,11 +26503,15 @@ > B275354D0B053814002CE64F /* FloatSizeMac.mm */, > B2AFFC750D00A5C10030074D /* FontCustomPlatformData.cpp */, > B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */, >+ 7BB680B725BA1BE3002B8738 /* GraphicsChecksMac.cpp */, >+ 7BB680B825BA1BE4002B8738 /* GraphicsChecksMac.h */, > B275358D0B053A66002CE64F /* IconMac.mm */, > B275354E0B053814002CE64F /* ImageMac.mm */, > B275354F0B053814002CE64F /* IntPointMac.mm */, > B27535510B053814002CE64F /* IntSizeMac.mm */, > 2D6E468217D660F500ECF8BB /* PDFDocumentImageMac.mm */, >+ 7BB680B425BA1AE1002B8738 /* ScopedHighPerformanceGPURequest.h */, >+ 7BB680B025BA0D4A002B8738 /* ScopedHighPerformanceGPURequest.h */, > 163E88F5118A39D200ED9231 /* SimpleFontDataCoreText.cpp */, > C11A9ED22140578B00CFB20A /* SwitchingGPUClient.cpp */, > C11A9ECD21403A5C00CFB20A /* SwitchingGPUClient.h */, >@@ -32233,6 +32244,7 @@ > BC53C5F50DA56B920021EB5D /* Gradient.h in Headers */, > B22279640D00BF220071B782 /* GradientAttributes.h in Headers */, > 2D481F04146B5C6B00AA7834 /* GradientImage.h in Headers */, >+ 7BB680BA25BA1BE4002B8738 /* GraphicsChecksMac.h in Headers */, > B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */, > 934907E4125BBBC8007F23A0 /* GraphicsContextCG.h in Headers */, > 313DE87023A96973008FC47B /* GraphicsContextGL.h in Headers */, >@@ -34455,6 +34467,8 @@ > 49E911CB0EF86D47009D0CAF /* ScaleTransformOperation.h in Headers */, > 5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */, > 9BD0BF9312A42BF50072FD43 /* ScopedEventQueue.h in Headers */, >+ 7BB680B625BA1AE2002B8738 /* ScopedHighPerformanceGPURequest.h in Headers */, >+ 7BB680B225BA0D4A002B8738 /* ScopedHighPerformanceGPURequest.h in Headers */, > BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */, > C1E1D236203DF15400584665 /* ScreenProperties.h in Headers */, > A84D82C111D3474800972990 /* ScriptableDocumentParser.h in Headers */, >diff --git a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >index 578e02180c46f3dbc4fffd0af0c353f394820dbe..e77d80a852fb5ac5dd71ce3f97ccf666461ce56b 100644 >--- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >+++ b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >@@ -642,7 +642,7 @@ private: > > static bool isHighPerformanceContext(const RefPtr<GraphicsContextGL>& context) > { >- return context->powerPreferenceUsedForCreation() == WebGLPowerPreference::HighPerformance; >+ return context->contextAttributes().powerPreference == WebGLPowerPreference::HighPerformance; > } > > std::unique_ptr<WebGLRenderingContextBase> WebGLRenderingContextBase::create(CanvasBase& canvas, WebGLContextAttributes& attributes, WebGLVersion type) >diff --git a/Source/WebCore/page/Chrome.cpp b/Source/WebCore/page/Chrome.cpp >index b710e715a66dcac56742db6bbea741d6f86342b3..4a55f9da1c5b51f6c24a0b0e5c5c6fbb3f549c50 100644 >--- a/Source/WebCore/page/Chrome.cpp >+++ b/Source/WebCore/page/Chrome.cpp >@@ -67,10 +67,6 @@ > #include "DateTimeChooser.h" > #endif > >-#if PLATFORM(MAC) && ENABLE(WEBGL) >-#include "GraphicsContextGLOpenGLManager.h" >-#endif >- > namespace WebCore { > > using namespace HTMLNames; >@@ -548,10 +544,6 @@ void Chrome::windowScreenDidChange(PlatformDisplayID displayID, Optional<unsigne > return; > > m_page.windowScreenDidChange(displayID, nominalFrameInterval); >- >-#if PLATFORM(MAC) && ENABLE(WEBGL) >- GraphicsContextGLOpenGLManager::sharedManager().screenDidChange(displayID, this); >-#endif > } > > bool Chrome::selectItemWritingDirectionIsNatural() >diff --git a/Source/WebCore/platform/graphics/GraphicsContextGL.h b/Source/WebCore/platform/graphics/GraphicsContextGL.h >index a30cee5fab64792acb8c45e1ee50e00cd22c2df4..2ad147f6eab94cf3bdf03bc6fdc2117d4ae00504 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContextGL.h >+++ b/Source/WebCore/platform/graphics/GraphicsContextGL.h >@@ -1263,8 +1263,6 @@ public: > > virtual void setContextVisibility(bool) = 0; > >- virtual GraphicsContextGLPowerPreference powerPreferenceUsedForCreation() const = 0; >- > virtual bool isGLES2Compliant() const = 0; > > // Synthesizes an OpenGL error which will be returned from a >diff --git a/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp >index 552d8539b69500cf1169680d4b5c6285858b7737..e50f8fb4c5c3670461c81345e44373c6a4da12aa 100644 >--- a/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp >+++ b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp >@@ -49,12 +49,6 @@ void RemoteGraphicsContextGLProxyBase::setContextVisibility(bool) > notImplemented(); > } > >-GraphicsContextGLPowerPreference RemoteGraphicsContextGLProxyBase::powerPreferenceUsedForCreation() const >-{ >- notImplemented(); >- return { }; >-} >- > bool RemoteGraphicsContextGLProxyBase::isGLES2Compliant() const > { > #if ENABLE(WEBGL2) >diff --git a/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h >index 2471d4e25c9aa200ec743b1fe0c6468b0c9a5083..288c2ea8ad39e89b6969fd0b216b8b67b0beda33 100644 >--- a/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h >+++ b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h >@@ -61,7 +61,6 @@ public: > PlatformLayer* platformLayer() const final; > ExtensionsGL& getExtensions() final; > void setContextVisibility(bool) final; >- GraphicsContextGLPowerPreference powerPreferenceUsedForCreation() const final; > bool isGLES2Compliant() const final; > void markContextChanged() final; > bool layerComposited() const final; >diff --git a/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm >index 659ffff1284c02a223221206eb8f16f2a812b5ac..6a30d986abf60869648e74581a70b9cbf821f5b5 100644 >--- a/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm >+++ b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm >@@ -20,7 +20,7 @@ > * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY > * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > #import "config.h" >@@ -32,9 +32,7 @@ > #import "GraphicsContextGLANGLEUtilities.h" > #import "GraphicsContextGLIOSurfaceSwapChain.h" > #import "GraphicsContextGLOpenGLManager.h" >-#import "HostWindow.h" > #import "Logging.h" >-#import "OpenGLSoftLinkCocoa.h" > #import "RuntimeApplicationChecks.h" > #import "WebCoreThread.h" > #import "WebGLLayer.h" >@@ -42,11 +40,6 @@ > #import <wtf/BlockObjCExceptions.h> > #import <wtf/text/CString.h> > >-#if PLATFORM(MAC) >-#import "ScreenProperties.h" >-#import <OpenGL/CGLRenderers.h> >-#endif >- > #if ENABLE(VIDEO) && USE(AVFOUNDATION) > #include "GraphicsContextGLCV.h" > #endif >@@ -151,17 +144,17 @@ RefPtr<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::create(GraphicsContextG > if (!context->m_contextObj) > return nullptr; > >- GraphicsContextGLOpenGLManager::sharedManager().addContext(context.get(), hostWindow); >+ GraphicsContextGLOpenGLManager::sharedManager().addContext(context.get()); > > return context; > } > > Ref<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::createShared(GraphicsContextGLOpenGL& sharedContext) > { >- auto hostWindow = GraphicsContextGLOpenGLManager::sharedManager().hostWindowForContext(&sharedContext); >- auto context = adoptRef(*new GraphicsContextGLOpenGL(sharedContext.contextAttributes(), hostWindow, &sharedContext, nullptr)); > >- GraphicsContextGLOpenGLManager::sharedManager().addContext(context.ptr(), hostWindow); >+ auto context = adoptRef(*new GraphicsContextGLOpenGL(sharedContext.contextAttributes(), nullptr, &sharedContext, nullptr)); >+ >+ GraphicsContextGLOpenGLManager::sharedManager().addContext(context.ptr()); > > return context; > } >@@ -171,72 +164,14 @@ Ref<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::createForGPUProcess(const > return adoptRef(*new GraphicsContextGLOpenGL(attrs, nullptr, nullptr, swapChain)); > } > >-#if PLATFORM(MAC) // FIXME: This probably should be just enabled - see <rdar://53062794>. >- >-static void setGPUByRegistryID(CGLContextObj contextObj, CGLPixelFormatObj pixelFormatObj, IORegistryGPUID preferredGPUID) >-{ >- // When the WebProcess does not have access to the WindowServer, there is no way for OpenGL to tell which GPU is connected to a display. >- // On 10.13+, find the virtual screen that corresponds to the preferred GPU by its registryID. >- // CGLSetVirtualScreen can then be used to tell OpenGL which GPU it should be using. >- >- if (!contextObj || !preferredGPUID) >- return; >- >- GLint virtualScreenCount = 0; >- CGLError error = CGLDescribePixelFormat(pixelFormatObj, 0, kCGLPFAVirtualScreenCount, &virtualScreenCount); >- ASSERT(error == kCGLNoError); >- >- GLint firstAcceleratedScreen = -1; >- >- for (GLint virtualScreen = 0; virtualScreen < virtualScreenCount; ++virtualScreen) { >- GLint displayMask = 0; >- error = CGLDescribePixelFormat(pixelFormatObj, virtualScreen, kCGLPFADisplayMask, &displayMask); >- ASSERT(error == kCGLNoError); >- >- auto gpuID = gpuIDForDisplayMask(displayMask); >- >- if (gpuID == preferredGPUID) { >- error = CGLSetVirtualScreen(contextObj, virtualScreen); >- ASSERT(error == kCGLNoError); >- LOG(WebGL, "Context (%p) set to GPU with ID: (%lld).", contextObj, gpuID); >- return; >- } >- >- if (firstAcceleratedScreen < 0) { >- GLint isAccelerated = 0; >- error = CGLDescribePixelFormat(pixelFormatObj, virtualScreen, kCGLPFAAccelerated, &isAccelerated); >- ASSERT(error == kCGLNoError); >- if (isAccelerated) >- firstAcceleratedScreen = virtualScreen; >- } >- } >- >- // No registryID match found; set to first hardware-accelerated virtual screen. >- if (firstAcceleratedScreen >= 0) { >- error = CGLSetVirtualScreen(contextObj, firstAcceleratedScreen); >- ASSERT(error == kCGLNoError); >- LOG(WebGL, "RegistryID (%lld) not matched; Context (%p) set to virtual screen (%d).", preferredGPUID, contextObj, firstAcceleratedScreen); >- } >-} >- >-#endif // PLATFORM(MAC) >- >-GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attrs, HostWindow* hostWindow, GraphicsContextGLOpenGL* sharedContext, GraphicsContextGLIOSurfaceSwapChain* swapChain) >+GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attrs, HostWindow*, GraphicsContextGLOpenGL* sharedContext, GraphicsContextGLIOSurfaceSwapChain* swapChain) > : GraphicsContextGL(attrs, Destination::Offscreen, sharedContext) > { > m_isForWebGL2 = attrs.webGLVersion == GraphicsContextGLWebGLVersion::WebGL2; > >-#if HAVE(APPLE_GRAPHICS_CONTROL) >- m_powerPreferenceUsedForCreation = (hasLowAndHighPowerGPUs() && attrs.powerPreference == GraphicsContextGLPowerPreference::HighPerformance) ? GraphicsContextGLPowerPreference::HighPerformance : GraphicsContextGLPowerPreference::Default; >-#else >- m_powerPreferenceUsedForCreation = GraphicsContextGLPowerPreference::Default; >-#endif >- > m_displayObj = InitializeEGLDisplay(attrs); > if (m_displayObj == EGL_NO_DISPLAY) > return; >- const char *displayExtensions = EGL_QueryString(m_displayObj, EGL_EXTENSIONS); >- LOG(WebGL, "Extensions: %s", displayExtensions); > > EGLint configAttributes[] = { > EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, >@@ -290,11 +225,16 @@ GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes att > eglContextAttributes.append(EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM); > eglContextAttributes.append(EGL_FALSE); > >- if (strstr(displayExtensions, "EGL_ANGLE_power_preference")) { >- eglContextAttributes.append(EGL_POWER_PREFERENCE_ANGLE); >- // EGL_LOW_POWER_ANGLE is the default. Change to >- // EGL_HIGH_POWER_ANGLE if desired. >- eglContextAttributes.append(EGL_LOW_POWER_ANGLE); >+ bool supportsPowerPreference = false; >+#if PLATFORM(MAC) >+ const char *displayExtensions = EGL_QueryString(m_displayObj, EGL_EXTENSIONS); >+ m_supportsPowerPreference = strstr(displayExtensions, "EGL_ANGLE_power_preference"); >+ supportsPowerPreference = m_supportsPowerPreference; >+#endif >+ if (!supportsPowerPreference) { >+ auto attrs = contextAttributes(); >+ attrs.powerPreference = GraphicsContextGLPowerPreference::Default; >+ setContextAttributes(attrs); > } > eglContextAttributes.append(EGL_NONE); > >@@ -332,21 +272,6 @@ GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes att > } > extensions.ensureEnabled(extension); > } >-#if PLATFORM(MAC) >- // FIXME: It's unclear if MACCATALYST should take these steps as well, but that >- // would require the PlatformScreenMac code to be exposed to Catalyst too. >- EGLDeviceEXT device = nullptr; >- EGL_QueryDisplayAttribEXT(m_displayObj, EGL_DEVICE_EXT, reinterpret_cast<EGLAttrib*>(&device)); >- CGLContextObj cglContext = nullptr; >- CGLPixelFormatObj pixelFormat = nullptr; >- EGL_QueryDeviceAttribEXT(device, EGL_CGL_CONTEXT_ANGLE, reinterpret_cast<EGLAttrib*>(&cglContext)); >- EGL_QueryDeviceAttribEXT(device, EGL_CGL_PIXEL_FORMAT_ANGLE, reinterpret_cast<EGLAttrib*>(&pixelFormat)); >- auto gpuID = (hostWindow && hostWindow->displayID()) ? gpuIDForDisplay(hostWindow->displayID()) : primaryGPUID(); >- setGPUByRegistryID(cglContext, pixelFormat, gpuID); >-#else >- UNUSED_PARAM(hostWindow); >-#endif >- > validateAttributes(); > attrs = contextAttributes(); // They may have changed during validation. > >@@ -561,28 +486,25 @@ void GraphicsContextGLOpenGL::checkGPUStatus() > > void GraphicsContextGLOpenGL::setContextVisibility(bool isVisible) > { >- if (m_powerPreferenceUsedForCreation == GraphicsContextGLPowerPreference::HighPerformance) { >- if (isVisible) >- GraphicsContextGLOpenGLManager::sharedManager().addContextRequiringHighPerformance(this); >- else >- GraphicsContextGLOpenGLManager::sharedManager().removeContextRequiringHighPerformance(this); >- } >+#if PLATFORM(MAC) >+ if (contextAttributes().powerPreference != GraphicsContextGLPowerPreference::HighPerformance) >+ return; >+ if (isVisible) >+ m_highPerformanceGPURequest = ScopedHighPerformanceGPURequest::acquire(); >+ else >+ m_highPerformanceGPURequest = { }; >+#else >+ UNUSED_PARAM(isVisible); >+#endif > } > > #if PLATFORM(MAC) >-void GraphicsContextGLOpenGL::updateCGLContext() >+void GraphicsContextGLOpenGL::displayWasReconfigured() > { >- if (!makeContextCurrent()) >+ if (!m_supportsPowerPreference) > return; >- LOG(WebGL, "Detected a mux switch or display reconfiguration. Call CGLUpdateContext. (%p)", this); >- >- EGLDeviceEXT device = nullptr; >- EGL_QueryDisplayAttribEXT(m_displayObj, EGL_DEVICE_EXT, reinterpret_cast<EGLAttrib*>(&device)); >- CGLContextObj cglContext = nullptr; >- EGL_QueryDeviceAttribEXT(device, EGL_CGL_CONTEXT_ANGLE, reinterpret_cast<EGLAttrib*>(&cglContext)); >- >- CGLUpdateContext(cglContext); >- m_hasSwitchedToHighPerformanceGPU = true; >+ EGL_HandleGPUSwitchANGLE(m_displayObj); >+ dispatchContextChangedNotification(); > } > #endif > >@@ -654,50 +576,8 @@ bool GraphicsContextGLOpenGL::isGLES2Compliant() const > > void GraphicsContextGLOpenGL::simulateContextChanged() > { >- GraphicsContextGLOpenGLManager::sharedManager().updateAllContexts(); >-} >- >-bool GraphicsContextGLOpenGL::allowOfflineRenderers() const >-{ >-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) >- // When WindowServer access is blocked in the WebProcess, there is no way >- // for OpenGL to decide which GPU is connected to a display (online/offline). >- // OpenGL will then consider all GPUs, or renderers, as offline, which means >- // all offline renderers need to be considered when finding a pixel format. >- // In WebKit legacy, there will still be a WindwServer connection, and >- // m_displayMask will not be set in this case. >- if (primaryOpenGLDisplayMask()) >- return true; >-#elif PLATFORM(MACCATALYST) >- // FIXME: <rdar://53062794> We're very inconsistent about WEBPROCESS_WINDOWSERVER_BLOCKING >- // and MAC/MACCATALYST and OPENGL/OPENGLES. >- return true; >-#endif >- >-#if HAVE(APPLE_GRAPHICS_CONTROL) >- if (hasLowAndHighPowerGPUs()) >- return true; >-#endif >- >- return false; >-} >- >-#if PLATFORM(MAC) >-void GraphicsContextGLOpenGL::screenDidChange(PlatformDisplayID displayID) >-{ >- if (!m_contextObj) >- return; >- if (!m_hasSwitchedToHighPerformanceGPU) { >- EGLDeviceEXT device = nullptr; >- EGL_QueryDisplayAttribEXT(m_displayObj, EGL_DEVICE_EXT, reinterpret_cast<EGLAttrib*>(&device)); >- CGLContextObj cglContext = nullptr; >- CGLPixelFormatObj pixelFormat = nullptr; >- EGL_QueryDeviceAttribEXT(device, EGL_CGL_CONTEXT_ANGLE, reinterpret_cast<EGLAttrib*>(&cglContext)); >- EGL_QueryDeviceAttribEXT(device, EGL_CGL_PIXEL_FORMAT_ANGLE, reinterpret_cast<EGLAttrib*>(&pixelFormat)); >- setGPUByRegistryID(cglContext, pixelFormat, gpuIDForDisplay(displayID)); >- } >+ GraphicsContextGLOpenGLManager::sharedManager().displayWasReconfigured(); > } >-#endif // !PLATFORM(MAC) > > void GraphicsContextGLOpenGL::prepareForDisplay() > { >diff --git a/Source/WebCore/platform/graphics/mac/GraphicsChecksMac.cpp b/Source/WebCore/platform/graphics/mac/GraphicsChecksMac.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..74565d00f3eb31820e98c063b6d89a83c5da0666 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/mac/GraphicsChecksMac.cpp >@@ -0,0 +1,120 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "GraphicsChecksMac.h" >+ >+#if PLATFORM(MAC) >+ >+#if HAVE(APPLE_GRAPHICS_CONTROL) >+#include <sys/sysctl.h> >+#endif >+ >+namespace WebCore { >+ >+#if HAVE(APPLE_GRAPHICS_CONTROL) >+ >+enum { >+ kAGCOpen, >+ kAGCClose >+}; >+ >+static io_connect_t attachToAppleGraphicsControl() >+{ >+ mach_port_t masterPort = MACH_PORT_NULL; >+ >+ if (IOMasterPort(MACH_PORT_NULL, &masterPort) != KERN_SUCCESS) >+ return MACH_PORT_NULL; >+ >+ CFDictionaryRef classToMatch = IOServiceMatching("AppleGraphicsControl"); >+ if (!classToMatch) >+ return MACH_PORT_NULL; >+ >+ kern_return_t kernResult; >+ io_iterator_t iterator; >+ if ((kernResult = IOServiceGetMatchingServices(masterPort, classToMatch, &iterator)) != KERN_SUCCESS) >+ return MACH_PORT_NULL; >+ >+ io_service_t serviceObject = IOIteratorNext(iterator); >+ IOObjectRelease(iterator); >+ if (!serviceObject) >+ return MACH_PORT_NULL; >+ >+ io_connect_t dataPort; >+ IOObjectRetain(serviceObject); >+ kernResult = IOServiceOpen(serviceObject, mach_task_self(), 0, &dataPort); >+ IOObjectRelease(serviceObject); >+ >+ return (kernResult == KERN_SUCCESS) ? dataPort : MACH_PORT_NULL; >+} >+ >+static bool hasMuxCapability() >+{ >+ io_connect_t dataPort = attachToAppleGraphicsControl(); >+ >+ if (dataPort == MACH_PORT_NULL) >+ return false; >+ >+ bool result; >+ if (IOConnectCallScalarMethod(dataPort, kAGCOpen, nullptr, 0, nullptr, nullptr) == KERN_SUCCESS) { >+ IOConnectCallScalarMethod(dataPort, kAGCClose, nullptr, 0, nullptr, nullptr); >+ result = true; >+ } else >+ result = false; >+ >+ IOServiceClose(dataPort); >+ >+ if (result) { >+ // This is detecting Mac hardware with an Intel g575 GPU, which >+ // we don't want to make available to muxing. >+ // Based on information from Apple's OpenGL team, such devices >+ // have four or fewer processors. >+ // <rdar://problem/30060378> >+ int names[2] = { CTL_HW, HW_NCPU }; >+ int cpuCount; >+ size_t cpuCountLength = sizeof(cpuCount); >+ sysctl(names, 2, &cpuCount, &cpuCountLength, nullptr, 0); >+ result = cpuCount > 4; >+ } >+ >+ return result; >+} >+ >+#endif // HAVE(APPLE_GRAPHICS_CONTROL) >+ >+bool hasLowAndHighPowerGPUs() >+{ >+#if HAVE(APPLE_GRAPHICS_CONTROL) >+ static bool canMux = hasMuxCapability(); >+ return canMux; >+#else >+ return false; >+#endif >+} >+ >+} >+ >+#endif >+ >diff --git a/Source/WebCore/platform/graphics/mac/GraphicsChecksMac.h b/Source/WebCore/platform/graphics/mac/GraphicsChecksMac.h >new file mode 100644 >index 0000000000000000000000000000000000000000..2bc5b79832e0e09121b924c56a5bacf197361e2b >--- /dev/null >+++ b/Source/WebCore/platform/graphics/mac/GraphicsChecksMac.h >@@ -0,0 +1,32 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+namespace WebCore { >+ >+WEBCORE_EXPORT bool hasLowAndHighPowerGPUs(); >+ >+} >diff --git a/Source/WebCore/platform/graphics/mac/ScopedHighPerformanceGPURequest.h b/Source/WebCore/platform/graphics/mac/ScopedHighPerformanceGPURequest.h >new file mode 100644 >index 0000000000000000000000000000000000000000..4c21fd794019a31a8057344f2da2dc4baae128e7 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/mac/ScopedHighPerformanceGPURequest.h >@@ -0,0 +1,71 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "GraphicsChecksMac.h" >+#include "SwitchingGPUClient.h" >+ >+namespace WebCore { >+ >+class ScopedHighPerformanceGPURequest { >+public: >+ ScopedHighPerformanceGPURequest() = default; >+ ScopedHighPerformanceGPURequest(ScopedHighPerformanceGPURequest&& other) >+ : m_requested(std::exchange(other.m_requested, false)) >+ { >+ } >+ ~ScopedHighPerformanceGPURequest() >+ { >+ if (!m_requested) >+ return; >+ SwitchingGPUClient::singletonIfExists()->releaseHighPerformanceGPU(); >+ } >+ ScopedHighPerformanceGPURequest& operator=(ScopedHighPerformanceGPURequest&& other) >+ { >+ if (m_requested) >+ SwitchingGPUClient::singletonIfExists()->releaseHighPerformanceGPU(); >+ m_requested = std::exchange(other.m_requested, false); >+ return *this; >+ } >+ static ScopedHighPerformanceGPURequest acquire() >+ { >+ if (!hasLowAndHighPowerGPUs()) >+ return { }; >+ auto client = SwitchingGPUClient::singletonIfExists(); >+ if (!client) >+ return { }; >+ client->requestHighPerformanceGPU(); >+ return { 0 }; >+ } >+private: >+ ScopedHighPerformanceGPURequest(int) >+ : m_requested(true) >+ { >+ } >+ bool m_requested { false }; >+}; >+ >+} >diff --git a/Source/WebCore/platform/graphics/mac/SwitchingGPUClient.h b/Source/WebCore/platform/graphics/mac/SwitchingGPUClient.h >index 499a287a45c968d833decfe533311d0ceb317078..45236781b8e108e286fde214e851a3a82b301c7a 100644 >--- a/Source/WebCore/platform/graphics/mac/SwitchingGPUClient.h >+++ b/Source/WebCore/platform/graphics/mac/SwitchingGPUClient.h >@@ -29,16 +29,16 @@ namespace WebCore { > > class SwitchingGPUClient { > public: >- WEBCORE_EXPORT static SwitchingGPUClient* singletonIfExists(); > WEBCORE_EXPORT static void setSingleton(SwitchingGPUClient&); > > virtual ~SwitchingGPUClient() = default; >- >+private: >+ WEBCORE_EXPORT static SwitchingGPUClient* singletonIfExists(); > virtual void requestHighPerformanceGPU() = 0; > virtual void releaseHighPerformanceGPU() = 0; >- >-private: >+ > static SwitchingGPUClient* m_singleton; >+ friend class ScopedHighPerformanceGPURequest; > }; > > } >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h >index f52bdd66fd0c67b125d8b511e29cf92fc2fcf5e0..f6a1a02408bad85d82f0ccc39980283d6cd6690e 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h >@@ -69,6 +69,10 @@ class GCGLLayer; > } > #endif > >+#if PLATFORM(MAC) >+#include "ScopedHighPerformanceGPURequest.h" >+#endif >+ > namespace WebCore { > class ExtensionsGL; > #if USE(ANGLE) >@@ -256,7 +260,7 @@ public: > void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final; > void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) final; > void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; >- void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final; >+ void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final; > void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; > void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) final; > >@@ -461,14 +465,12 @@ public: > void primitiveRestartIndex(GCGLuint); > #endif > >-#if PLATFORM(COCOA) && PLATFORM(MAC) >- void updateCGLContext(); >+#if PLATFORM(MAC) >+ void displayWasReconfigured(); > #endif > > void setContextVisibility(bool) final; > >- GraphicsContextGLPowerPreference powerPreferenceUsedForCreation() const final { return m_powerPreferenceUsedForCreation; } >- > // Support for buffer creation and deletion > PlatformGLObject createBuffer() final; > PlatformGLObject createFramebuffer() final; >@@ -497,11 +499,6 @@ public: > > unsigned textureSeed(GCGLuint texture) { return m_state.textureSeedCount.count(texture); } > >-#if PLATFORM(MAC) >- using PlatformDisplayID = uint32_t; >- void screenDidChange(PlatformDisplayID); >-#endif >- > void prepareForDisplay() final; > > #if ENABLE(VIDEO) && USE(AVFOUNDATION) >@@ -529,7 +526,7 @@ private: > // implementation. > void validateDepthStencil(const char* packedDepthStencilExtension); > void validateAttributes(); >- >+ > void readnPixelsImpl(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* data, bool readingToPixelBufferObject); > > // Did the most recent drawing operation leave the GPU in an acceptable state? >@@ -547,7 +544,6 @@ private: > void attachDepthAndStencilBufferIfNeeded(GCGLuint internalDepthStencilFormat, int width, int height); > > #if PLATFORM(COCOA) >- bool allowOfflineRenderers() const; > bool reshapeDisplayBufferBacking(); > bool allocateAndBindDisplayBufferBacking(); > bool bindDisplayBufferBacking(std::unique_ptr<IOSurface> backing, void* pbuffer); >@@ -583,7 +579,7 @@ private: > , isValid(false) > { > } >- >+ > ShaderSymbolMap& symbolMap(enum ANGLEShaderSymbolType symbolType) > { > ASSERT(symbolType == SHADER_SYMBOL_TYPE_ATTRIBUTE || symbolType == SHADER_SYMBOL_TYPE_UNIFORM || symbolType == SHADER_SYMBOL_TYPE_VARYING); >@@ -648,7 +644,6 @@ private: > std::unique_ptr<ExtensionsGLOpenGL> m_extensions; > #endif > >- GraphicsContextGLPowerPreference m_powerPreferenceUsedForCreation { GraphicsContextGLPowerPreference::Default }; > Vector<Vector<float>> m_vertexArray; > > #if !USE(ANGLE) >@@ -680,7 +675,7 @@ private: > > using BoundTextureMap = HashMap<GCGLenum, > std::pair<GCGLuint, GCGLenum>, >- WTF::IntHash<GCGLenum>, >+ WTF::IntHash<GCGLenum>, > WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>, > WTF::PairHashTraits<WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>> > >; >@@ -761,8 +756,10 @@ private: > // When preserveDrawingBuffer == true, this is blitted to during display prepare. > std::unique_ptr<IOSurface> m_displayBufferBacking; > void* m_displayBufferPbuffer { nullptr }; >- >- bool m_hasSwitchedToHighPerformanceGPU { false }; >+#endif >+#if PLATFORM(MAC) >+ bool m_supportsPowerPreference { false }; >+ ScopedHighPerformanceGPURequest m_highPerformanceGPURequest; > #endif > #if ENABLE(VIDEO) && USE(AVFOUNDATION) > std::unique_ptr<GraphicsContextGLCV> m_cv; >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp >index 41ab50cbef2ea64293ba0c99be8b05fc97077de6..0bf7e210b7f0fb6c7be73e5922c6af51a9b456c6 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp >@@ -31,91 +31,8 @@ > #include "GraphicsContextGLOpenGL.h" > #include "Logging.h" > >-#if HAVE(APPLE_GRAPHICS_CONTROL) >-#include <sys/sysctl.h> >-#endif >- >-#if PLATFORM(MAC) >-#include "SwitchingGPUClient.h" >-#endif >- > namespace WebCore { > >-#if HAVE(APPLE_GRAPHICS_CONTROL) >- >-enum { >- kAGCOpen, >- kAGCClose >-}; >- >-static io_connect_t attachToAppleGraphicsControl() >-{ >- mach_port_t masterPort = MACH_PORT_NULL; >- >- if (IOMasterPort(MACH_PORT_NULL, &masterPort) != KERN_SUCCESS) >- return MACH_PORT_NULL; >- >- CFDictionaryRef classToMatch = IOServiceMatching("AppleGraphicsControl"); >- if (!classToMatch) >- return MACH_PORT_NULL; >- >- kern_return_t kernResult; >- io_iterator_t iterator; >- if ((kernResult = IOServiceGetMatchingServices(masterPort, classToMatch, &iterator)) != KERN_SUCCESS) >- return MACH_PORT_NULL; >- >- io_service_t serviceObject = IOIteratorNext(iterator); >- IOObjectRelease(iterator); >- if (!serviceObject) >- return MACH_PORT_NULL; >- >- io_connect_t dataPort; >- IOObjectRetain(serviceObject); >- kernResult = IOServiceOpen(serviceObject, mach_task_self(), 0, &dataPort); >- IOObjectRelease(serviceObject); >- >- return (kernResult == KERN_SUCCESS) ? dataPort : MACH_PORT_NULL; >-} >- >-static bool hasMuxCapability() >-{ >- io_connect_t dataPort = attachToAppleGraphicsControl(); >- >- if (dataPort == MACH_PORT_NULL) >- return false; >- >- bool result; >- if (IOConnectCallScalarMethod(dataPort, kAGCOpen, nullptr, 0, nullptr, nullptr) == KERN_SUCCESS) { >- IOConnectCallScalarMethod(dataPort, kAGCClose, nullptr, 0, nullptr, nullptr); >- result = true; >- } else >- result = false; >- >- IOServiceClose(dataPort); >- >- if (result) { >- // This is detecting Mac hardware with an Intel g575 GPU, which >- // we don't want to make available to muxing. >- // Based on information from Apple's OpenGL team, such devices >- // have four or fewer processors. >- // <rdar://problem/30060378> >- int names[2] = { CTL_HW, HW_NCPU }; >- int cpuCount; >- size_t cpuCountLength = sizeof(cpuCount); >- sysctl(names, 2, &cpuCount, &cpuCountLength, nullptr, 0); >- result = cpuCount > 4; >- } >- >- return result; >-} >- >-bool hasLowAndHighPowerGPUs() >-{ >- static bool canMux = hasMuxCapability(); >- return canMux; >-} >-#endif // HAVE(APPLE_GRAPHICS_CONTROL) >- > GraphicsContextGLOpenGLManager& GraphicsContextGLOpenGLManager::sharedManager() > { > static NeverDestroyed<GraphicsContextGLOpenGLManager> s_manager; >@@ -127,33 +44,17 @@ void GraphicsContextGLOpenGLManager::displayWasReconfigured(CGDirectDisplayID, C > { > LOG(WebGL, "GraphicsContextGLOpenGLManager::displayWasReconfigured"); > if (flags & kCGDisplaySetModeFlag) >- GraphicsContextGLOpenGLManager::sharedManager().updateAllContexts(); >-} >-#endif >- >-void GraphicsContextGLOpenGLManager::updateAllContexts() >-{ >-#if PLATFORM(MAC) >- for (const auto& context : m_contexts) { >- context->updateCGLContext(); >- context->dispatchContextChangedNotification(); >- } >-#endif >+ GraphicsContextGLOpenGLManager::sharedManager().displayWasReconfigured(); > } > >-#if PLATFORM(MAC) >-void GraphicsContextGLOpenGLManager::screenDidChange(PlatformDisplayID displayID, const HostWindow* window) >+void GraphicsContextGLOpenGLManager::displayWasReconfigured() > { >- for (const auto& contextAndWindow : m_contextWindowMap) { >- if (contextAndWindow.value == window) { >- contextAndWindow.key->screenDidChange(displayID); >- LOG(WebGL, "Changing context (%p) to display (%d).", contextAndWindow.key, displayID); >- } >- } >+ for (const auto& context : m_contexts) >+ context->displayWasReconfigured(); > } > #endif > >-void GraphicsContextGLOpenGLManager::addContext(GraphicsContextGLOpenGL* context, HostWindow* window) >+void GraphicsContextGLOpenGLManager::addContext(GraphicsContextGLOpenGL* context) > { > ASSERT(context); > if (!context) >@@ -166,7 +67,6 @@ void GraphicsContextGLOpenGLManager::addContext(GraphicsContextGLOpenGL* context > > ASSERT(!m_contexts.contains(context)); > m_contexts.append(context); >- m_contextWindowMap.set(context, window); > } > > void GraphicsContextGLOpenGLManager::removeContext(GraphicsContextGLOpenGL* context) >@@ -174,97 +74,12 @@ void GraphicsContextGLOpenGLManager::removeContext(GraphicsContextGLOpenGL* cont > if (!m_contexts.contains(context)) > return; > m_contexts.removeFirst(context); >- m_contextWindowMap.remove(context); >- removeContextRequiringHighPerformance(context); >- > #if PLATFORM(MAC) && !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) > if (!m_contexts.size()) > CGDisplayRemoveReconfigurationCallback(displayWasReconfigured, nullptr); > #endif > } > >-HostWindow* GraphicsContextGLOpenGLManager::hostWindowForContext(GraphicsContextGLOpenGL* context) const >-{ >- ASSERT(m_contextWindowMap.contains(context)); >- return m_contextWindowMap.get(context); >-} >- >-void GraphicsContextGLOpenGLManager::addContextRequiringHighPerformance(GraphicsContextGLOpenGL* context) >-{ >- ASSERT(context); >- if (!context) >- return; >- >- ASSERT(m_contexts.contains(context)); >- ASSERT(!m_contextsRequiringHighPerformance.contains(context)); >- >- LOG(WebGL, "This context (%p) requires the high-performance GPU.", context); >- m_contextsRequiringHighPerformance.add(context); >- >- updateHighPerformanceState(); >-} >- >-void GraphicsContextGLOpenGLManager::removeContextRequiringHighPerformance(GraphicsContextGLOpenGL* context) >-{ >- if (!context) >- return; >- >- if (!m_contextsRequiringHighPerformance.contains(context)) >- return; >- >- LOG(WebGL, "This context (%p) no longer requires the high-performance GPU.", context); >- m_contextsRequiringHighPerformance.remove(context); >- >- updateHighPerformanceState(); >-} >- >-void GraphicsContextGLOpenGLManager::updateHighPerformanceState() >-{ >-#if PLATFORM(MAC) >- if (!hasLowAndHighPowerGPUs()) >- return; >- >- if (m_contextsRequiringHighPerformance.size()) { >- >- if (m_disableHighPerformanceGPUTimer.isActive()) { >- LOG(WebGL, "Cancel pending timer for turning off high-performance GPU."); >- m_disableHighPerformanceGPUTimer.stop(); >- } >- >- if (!m_requestingHighPerformance) { >- LOG(WebGL, "Request the high-performance GPU."); >- m_requestingHighPerformance = true; >- if (auto* singleton = SwitchingGPUClient::singletonIfExists()) >- singleton->requestHighPerformanceGPU(); >- } >- >- } else { >- // Don't immediately turn off the high-performance GPU. The user might be >- // swapping back and forth between tabs or windows, and we don't want to cause >- // churn if we can avoid it. >- if (!m_disableHighPerformanceGPUTimer.isActive()) { >- LOG(WebGL, "Set a timer to release the high-performance GPU."); >- // FIXME: Expose this value as a Setting, which would require this class >- // to reference a frame, page or document. >- static const Seconds timeToKeepHighPerformanceGPUAlive { 10_s }; >- m_disableHighPerformanceGPUTimer.startOneShot(timeToKeepHighPerformanceGPUAlive); >- } >- } >-#endif >-} >- >-void GraphicsContextGLOpenGLManager::disableHighPerformanceGPUTimerFired() >-{ >- if (m_contextsRequiringHighPerformance.size()) >- return; >- >- m_requestingHighPerformance = false; >-#if PLATFORM(MAC) >- if (auto* singleton = SwitchingGPUClient::singletonIfExists()) >- singleton->releaseHighPerformanceGPU(); >-#endif >-} >- > void GraphicsContextGLOpenGLManager::recycleContextIfNecessary() > { > if (hasTooManyContexts()) { >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.h b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.h >index 3af8a052ae8e2a15d5c051784fb08545ee9a1d64..c01076cdaab2103e8eb1c386be7601009f771ad5 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.h >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.h >@@ -25,8 +25,6 @@ > > #pragma once > >-#include "Timer.h" >-#include <wtf/HashMap.h> > #include <wtf/HashSet.h> > > #if PLATFORM(MAC) >@@ -38,52 +36,27 @@ namespace WebCore { > const unsigned MaxContexts = 16; > > class GraphicsContextGLOpenGL; >-class HostWindow; >- >-using PlatformDisplayID = uint32_t; >- >-#if HAVE(APPLE_GRAPHICS_CONTROL) >-WEBCORE_EXPORT bool hasLowAndHighPowerGPUs(); >-#endif > > class GraphicsContextGLOpenGLManager { > friend NeverDestroyed<GraphicsContextGLOpenGLManager>; > public: > static GraphicsContextGLOpenGLManager& sharedManager(); > >- void addContext(GraphicsContextGLOpenGL*, HostWindow*); >+ void addContext(GraphicsContextGLOpenGL*); > void removeContext(GraphicsContextGLOpenGL*); >- >- HostWindow* hostWindowForContext(GraphicsContextGLOpenGL*) const; >- >- void addContextRequiringHighPerformance(GraphicsContextGLOpenGL*); >- void removeContextRequiringHighPerformance(GraphicsContextGLOpenGL*); > > void recycleContextIfNecessary(); > bool hasTooManyContexts() const { return m_contexts.size() >= MaxContexts; } > >- void updateAllContexts(); >- > #if PLATFORM(MAC) >- void screenDidChange(PlatformDisplayID, const HostWindow*); > WEBCORE_EXPORT static void displayWasReconfigured(CGDirectDisplayID, CGDisplayChangeSummaryFlags, void*); >+ void displayWasReconfigured(); > #endif > > private: >- GraphicsContextGLOpenGLManager() >- : m_disableHighPerformanceGPUTimer(*this, &GraphicsContextGLOpenGLManager::disableHighPerformanceGPUTimerFired) >- { >- } >- >- void updateHighPerformanceState(); >- void disableHighPerformanceGPUTimerFired(); >+ GraphicsContextGLOpenGLManager() = default; > > Vector<GraphicsContextGLOpenGL*> m_contexts; >- HashMap<GraphicsContextGLOpenGL*, HostWindow*> m_contextWindowMap; >- HashSet<GraphicsContextGLOpenGL*> m_contextsRequiringHighPerformance; >- >- Timer m_disableHighPerformanceGPUTimer; >- bool m_requestingHighPerformance { false }; > }; > > } >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index fe720e935ee9f32acc7d8d8ecb5f531acb1d9f21..1f951b7e94ef7ae4408f45b1bb156a0d357a4ab2 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -320,7 +320,7 @@ > #endif > > #if PLATFORM(MAC) >-#include "GraphicsContextGLOpenGLManager.h" >+#include "GraphicsChecksMac.h" > #include "NSScrollerImpDetails.h" > #include "ScrollbarThemeMac.h" > #endif >diff --git a/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.h b/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.h >index 5556cbd44f0f547cd65d3de41e52065f893d3aae..ac62193acfd5c2b642a575af347f5e52e02fe65e 100644 >--- a/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.h >+++ b/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.h >@@ -28,6 +28,7 @@ > #if PLATFORM(MAC) > > #include <OpenGL/CGLTypes.h> >+#include <WebCore/Timer.h> > #include <wtf/HashSet.h> > #include <wtf/NeverDestroyed.h> > >@@ -44,13 +45,13 @@ public: > void removeProcessRequiringHighPerformance(WebProcessProxy*); > > private: >- HighPerformanceGPUManager() = default; >+ HighPerformanceGPUManager(); > ~HighPerformanceGPUManager(); >- > void updateState(); > > HashSet<WebProcessProxy*> m_processesRequiringHighPerformance; > CGLPixelFormatObj m_pixelFormatObj { nullptr }; >+ WebCore::Timer m_updateStateTimer; > }; > > } >diff --git a/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.mm b/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.mm >index a96fc3d113798e79afc0fdb6265fddafd03d0ae0..59dff8b23c80c0265bee519f846073884f615c99 100644 >--- a/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.mm >+++ b/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.mm >@@ -29,7 +29,7 @@ > #if PLATFORM(MAC) > > #include "Logging.h" >-#include <WebCore/GraphicsContextGLOpenGLManager.h> >+#include <WebCore/GraphicsChecksMac.h> > #include <WebCore/OpenGLSoftLinkCocoa.h> > > namespace WebKit { >@@ -44,6 +44,13 @@ HighPerformanceGPUManager& HighPerformanceGPUManager::singleton() > return sharedManager; > } > >+HighPerformanceGPUManager::HighPerformanceGPUManager() >+ : m_updateStateTimer(*this, &HighPerformanceGPUManager::updateState) >+{ >+} >+ >+HighPerformanceGPUManager::~HighPerformanceGPUManager() = default; >+ > void HighPerformanceGPUManager::addProcessRequiringHighPerformance(WebProcessProxy* process) > { > if (!WebCore::hasLowAndHighPowerGPUs()) >@@ -65,7 +72,8 @@ void HighPerformanceGPUManager::removeProcessRequiringHighPerformance(WebProcess > > if (m_processesRequiringHighPerformance.remove(process)) { > LOG(WebGL, "HighPerformanceGPUManager::removeProcessRequiringHighPerformance() - removing process %p", process); >- updateState(); >+ static const Seconds timeToKeepHighPerformanceGPUAlive { 10_s }; >+ m_updateStateTimer.startOneShot(timeToKeepHighPerformanceGPUAlive); > return; > } > >@@ -74,6 +82,8 @@ void HighPerformanceGPUManager::removeProcessRequiringHighPerformance(WebProcess > > void HighPerformanceGPUManager::updateState() > { >+ if (m_updateStateTimer.isActive()) >+ m_updateStateTimer.stop(); > if (m_processesRequiringHighPerformance.size()) { > if (!m_pixelFormatObj) { > LOG(WebGL, "HighPerformanceGPUManager - turning on high-performance GPU."); >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.cpp >index 44c6b432e7d5c5daa78d8d02ab77c790c14a934a..c1c2a2ebdc77877e17f7c19253359385daf7847e 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.cpp >@@ -43,12 +43,19 @@ WebSwitchingGPUClient& WebSwitchingGPUClient::singleton() > > void WebSwitchingGPUClient::requestHighPerformanceGPU() > { >+ m_requests++; >+ if (m_requests != 1) >+ return; > LOG(WebGL, "WebSwitchingGPUClient::requestHighPerformanceGPU() from WebProcess"); > WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessProxy::RequestHighPerformanceGPU(), 0); > } > > void WebSwitchingGPUClient::releaseHighPerformanceGPU() > { >+ ASSERT(m_requests); >+ m_requests--; >+ if (m_requests) >+ return; > LOG(WebGL, "WebSwitchingGPUClient::releaseHighPerformanceGPU() from WebProcess"); > WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessProxy::ReleaseHighPerformanceGPU(), 0); > } >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h >index 20eb2ee2571feba2da484f2187778b12940ae533..bb81d8a608ab1fda45f07ea7b38a634519e78421 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSwitchingGPUClient.h >@@ -32,9 +32,10 @@ namespace WebKit { > class WebSwitchingGPUClient : public WebCore::SwitchingGPUClient { > public: > static WebSwitchingGPUClient& singleton(); >- >+private: > void requestHighPerformanceGPU() override; > void releaseHighPerformanceGPU() override; >+ unsigned m_requests { 0 }; > }; > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 220843
:
418112
|
418114
|
418123
|
418129
|
418130
|
418138
|
418149
|
418170
|
418171
|
418375