[chromium] Remove incorrect early exit in CCDamageTracker
authorshawnsingh@chromium.org <shawnsingh@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2012 21:41:47 +0000 (21:41 +0000)
committershawnsingh@chromium.org <shawnsingh@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2012 21:41:47 +0000 (21:41 +0000)
commit04d639ea445e1f2db3e72a73af28d9ece41fda24
tree1e8b92d7b94cba90818e524be4d99c244b3da2b9
parent94b817a1084d2c5a3729d0ddd2978c0ea2b42793
[chromium] Remove incorrect early exit in CCDamageTracker
https://bugs.webkit.org/show_bug.cgi?id=76924

Reviewed by James Robinson.

Source/WebCore:

New unit test added to CCDamageTrackerTest.cpp

This patch does three things: (1) adds unit test that demonstrates
that early exiting in CCDamageTracker is wrong, (2) removes the
early exit and cleans up the surrounding code, and (3) re-names
several functions in CCDamageTracker so that state updating is
implied by the name, and not just a bad side-effect of the functions.

* platform/graphics/chromium/cc/CCDamageTracker.cpp:
(WebCore::CCDamageTracker::updateDamageTrackingState):
(WebCore::CCDamageTracker::trackDamageFromActiveLayers):
(WebCore::CCDamageTracker::trackDamageFromSurfaceMask):
(WebCore::CCDamageTracker::trackDamageFromLeftoverRects):
* platform/graphics/chromium/cc/CCDamageTracker.h:
(CCDamageTracker):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):

Source/WebKit/chromium:

* tests/CCDamageTrackerTest.cpp:
(WebKitTests::emulateDrawingOneFrame):
(WebKitTests::TEST_F):
(WebKitTests):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp
Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp