Currently all the tile buffers are rendered with cairo and, only after of them are rendered, they are uploaded to textures in the compositor thread. This causes that we have to wait for the upload of all the buffers before performing the composition, which can be a bottleneck. With this patch, the buffers are uploaded as soon as they are rendered, which means that when we want to perform the composition all the textures will be ready. The advantage of this is that we release the buffer memory faster, which will reduce the memory consumption during rendering, and we don't have to wait for the buffer upload before compositing, as we upload the buffers on idle cycles of the compositor thread. The disadvantage is that we increase the usage of video memory, because instead of having a texture front buffer and a normal buffer as the back buffer, we now have 2 textures as the front and back buffers of the tiles.
Created attachment 338575 [details] patch for landing
Attachment 338575 [details] did not pass style-queue: ERROR: Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:361: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] ERROR: Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:983: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:29: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:39: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 4 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 338576 [details] Patch
I wonder if it would make sense to create a flag or a config option for this, as it wouldn't make sense to use it on devices with very small video memory.
We decided not to follow this approach, so I'm closing this.
Comment on attachment 338576 [details] Patch This has been requesting review for more than one year. If this is still needed, please rebase and re-request review.