Clean up the layer volatility code and logging
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2018 21:04:10 +0000 (21:04 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2018 21:04:10 +0000 (21:04 +0000)
commita49fc72029bdc36e3683a77e8f3f535a5c585d0a
treecb0ef40cfbb327683eee31a17c96a92354b7f7e0
parent9f0d31c0c425d5d142aeb8e461e135d61297b7dc
Clean up the layer volatility code and logging
https://bugs.webkit.org/show_bug.cgi?id=187286

Reviewed by Tim Horton.
Source/WebCore:

Export a function.

* platform/graphics/cocoa/IOSurface.h:

Source/WebKit:

Fix the layer volatility logging so it doesn't say "succeeded" when it actually failed
and gave up.

Use a couple of lambda functions in RemoteLayerBackingStore::setBufferVolatility() to
make the code easier to read.

* Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::callVolatilityCompletionHandlers):
(WebKit::WebPage::layerVolatilityTimerFired):
(WebKit::WebPage::markLayersVolatile):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::markLayersVolatile):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::markAllLayersVolatile):
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/IOSurface.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/WebProcess.h