Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r220792 - [CoordGraphics] Simplify CoordinatedGraphicsScene sta…
…te updates https://bugs.webkit.org/show_bug.cgi?id=175528 <rdar://problem/33876795> Reviewed by Carlos Garcia Campos. Hold the information about state updates in ThreadedCompositor, in the m_attributes struct. This way we don't need to store the updates in functors and accumulate them in the CoordinatedGraphicsScene class, but instead just apply any pending state update or atlas removal before the scene is rendered. This removes the need to update the CoordinatedGraphicsScene object from the main thread with data that ultimately has to be handled on the composition thread. Similarly, when updating CoordinatedGraphicsScene, we only need to synchronize on the m_attributes lock object once in order to retrieve the scene update information, instead of having each functor do that repeatedly. Outside of CoordinatedGraphicsScene and ThreadedCompositor classes, the CompositingCoordinator class now passes the atlases-to-remove Vector by a const lvalue reference down to ThreadedCompositor, and then manually clears the Vector. Before the Vector was passed as an rvalue reference, depending on the ThreadedCompositor code to clear out the original Vector object by moving its resources into the functor object. This doesn't occur anymore because the Vector object is now appended to another Vector. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::applyStateChanges): (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): (WebKit::CoordinatedGraphicsScene::detach): (WebKit::CoordinatedGraphicsScene::setActive): (WebKit::CoordinatedGraphicsScene::syncRemoteContent): Deleted. (WebKit::CoordinatedGraphicsScene::appendUpdate): Deleted. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::renderLayerTree): (WebKit::ThreadedCompositor::updateSceneState): (WebKit::ThreadedCompositor::releaseUpdateAtlases): * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: (WebKit::CompositingCoordinator::flushPendingLayerChanges): (WebKit::CompositingCoordinator::releaseAtlases): (WebKit::CompositingCoordinator::clearUpdateAtlases): * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp: (WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases): * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
- Loading branch information
1 parent
15d23c0
commit eb12c6d
Showing
10 changed files
with
108 additions
and
82 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
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