Fix scrollperf logging
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jan 2013 23:03:28 +0000 (23:03 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jan 2013 23:03:28 +0000 (23:03 +0000)
commit8bf85d7cf65c3d336923e661291513bc2a6fa218
tree429ed735a5d7ee1056103ff71180922207a06441
parentf3976e5afc8d6dd7d484367fcc4c7f8c3ea43a23
Fix scrollperf logging
https://bugs.webkit.org/show_bug.cgi?id=107589

Reviewed by Tim Horton.

The scrollperf logging had two issues:

1. It relied on a paint logging a "filled" event, but it's possible
for existing tiles to be moved into the viewport and filling it, so
we need to log from the scrolling thread both when we have unfilled pixels,
and when the last scroll revealed unfilled pixels.

2. On some pages, z-index:-1 elements behind the body cause the root
TileCache to have drawsContent set to false, so none of its tiles paint. In
that case, the check for a non-zero paintCount in TileCache::blankPixelCountForTiles()
was wrong; we don't think there's a way to have an unpainted tile in the tree.

Also fix the signature of blankPixelCountForTiles() to take references.

* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
(ScrollingTreeScrollingNodeMac):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
(WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
* platform/graphics/ca/mac/TileCache.h:
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::blankPixelCountForTiles):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm
Source/WebCore/platform/graphics/ca/mac/TileCache.h
Source/WebCore/platform/graphics/ca/mac/TileCache.mm