Add unit test for CCLayerSorter
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 17:05:41 +0000 (17:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 17:05:41 +0000 (17:05 +0000)
commit53904e3b4625c1ddc98456106156d2854483a915
treecabc08eebf0ecd0d6cb17bbfac628c58ba86cb93
parent5c506413ce95a008620f9d7d429520dbeccd1093
Add unit test for CCLayerSorter
https://bugs.webkit.org/show_bug.cgi?id=68622

Source/WebCore:

Minor refactoring for testability:
- Made pointInTriangle public.
- Added LayerShape to decouple LayerIntersector and GraphNode.
- Added a public wrapper function for LayerIntersector.

Patch by Iain Merrick <husky@google.com> on 2011-09-29
Reviewed by James Robinson.

* platform/graphics/chromium/cc/CCLayerSorter.cpp:
(WebCore::CCLayerSorter::pointInTriangle):
(WebCore::CCLayerSorter::calculateZDiff):
(WebCore::CCLayerSorter::LayerIntersector::LayerIntersector):
(WebCore::CCLayerSorter::LayerIntersector::go):
(WebCore::CCLayerSorter::LayerIntersector::checkZDiff):
(WebCore::CCLayerSorter::LayerIntersector::layerZFromProjectedPoint):
(WebCore::CCLayerSorter::checkOverlap):
(WebCore::CCLayerSorter::LayerShape::LayerShape):
(WebCore::CCLayerSorter::createGraphNodes):
* platform/graphics/chromium/cc/CCLayerSorter.h:
(WebCore::CCLayerSorter::LayerShape::LayerShape):
(WebCore::CCLayerSorter::GraphNode::GraphNode):

Source/WebKit/chromium:

Patch by Iain Merrick <husky@google.com> on 2011-09-29
Reviewed by James Robinson.

* WebKit.gypi:
* tests/CCLayerSorterTest.cpp: Added.
(WebCore::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/tests/CCLayerSorterTest.cpp [new file with mode: 0644]