Fix GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush() to do predictive visib...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2013 00:04:49 +0000 (00:04 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2013 00:04:49 +0000 (00:04 +0000)
commitd1886f450fd5853e77f95ebbb0846024b22f85ac
tree2a624171a5b6a80e91bbebc25094cea0543c077b
parent39ac32f778ce29730877f399afa88c00b87c0019
Fix GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush() to do predictive visible rect expansion
https://bugs.webkit.org/show_bug.cgi?id=114775

Reviewed by Tim Horton.

GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush() is intended to answer the question
"if your visible rect is changed to X, would any tiles be created or destroyed?".

However, for compositing layer tiled layers, we do some predictive visible rect expansion based on how
the visible rect is changing when we actually commit visible rect changes. recursiveVisibleRectChangeRequiresFlush()
was not doing that, causing it to give confusing answers, so fix it to do so.

Both now call adjustTiledLayerVisibleRect(), and it's cleaner to make this a static function.

A somewhat unrelated change is to take the layer bounds origin into account
in GraphicsLayerCA::computeVisibleRect(). Desktop WebKit never sets this, but it's used
on other platforms for composited scrolling, so needs to be taken into account
when computing visible rects.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
(WebCore::GraphicsLayerCA::computeVisibleRect):
(WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):
(WebCore::GraphicsLayerCA::updateVisibleRect):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h