Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r221521 - [GTK][Wayland] Use fast malloc to allocate backing st…
…ore cairo surfaces data https://bugs.webkit.org/show_bug.cgi?id=176226 Reviewed by Michael Catanzaro. Source/WebCore: It reduces the memory consumption and improves the performance. Also, since performance is better we don't need to keep the scroll surface allocated all the time, we can create it on demand and keep it allocated only while scrolling too fast. * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: (WebCore::createCairoImageSurfaceWithFastMalloc): Helper to create a cairo image surface using fast malloc. (WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl): Create the main surface, but no the scroll one. Initialize the hysteresis activity to discard the scroll surface after scrolling. (WebCore::BackingStoreBackendCairoImpl::scroll): Create the scroll surface only if it's nullptr, and notify the hysteresis activity. * platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Source/WebKit: Do not create the cairo surface for BackingStoreBackendCairoImpl. When not using X11 we are going to use an image surface anyway, so we don't really need to use the create similar. This way we only need to pass the size and device scale factor to BackingStoreBackendCairoImpl that will create the image surface using fast malloc to allocate the data. * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::createBackend):
- Loading branch information
1 parent
ca281ce
commit 084e3ca
Showing
5 changed files
with
68 additions
and
31 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