[chromium] Create CCDamageTracker class to determine regions of change for a surface.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2011 03:33:47 +0000 (03:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2011 03:33:47 +0000 (03:33 +0000)
commit1bcd090ea956649de2267968a865f042fc8dbf99
tree26d38a5208b321486efb3764c51e8d85ca8b60a4
parent560fc93a09dfbcea56fbebe0324f468d15930ce3
[chromium] Create CCDamageTracker class to determine regions of change for a surface.
https://bugs.webkit.org/show_bug.cgi?id=72520

Patch by Shawn Singh <shawnsingh@chromium.org> on 2011-11-28
Reviewed by James Robinson.

Source/WebCore:

Added CCDamageTrackerTest and updated other tests.

* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
(WebCore::LayerRendererChromium::drawLayer):
* platform/graphics/chromium/cc/CCDamageTracker.cpp: Added.
(WebCore::CCDamageTracker::create):
(WebCore::CCDamageTracker::CCDamageTracker):
(WebCore::CCDamageTracker::~CCDamageTracker):
(WebCore::CCDamageTracker::updateDamageRectForNextFrame):
(WebCore::CCDamageTracker::removeRectFromCurrentFrame):
(WebCore::CCDamageTracker::saveRectForNextFrame):
(WebCore::CCDamageTracker::computeDamageFromActiveLayers):
(WebCore::CCDamageTracker::computeDamageFromSurfaceMask):
(WebCore::CCDamageTracker::computeDamageFromLeftoverRects):
(WebCore::CCDamageTracker::extendDamageForLayer):
(WebCore::CCDamageTracker::extendDamageForRenderSurface):
* platform/graphics/chromium/cc/CCDamageTracker.h: Added.
(WebCore::CCDamageTracker::currentDamageRect):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::resetAllChangeTrackingForSubtree):
* platform/graphics/chromium/cc/CCLayerImpl.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::paintLayerContents):
(WebCore::CCLayerTreeHost::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
(WebCore::CCLayerTreeHostCommon::renderSurfaceContributesToTarget):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::CCRenderSurface):
(WebCore::CCRenderSurface::dumpSurface):
(WebCore::CCRenderSurface::surfacePropertyChangedOnlyFromDescendant):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(WebCore::CCRenderSurface::damageTracker):

Source/WebKit/chromium:

* WebKit.gypi:
* tests/CCDamageTrackerTest.cpp: Added.
(WebKitTests::executeCalculateDrawTransformsAndVisibility):
(WebKitTests::emulateDrawingOneFrame):
(WebKitTests::createTestTreeWithOneSurface):
(WebKitTests::createTestTreeWithTwoSurfaces):
(WebKitTests::createAndSetUpTestTreeWithOneSurface):
(WebKitTests::createAndSetUpTestTreeWithTwoSurfaces):
(WebKitTests::TEST_F):
* tests/CCLayerImplTest.cpp:
(WebCore::TEST):
* tests/CCLayerTreeHostCommonTest.cpp:
(WebCore::TEST):
* tests/CCLayerTreeTestCommon.h: Added.
* tests/CCRenderSurfaceTest.cpp:
(WebCore::TEST):
* tests/LayerChromiumTest.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.h
Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp
Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp [new file with mode: 0644]
Source/WebKit/chromium/tests/CCLayerImplTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h [new file with mode: 0644]
Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp
Source/WebKit/chromium/tests/LayerChromiumTest.cpp