Get rid of "non-composited contents" in CoordinatedLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=110355

Patch by Noam Rosenthal <noam@webkit.org> on 2013-04-29
Reviewed by Jocelyn Turcotte.

Source/WebCore:

When in force compositing mode, always assume that the main layer needs
a backing store. Make setVisibleContentRectTrajectoryVector and accumulatedCoverRect
recursive so that they don't rely on a specialized layer.

No new testable behavior, changes to coverRect and trajectory vector only
affect tiling latency in rare cases that are not trivial to test.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer:setVisibleContentRectTrajectoryVector):
    Make the trajectory vector recursive, though limited only to layers with
    translate/identity. This allows us to keep the trajectory vector while removing
    the non-composited contents specialization.

(WebCore::CoordinatedGraphicsLayer::accumulatedCoverRect):
    Added accumulatedCoverRect, so that the coverRect calculations for the UI process
    are not bound to the non-composited contents layer.

(WebCore::CoordinatedGraphicsLayer::findDescendantWithContentsRecursively):
    Instead of saving a reference to the non-composited contents layer, we assume that
    the first layer we found recursively which has contents is the one to be used for
    coverRect/trajectory calculations.

(WebCore):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsIntoWindow):
    Always create a layer for the non-composited contents when in forceCompositing mode.

Source/WebKit2:

Instead of using a special non-composited contents layer, we let RenderLayerCompositor create
a proper GraphicsLayer for that content.
CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting
the trajectory vector and applying the cover rect.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
    Don't create the non-composited layer, instead keep a raw pointer to the root
    compositing layer created by the WebCore compositor.

(WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
(WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
(WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
(WebKit::CoordinatedLayerTreeHost::sizeDidChange):
(WebKit::CoordinatedLayerTreeHost::paintContents):
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
    Remove non-composited layer specialization.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149292 268f45cc-cd09-0410-ab3c-d52691b4dbfc