Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r222427 - Images may render partial frames even after loading a…
…ll the encoded data https://bugs.webkit.org/show_bug.cgi?id=177406 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-09-23 Reviewed by Simon Fraser. Source/WebCore: Because we do not want to block the main thread waiting for the image decoding thread to terminate, we let the decoding thread finish its work even it will be thrown away. If a new decoding thread is created and the SynchronizedFixedQueue is reopened, the terminating decoding thread might have the chance to process a new frame request. After it finishes decoding it, it realize that it is terminating so it will drop the decoded frame to the floor. So the new request was not processed by the new thread and because it was processed by the terminating thread, nothing will be reported to the BitmapImage object and the renderer will not be repainted. The fix is to create a new SynchronizedFixedQueue every time a decoding thread is created. This will guarantee that the terminating thread won't have access to the new frame request and will shut down after being notified by the old SynchronizedFixedQueue that it has been closed. * platform/graphics/ImageFrameCache.cpp: (WebCore::ImageFrameCache::frameRequestQueue): (WebCore::ImageFrameCache::startAsyncDecodingQueue): (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): (WebCore::ImageFrameCache::stopAsyncDecodingQueue): * platform/graphics/ImageFrameCache.h: Source/WTF: Make it possible to create a RefPtr<SynchronizedFixedQueue>. * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): (WTF::SynchronizedFixedQueue::enqueue): (WTF::SynchronizedFixedQueue::dequeue):
- Loading branch information
1 parent
a1ff577
commit ec125d1
Showing
5 changed files
with
77 additions
and
17 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