-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION (264004@main): Images MotionMark subtest shows incorrect r…
…endering on Intel https://bugs.webkit.org/show_bug.cgi?id=258560 rdar://111197581 Reviewed by Simon Fraser. ImageBufferShareableMappedIOSurfaceBitmapBackend would lock the IOSurface and draw to it as a bitmap. The code was written with the expectation was that after layer backing store flush, ImageBuffer::releaseGraphicsContext() was called and this would release the GraphicsContext, the underlying CGContext and the IOSurface lock. This was a misunderstanding, releaseGraphicsContext() is never called. This would cause MotionMark Images test to render incorrectly on Intel-based Macs, since the IOSurface unlock is needed to copy the main memory IOSurface cache back to the real IOSurface memory. After each layer backing store update, the corresponding layer ImageBuffers are flushed. Use the flush as the cue to unlock the IOSurface that ImageBufferShareableMappedIOSurfaceBitmapBackend draws to, before external access via the UI process starts. Related but not strictly needed, make sure IOSurface locking errors are handled gracefully. This bug is not about IOSurface locking errors, but they were ignored before, and as such the behavior was part of the investigation of this bug. * Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::getPixelBuffer): (WebCore::ImageBufferIOSurfaceBackend::putPixelBuffer): * Source/WebCore/platform/graphics/cocoa/IOSurface.h: (WebCore::IOSurface::lock): * Source/WebCore/platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::createBitmapPlatformContext): * Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBitmapBackend.cpp: (WebKit::ImageBufferShareableMappedIOSurfaceBitmapBackend::~ImageBufferShareableMappedIOSurfaceBitmapBackend): (WebKit::ImageBufferShareableMappedIOSurfaceBitmapBackend::context): (WebKit::ImageBufferShareableMappedIOSurfaceBitmapBackend::flushContext): * Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBitmapBackend.h: Canonical link: https://commits.webkit.org/265712@main
- Loading branch information
1 parent
f0d6209
commit de645b3
Showing
5 changed files
with
77 additions
and
30 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