Ignore:
Timestamp:
Mar 5, 2012, 2:53:43 PM (13 years ago)
Author:
[email protected]
Message:

Add support for hosting layers in the window server in WebKit2
<rdar://problem/10400246>
https://bugs.webkit.org/show_bug.cgi?id=80310

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

  • wtf/Platform.h:

Add HAVE_LAYER_HOSTING_IN_WINDOW_SERVER.

Source/WebKit2:

This currently only works if you are using TiledCoreAnimation drawing model.

  • Platform/mac/LayerHostingContext.h: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.h.
  • Platform/mac/LayerHostingContext.mm: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.mm.

(WebKit::LayerHostingContext::createForPort):
(WebKit::LayerHostingContext::LayerHostingContext):
(WebKit::LayerHostingContext::createForWindowServer):
(WebKit::LayerHostingContext::~LayerHostingContext):
(WebKit::LayerHostingContext::setRootLayer):
(WebKit::LayerHostingContext::rootLayer):
(WebKit::LayerHostingContext::contextID):
(WebKit::LayerHostingContext::invalidate):
Renamed RemoteLayerClient to LayerHostingContext and add ability to use the window server
as the remote context.

  • PluginProcess/PluginControllerProxy.cpp:
  • PluginProcess/PluginControllerProxy.h:
  • PluginProcess/mac/PluginControllerProxyMac.mm:

Update for new names.

  • Shared/LayerTreeContext.h:

Add LayerHostingMode enum.

  • UIProcess/PageClient.h:
  • UIProcess/API/mac/PageClientImpl.h:
  • UIProcess/API/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::layerHostingMode):
(WebKit::PageClientImpl::updateAcceleratedCompositingMode):
Add PageClient access points to get the current layer hosting mode,
and a hook to tell the underlying view that the layer hosting context
has changed.

  • UIProcess/API/mac/WKViewInternal.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView _updateAcceleratedCompositingMode:WebKit::]):
Implement responding to a new layer hosting context as a simple
exit and re-entrance of compositing.

  • UIProcess/DrawingAreaProxy.h:

(WebKit::DrawingAreaProxy::layerHostingModeDidChange):
(WebKit::DrawingAreaProxy::updateAcceleratedCompositingMode):

  • UIProcess/DrawingAreaProxy.messages.in:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:

(TiledCoreAnimationDrawingAreaProxy):

  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

(WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
Pipe layer hosting changes around.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::layerHostingMode):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::viewStateDidChange):
Cache the current layer hosting mode so we don't overzealously
tell the WebProcess to reset its context. Re-check layer hosting
mode each time we are added/removed from a window.

  • WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
  • WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:

Update for new names.

  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::setDeviceScaleFactor):
(WebKit::DrawingArea::setLayerHostingMode):

  • WebProcess/WebPage/DrawingArea.messages.in:

Pipe layer hosting changes around.

  • WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
  • WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:

(WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac):
(WebKit::LayerTreeHostCAMac::platformInitialize):
(WebKit::LayerTreeHostCAMac::invalidate):
Update for new names.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
Respond to a change in the layer hosting mode by invalidating our old context,
making a new one of the right type, and informing the UIProcess of our new context.

  • WebKit2.xcodeproj/project.pbxproj:

Add new files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r109802 r109804  
     12012-03-05  Sam Weinig  <[email protected]>
     2
     3        Add support for hosting layers in the window server in WebKit2
     4        <rdar://problem/10400246>
     5        https://bugs.webkit.org/show_bug.cgi?id=80310
     6
     7        Reviewed by Anders Carlsson.
     8
     9        * wtf/Platform.h:
     10        Add HAVE_LAYER_HOSTING_IN_WINDOW_SERVER.
     11
    1122012-03-05  Filip Pizlo  <[email protected]>
    213
Note: See TracChangeset for help on using the changeset viewer.