RESOLVED FIXED Bug 68622
Add unit test for CCLayerSorter
https://bugs.webkit.org/show_bug.cgi?id=68622
Summary Add unit test for CCLayerSorter
Iain Merrick
Reported 2011-09-22 08:46:47 PDT
Add unit test for CCLayerSorter
Attachments
Patch (18.47 KB, patch)
2011-09-22 08:50 PDT, Iain Merrick
no flags
Patch (18.49 KB, patch)
2011-09-26 06:02 PDT, Iain Merrick
no flags
Patch (18.38 KB, patch)
2011-09-27 10:07 PDT, Iain Merrick
no flags
Iain Merrick
Comment 1 2011-09-22 08:50:17 PDT
WebKit Review Bot
Comment 2 2011-09-22 08:54:30 PDT
Attachment 108338 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:74: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:75: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:80: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:81: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:96: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:97: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:131: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:132: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:136: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:139: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:143: Extra space after ( in function call [whitespace/parens] [4] Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:144: Extra space after ( in function call [whitespace/parens] [4] Total errors found: 12 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Iain Merrick
Comment 3 2011-09-22 08:56:16 PDT
No tests for the topological sort yet, that can come next. Another thing that might be worth doing in a future patch is unifying the edgeEdgeTest function with findIntersection (in FloatPoint.h). They're almost identical except that findIntersection projects the lines to infinity, but we require an intersection that's inside both line segments. But the only extra code we need for that is pointInColinearEdge.
Iain Merrick
Comment 4 2011-09-22 09:02:15 PDT
Re style errors: I added spaces to make the constants readable. Happy to remove them if that error can be suppressed.
Iain Merrick
Comment 5 2011-09-26 06:02:50 PDT
James Robinson
Comment 6 2011-09-26 19:59:46 PDT
Vangelis, since you wrote the sorter originally would you mind reviewing this patch?
Vangelis Kokkevis
Comment 7 2011-09-26 22:58:34 PDT
Comment on attachment 108657 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108657&action=review Looks good (other than test comment)! Thanks for taking care of it. > Source/WebKit/chromium/tests/CCLayerSorterTest.cpp:117 > + // : ----A----/- Intersecting layers don't currently get sorted consistently. Ideally this test should use non-intersecting layers which could be achieved by spreading A and B a bit more on the X axis.
Iain Merrick
Comment 8 2011-09-27 09:37:01 PDT
Sure, I'll make that change. It looked to me as if intersecting layers actually *are* sorted consistently, at least in certain cases, which is why I tried it out in the test. I guess intersecting layers are basically cycles, so it depends whether we want to set any requirements on how cycles are broken (and it seems OK to leave it undefined for now).
Iain Merrick
Comment 9 2011-09-27 10:07:46 PDT
Vangelis Kokkevis
Comment 10 2011-09-27 10:56:49 PDT
Comment on attachment 108862 [details] Patch Looks good. (unofficial) R+ from me.
James Robinson
Comment 11 2011-09-27 11:09:11 PDT
Comment on attachment 108862 [details] Patch R=me
WebKit Review Bot
Comment 12 2011-09-28 03:30:02 PDT
Comment on attachment 108862 [details] Patch Rejecting attachment 108862 [details] from commit-queue. husky@google.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
Iain Merrick
Comment 13 2011-09-28 03:32:16 PDT
Oops, guess I need commit-queue? instead of commit-queue+. Fixed.
Iain Merrick
Comment 14 2011-09-29 05:12:17 PDT
James, could you please commit-queue+ this for me? Thanks!
James Robinson
Comment 15 2011-09-29 09:51:05 PDT
Comment on attachment 108862 [details] Patch Any WebKit committer can set cq+ for a reviewed patch. There are several WebKit committers in the LON office, so in the future it'll probably be faster for you to ask one of them rather than wait for me.
WebKit Review Bot
Comment 16 2011-09-29 10:04:47 PDT
Comment on attachment 108862 [details] Patch Clearing flags on attachment: 108862 Committed r96337: <http://trac.webkit.org/changeset/96337>
WebKit Review Bot
Comment 17 2011-09-29 10:04:51 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.