Adopt CAMachPort-as-layer-contents
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 02:28:52 +0000 (02:28 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 02:28:52 +0000 (02:28 +0000)
commit6bd640be56f21539b9fd175e4dbef8b4e75df6c3
tree1eb568921b251848314a0cf9a5a32d8deb92db02
parent3a091e56b60be15407d0797cc2afc838e9e9f35a
Adopt CAMachPort-as-layer-contents
https://bugs.webkit.org/show_bug.cgi?id=141687
<rdar://problem/19393233>

Reviewed by Simon Fraser.

No new tests, just a performance bump.

* platform/cocoa/MachSendRight.h:
(WebCore::MachSendRight::operator bool):
Add an operator bool() that checks if the underlying port is nonnull.

* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.

* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::decode):
If we have CAMachPort, just keep the MachSendRight around.

(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
If we have CAMachPort, make one and leak our send right into it. CAMachPort
will adopt the port and destroy it when needed.

(WebKit::RemoteLayerBackingStore::setBufferVolatility):
Tiny style fix.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/MachSendRight.h
Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h
Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm