Add a basic layer hierarchy to the Core Animation drawing area
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 22:01:16 +0000 (22:01 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 22:01:16 +0000 (22:01 +0000)
commit12b76aa4390ff37198c281d51b28a2f0792f4c52
treea8bdbaab377453d582e192f237580904627cea7c
parent66a73f1c0759029971141143ba61c8f55d41c119
Add a basic layer hierarchy to the Core Animation drawing area
https://bugs.webkit.org/show_bug.cgi?id=71838

Reviewed by Sam Weinig.

* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
Return early if we're using a tiled drawing area.

(-[WKView initWithFrame:contextRef:pageGroupRef:]):
If we're using a tiled drawing area, make the WKView layer backed and set its layer
to a simple CALayer with a white background and set the view's content redraw policy
to never to avoid ever calling drawRect.

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::didUpdateGeometry):
* UIProcess/DrawingAreaProxy.messages.in:
Add a new didUpdateGeometry message.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
Initialize m_isWaitingForDidUpdateGeometry.

(WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
Send an UpdateGeometry message to the web process and wait for a reply.

(WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
Tell the web page proxy to enter accelerated compositing mode.

(WebKit::TiledCoreAnimationDrawingAreaProxy::exitAcceleratedCompositingMode):
Assert that this function is never called.

(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
Send another UpdateGeometry message if needed.

(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Add helper function to actually send the UpdateGeometry message.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::updateGeometry):
* WebProcess/WebPage/DrawingArea.messages.in:
Add UpdateGeometry message.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Create a red root layer and a remote layer client that hosts it.

(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Resize the root layer and tell the UI process that we've updated the geometry.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/UIProcess/DrawingAreaProxy.messages.in
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm