Remote Layer Tree: Support hardware accelerated filters
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2013 19:25:09 +0000 (19:25 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2013 19:25:09 +0000 (19:25 +0000)
commit91ac9b7c1054bc2b31455d891d49c9d196b14b13
tree0eea3d69e9c1b09fc1f3b3be41954de660776dad
parent719df14887c25ec2cea9ccb7e8290b1c1c81244e
Remote Layer Tree: Support hardware accelerated filters
https://bugs.webkit.org/show_bug.cgi?id=123139

Reviewed by Anders Carlsson.

* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::ArgumentCoder<Length>::encode):
(CoreIPC::ArgumentCoder<Length>::decode):
Add simple coders for Length.

(CoreIPC::encodeFilterOperation):
(CoreIPC::decodeFilterOperation):
Serialize and deserialize FilterOperations, except for CUSTOM and VALIDATED_CUSTOM.

(CoreIPC::ArgumentCoder<Length>::encode):
(CoreIPC::ArgumentCoder<Length>::decode):
Add coders for FilterOperations that delegate to {en,de}codeFilterOperation
for each operation in the list.

* Shared/WebCoreArgumentCoders.h:
Drive-by fix indentation.
Expose the Length and FilterOperations coders.

* Shared/mac/RemoteLayerTreeTransaction.h:
Add FiltersChanged and LayerProperties::filters.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
Encode and decode our FilterOperations.

(WebKit::dumpChangedLayers):
Dump information about the layers' filters.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::commit):
Use PlatformCAFilters code to apply a FilterOperations object to our CALayer.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::setFilters):
Replace existing filters with our new set, and note that they've changed.

(PlatformCALayerRemote::copyFiltersFrom):
Not yet implemented. Not critical for this feature, either.

(PlatformCALayerRemote::filtersCanBeComposited):
For now, this is the same as the Mac version.

* WebCore.exp.in:
Export a variety of filter-related things.

* platform/graphics/ca/PlatformCAFilters.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setFilters):
* platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
(PlatformCAFilters::setFiltersOnLayer):
setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer
as its argument, because it doesn't need a PlatformCALayer, and this way
we can share code with the RemoteLayerTreeHost, which only has PlatformLayers
and not PlatformCALayers.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/ca/PlatformCAFilters.h
Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm
Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
Source/WebCore/platform/graphics/ca/win/PlatformCAFiltersWin.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h
Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm
Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp