Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 9e5c9ba. rdar://problem/113605412
Cherry-pick 80f6e24. rdar://problem/112743547 Allocating a new IPC::Semaphore for each RemoteImageBufferProxy::flushDrawingContextAsync adds significant overhead. https://bugs.webkit.org/show_bug.cgi?id=259433 <rdar://112743547> Reviewed by Dean Jackson. Frequently we have an existing pending flush object, where the semaphore has already been signaled. This makes the m_signaled bool atomic, so that we can check for completed flush objects without taking the lock and blocking. This will still be false if the existing use of the semaphore hasn't yet been signaled, or if the waitFor call failed. If we find a completed flush objects, then moves the semaphore across into the new one to prevent a new allocation. * Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp: (WebKit::RemoteImageBufferProxyFlushFence::tryTakeSemaphore): (WebKit::RemoteImageBufferProxy::flushDrawingContextAsync): (WebKit::RemoteImageBufferProxyFlushFence::WTF_GUARDED_BY_LOCK): Deleted. Canonical link: https://commits.webkit.org/266265@main Identifier: 265870.266@safari-7616-branch
- Loading branch information