[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)
commit2feb6e206ee0fdb524fbac977a9543ab6a23d5b1
tree1e8b92d7b94cba90818e524be4d99c244b3da2b9
parent9951bc13b4f78b61bba0677a0171556909089bcb
[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: http://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