Bug 184879 - [GTK][WPE] Upload Tile buffers to textures as soon as they are rendered instead of waiting for all the buffers to be rendered
Summary: [GTK][WPE] Upload Tile buffers to textures as soon as they are rendered inste...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Miguel Gomez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-23 02:27 PDT by Miguel Gomez
Modified: 2021-11-01 12:05 PDT (History)
4 users (show)

See Also:


Attachments
patch for landing (31.17 KB, patch)
2018-04-23 03:05 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff
Patch (32.60 KB, patch)
2018-04-23 03:20 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Gomez 2018-04-23 02:27:33 PDT
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.
Comment 1 Miguel Gomez 2018-04-23 03:05:16 PDT
Created attachment 338575 [details]
patch for landing
Comment 2 EWS Watchlist 2018-04-23 03:09:36 PDT
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.
Comment 3 Miguel Gomez 2018-04-23 03:20:01 PDT
Created attachment 338576 [details]
Patch
Comment 4 Miguel Gomez 2018-04-23 05:09:14 PDT
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.
Comment 5 Miguel Gomez 2018-12-10 03:14:29 PST
We decided not to follow this approach, so I'm closing this.
Comment 6 Alex Christensen 2021-11-01 12:05:53 PDT
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.