Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 19183005: add florin tests (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsCubicIntersectionTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 8
9 #define TEST(name) { name, #name } 9 #define TEST(name) { name, #name }
10 10
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 pathB.lineTo(96, 289); 1829 pathB.lineTo(96, 289);
1830 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284); 1830 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284);
1831 pathB.lineTo(91, 127); 1831 pathB.lineTo(91, 127);
1832 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122); 1832 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122);
1833 pathB.lineTo(258, 122); 1833 pathB.lineTo(258, 122);
1834 pathB.close(); 1834 pathB.close();
1835 testPathOp(reporter, path, pathB, kIntersect_PathOp); 1835 testPathOp(reporter, path, pathB, kIntersect_PathOp);
1836 } 1836 }
1837 #endif 1837 #endif
1838 1838
1839 #if 0 // https://code.google.com/p/skia/issues/detail?id=1417
1840 static void issue1417(skiatest::Reporter* reporter) {
1841 SkPath path1;
1842 path1.moveTo(122.589f, 82.2836f);
1843 path1.quadTo(129.822f, 80, 138, 80);
1844 path1.quadTo(147.157f, 80, 155.128f, 82.8628f);
1845 path1.lineTo(161.176f, 100);
1846 path1.lineTo(161.176f, 100);
1847 path1.lineTo(115.294f, 100);
1848 path1.lineTo(115.294f, 100);
1849 path1.lineTo(122.589f, 82.2836f);
1850 path1.lineTo(122.589f, 82.2836f);
1851 path1.close();
1852 path1.moveTo(98.6819f, 140.344f);
1853 path1.lineTo(115.294f, 100);
1854 path1.lineTo(115.294f, 100);
1855 path1.lineTo(97.9338f, 100);
1856 path1.lineTo(97.9338f, 100);
1857 path1.quadTo(88, 112.943f, 88, 130);
1858 path1.quadTo(88, 131.545f, 88.0815f, 133.056f);
1859 path1.lineTo(98.6819f, 140.344f);
1860 path1.lineTo(98.6819f, 140.344f);
1861 path1.close();
1862 path1.moveTo(136.97f, 166.667f);
1863 path1.lineTo(98.6819f, 140.344f);
1864 path1.lineTo(98.6819f, 140.344f);
1865 path1.lineTo(93.4589f, 153.028f);
1866 path1.lineTo(93.4589f, 153.028f);
1867 path1.quadTo(96.9412f, 159.652f, 102.645f, 165.355f);
1868 path1.quadTo(110.792f, 173.503f, 120.818f, 177.118f);
1869 path1.lineTo(136.97f, 166.667f);
1870 path1.lineTo(136.97f, 166.667f);
1871 path1.close();
1872 path1.moveTo(175.831f, 141.521f);
1873 path1.lineTo(136.97f, 166.667f);
1874 path1.lineTo(136.97f, 166.667f);
1875 path1.lineTo(153.157f, 177.796f);
1876 path1.lineTo(153.157f, 177.796f);
1877 path1.quadTo(164.392f, 174.318f, 173.355f, 165.355f);
1878 path1.quadTo(177.806f, 160.905f, 180.904f, 155.894f);
1879 path1.lineTo(175.831f, 141.521f);
1880 path1.lineTo(175.831f, 141.521f);
1881 path1.close();
1882 path1.moveTo(175.831f, 141.521f);
1883 path1.lineTo(187.878f, 133.726f);
1884 path1.lineTo(187.878f, 133.726f);
1885 path1.quadTo(188, 131.888f, 188, 130);
1886 path1.quadTo(188, 112.943f, 178.066f, 100);
1887 path1.lineTo(161.176f, 100);
1888 path1.lineTo(161.176f, 100);
1889 path1.lineTo(175.831f, 141.521f);
1890 path1.lineTo(175.831f, 141.521f);
1891 path1.close();
1892
1893 SkPath path2;
1894 path2.moveTo(174.118f, 100);
1895 path2.lineTo(161.176f, 100);
1896 path2.lineTo(161.176f, 100);
1897 path2.lineTo(155.128f, 82.8628f);
1898 path2.lineTo(155.128f, 82.8628f);
1899 path2.quadTo(153.15f, 82.1523f, 151.098f, 81.6181f);
1900 path2.lineTo(143.529f, 100);
1901 path2.lineTo(143.529f, 100);
1902 path2.lineTo(161.176f, 100);
1903 path2.lineTo(161.176f, 100);
1904 path2.lineTo(168.235f, 120);
1905 path2.lineTo(168.235f, 120);
1906 path2.lineTo(181.176f, 120);
1907 path2.lineTo(181.176f, 120);
1908 path2.lineTo(186.366f, 134.704f);
1909 path2.lineTo(186.366f, 134.704f);
1910 path2.lineTo(187.878f, 133.726f);
1911 path2.lineTo(187.878f, 133.726f);
1912 path2.quadTo(188, 131.888f, 188, 130);
1913 path2.quadTo(188, 124.809f, 187.08f, 120);
1914 path2.lineTo(181.176f, 120);
1915 path2.lineTo(181.176f, 120);
1916 path2.lineTo(174.118f, 100);
1917 path2.lineTo(174.118f, 100);
1918 path2.close();
1919 path2.moveTo(88.9198f, 120);
1920 path2.lineTo(107.059f, 120);
1921 path2.lineTo(107.059f, 120);
1922 path2.lineTo(98.6819f, 140.344f);
1923 path2.lineTo(98.6819f, 140.344f);
1924 path2.lineTo(88.0815f, 133.056f);
1925 path2.lineTo(88.0815f, 133.056f);
1926 path2.quadTo(88, 131.545f, 88, 130);
1927 path2.quadTo(88, 124.81f, 88.9198f, 120);
1928 path2.close();
1929 path2.moveTo(96.6762f, 145.215f);
1930 path2.lineTo(98.6819f, 140.344f);
1931 path2.lineTo(98.6819f, 140.344f);
1932 path2.lineTo(120.688f, 155.473f);
1933 path2.lineTo(120.688f, 155.473f);
1934 path2.lineTo(118.682f, 160.344f);
1935 path2.lineTo(118.682f, 160.344f);
1936 path2.lineTo(96.6762f, 145.215f);
1937 path2.lineTo(96.6762f, 145.215f);
1938 path2.close();
1939 path2.moveTo(113.232f, 173.579f);
1940 path2.quadTo(116.88f, 175.698f, 120.818f, 177.118f);
1941 path2.lineTo(132.286f, 169.697f);
1942 path2.lineTo(132.286f, 169.697f);
1943 path2.lineTo(118.682f, 160.344f);
1944 path2.lineTo(118.682f, 160.344f);
1945 path2.lineTo(113.232f, 173.579f);
1946 path2.lineTo(113.232f, 173.579f);
1947 path2.close();
1948
1949 testPathOp(reporter, path1, path2, kUnion_PathOp);
1950 }
1951 #endif
1952
1953 #if 0 // https://code.google.com/p/skia/issues/detail?id=1418
1954 static void issue1418(skiatest::Reporter* reporter) {
1955 SkPath path1;
1956 path1.moveTo(0, 0);
1957 path1.lineTo(1, 0);
1958 path1.lineTo(1, 0);
1959 path1.lineTo(1, 1);
1960 path1.lineTo(1, 1);
1961 path1.lineTo(0, 1);
1962 path1.lineTo(0, 1);
1963 path1.lineTo(0, 0);
1964 path1.lineTo(0, 0);
1965 path1.close();
1966
1967 SkPath path2;
1968 path2.moveTo(0.646447f, -0.353553f);
1969 path2.quadTo(0.792893f, -0.5f, 1, -0.5f);
1970 path2.quadTo(1.20711f, -0.5f, 1.35355f, -0.353553f);
1971 path2.quadTo(1.5f, -0.207107f, 1.5f, 0);
1972 path2.quadTo(1.5f, 0.207107f, 1.35355f, 0.353553f);
1973 path2.quadTo(1.20711f, 0.5f, 1, 0.5f);
1974 path2.quadTo(0.792893f, 0.5f, 0.646447f, 0.353553f);
1975 path2.quadTo(0.5f, 0.207107f, 0.5f, 0);
1976 path2.quadTo(0.5f, -0.207107f, 0.646447f, -0.353553f);
1977 path2.close();
1978
1979 testPathOp(reporter, path1, path2, kIntersect_PathOp);
1980 }
1981 #endif
1982
1839 static void (*firstTest)(skiatest::Reporter* ) = 0; 1983 static void (*firstTest)(skiatest::Reporter* ) = 0;
1840 1984
1841 static struct TestDesc tests[] = { 1985 static struct TestDesc tests[] = {
1986 // TEST(issue1418),
1987 // TEST(issue1417),
1842 // TEST(skpkkiste_to98), 1988 // TEST(skpkkiste_to98),
1843 TEST(skpahrefs_com29), 1989 TEST(skpahrefs_com29),
1844 TEST(cubicOp85d), 1990 TEST(cubicOp85d),
1845 TEST(skpahrefs_com88), 1991 TEST(skpahrefs_com88),
1846 TEST(skphealth_com76), 1992 TEST(skphealth_com76),
1847 TEST(skpancestry_com1), 1993 TEST(skpancestry_com1),
1848 TEST(skpbyte_com1), 1994 TEST(skpbyte_com1),
1849 TEST(skpeldorado_com_ua1), 1995 TEST(skpeldorado_com_ua1),
1850 TEST(skp96prezzi1), 1996 TEST(skp96prezzi1),
1851 TEST(skpClip2), 1997 TEST(skpClip2),
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2000 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse); 2146 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse);
2001 } 2147 }
2002 #ifdef SK_DEBUG 2148 #ifdef SK_DEBUG
2003 gDebugMaxWindSum = SK_MaxS32; 2149 gDebugMaxWindSum = SK_MaxS32;
2004 gDebugMaxWindValue = SK_MaxS32; 2150 gDebugMaxWindValue = SK_MaxS32;
2005 #endif 2151 #endif
2006 } 2152 }
2007 2153
2008 #include "TestClassDef.h" 2154 #include "TestClassDef.h"
2009 DEFINE_TESTCLASS_SHORT(PathOpsOpTest) 2155 DEFINE_TESTCLASS_SHORT(PathOpsOpTest)
OLDNEW
« no previous file with comments | « tests/PathOpsCubicIntersectionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698