Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GPUP WebGL spends too much time allocating IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=255860 rdar://108444431 Reviewed by Simon Fraser. Creating MachSendRight out of IOSurface guarantees that the surface is marked as in use for the lifetime of the surface. Trust this to recycle the display buffers as drawing buffers in the GPUP mode. Increase the held buffers to 3 surfaces per context. Otherwise the buffers are never recycled, rather always reallocated. The new frame is always being drawn while the previous frame is still being composited. Removes GraphicsContextGLIOSurfaceSwapChain, it is not a useful abstraction. This was used temporarily when all the OpenGL variants used the same implementation files. Renames incorrect naming "DisplayBuffer" to "DrawingBuffer". The code actually meant "current drawing buffer that will be display buffer in the future". * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLANGLE::reshapeFBOs): * Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h: * Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h: * Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::GraphicsContextGLCocoa::~GraphicsContextGLCocoa): (WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE): (WebCore::GraphicsContextGLCocoa::reshapeDrawingBuffer): (WebCore::GraphicsContextGLCocoa::setDrawingBufferColorSpace): (WebCore::GraphicsContextGLCocoa::displayBuffer): (WebCore::GraphicsContextGLCocoa::drawingBuffer): (WebCore::GraphicsContextGLCocoa::bindNextDrawingBuffer): (WebCore::GraphicsContextGLCocoa::freeDrawingBuffers): (WebCore::GraphicsContextGLCocoa::prepareForDisplay): (WebCore::GraphicsContextGLCocoa::readCompositedResults): (WebCore::GraphicsContextGLCocoa::paintCompositedResultsToVideoFrame): (WebCore::GraphicsContextGLCocoa::withDrawingBufferAsNativeImage): (WebCore::GraphicsContextGLCocoa::withDisplayBufferAsNativeImage): (WebCore::GraphicsContextGLCocoa::markDisplayBufferInUse): Deleted. (WebCore::GraphicsContextGLCocoa::reshapeDisplayBufferBacking): Deleted. (WebCore::GraphicsContextGLCocoa::allocateAndBindDisplayBufferBacking): Deleted. (WebCore::GraphicsContextGLCocoa::bindDisplayBufferBacking): Deleted. (WebCore::GraphicsContextGLANGLE::readCompositedResults): Deleted. * Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: Removed. * Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h: Removed. * Source/WebCore/platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm: * Source/WebCore/platform/graphics/gbm/GraphicsContextGLFallback.cpp: (WebCore::GraphicsContextGLFallback::reshapeDrawingBuffer): (WebCore::GraphicsContextGLFallback::reshapeDisplayBufferBacking): Deleted. * Source/WebCore/platform/graphics/gbm/GraphicsContextGLFallback.h: * Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp: (WebCore::GraphicsContextGLGBM::reshapeDrawingBuffer): (WebCore::GraphicsContextGLGBM::reshapeDisplayBufferBacking): Deleted. * Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.h: * Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp: (WebCore::GraphicsContextGLTextureMapperANGLE::reshapeDrawingBuffer): (WebCore::GraphicsContextGLTextureMapperANGLE::reshapeDisplayBufferBacking): Deleted. * Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h: * Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp: (WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay): * Tools/TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm: (TestWebKitAPI::TEST_P): Canonical link: https://commits.webkit.org/263496@main
- Loading branch information
1 parent
3bfd9bb
commit 3b9112f
Showing
18 changed files
with
153 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.