Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
2011-03-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig. Add a shared memory cache to the web process https://bugs.webkit.org/show_bug.cgi?id=56232 Add a very simple shared memory cache to the web process, so that we don't have to allocate and free memory over and over when painting. * Shared/ShareableBitmap.cpp: (WebKit::ShareableBitmap::create): (WebKit::ShareableBitmap::createShareable): (WebKit::ShareableBitmap::resize): * Shared/ShareableBitmap.h: (WebKit::ShareableBitmap::numBytesNeededForBitmapSize): (WebKit::ShareableBitmap::sizeInBytes): Rename numBytesForSize to numBytesNeededForBitmapSize. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::update): Always send back a DidUpdate message, even if we didn't use the update info. This is needed so that the web process knows when the UI process is done with the shared memory inside the update info struct. * WebKit2.xcodeproj/project.pbxproj: Add new files. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::didUpdate): * WebProcess/WebPage/DrawingArea.messages.in: DidUpdate now takes a boolean. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::sharedMemoryCache): Add shared memory cache. (WebKit::DrawingAreaImpl::~DrawingAreaImpl): Return the shared memory to the cache. (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): display now takes an extra boolean. (WebKit::DrawingAreaImpl::didUpdate): Return the shared memory to the cache. (WebKit::DrawingAreaImpl::display): If useSharedMemoryCache is true, get shared memory from the cache. * WebProcess/WebPage/SharedMemoryCache.cpp: Added. (WebKit::SharedMemoryCache::acquireSharedMemory): If the memory we currently hold on to is big enough, return it. (WebKit::SharedMemoryCache::releaseSharedMemory): If we're already holding on to shared memory, evict it if the returned shared memory object is bigger than the one we currently hold. (WebKit::SharedMemoryCache::clearCacheTimerFired): Null out the shared memory object. Canonical link: https://commits.webkit.org/70784@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Anders Carlsson
committed
Mar 12, 2011
1 parent
56b7521
commit cc1bbe0
Showing
11 changed files
with
254 additions
and
19 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
Oops, something went wrong.