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

Side by Side Diff: tests/PathOpsSimplifyTest.cpp

Issue 2440043003: nc seal breaks simplify (Closed)
Patch Set: fix nc state seal Created 4 years, 1 month 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
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tools/pathops_sorter.htm » ('j') | 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 5560 matching lines...) Expand 10 before | Expand all | Expand 10 after
5571 path.lineTo(SkBits2Float(0x43a4250b), SkBits2Float(0x43e998dc)); // 328.289f, 4 67.194f 5571 path.lineTo(SkBits2Float(0x43a4250b), SkBits2Float(0x43e998dc)); // 328.289f, 4 67.194f
5572 path.cubicTo(SkBits2Float(0x43a8a9c8), SkBits2Float(0x43e8f06c), SkBits2Float(0x 43a95cb5), SkBits2Float(0x43e84ea6), SkBits2Float(0x43a6f7c1), SkBits2Float(0x43 e9bdb5)); // 337.326f, 465.878f, 338.724f, 464.614f, 333.936f, 467.482f 5572 path.cubicTo(SkBits2Float(0x43a8a9c8), SkBits2Float(0x43e8f06c), SkBits2Float(0x 43a95cb5), SkBits2Float(0x43e84ea6), SkBits2Float(0x43a6f7c1), SkBits2Float(0x43 e9bdb5)); // 337.326f, 465.878f, 338.724f, 464.614f, 333.936f, 467.482f
5573 path.cubicTo(SkBits2Float(0x43a59ed0), SkBits2Float(0x43e9d2ca), SkBits2Float(0x 4395ea4d), SkBits2Float(0x43e92afe), SkBits2Float(0x43a06569), SkBits2Float(0x43 e7773d)); // 331.241f, 467.647f, 299.83f, 466.336f, 320.792f, 462.932f 5573 path.cubicTo(SkBits2Float(0x43a59ed0), SkBits2Float(0x43e9d2ca), SkBits2Float(0x 4395ea4d), SkBits2Float(0x43e92afe), SkBits2Float(0x43a06569), SkBits2Float(0x43 e7773d)); // 331.241f, 467.647f, 299.83f, 466.336f, 320.792f, 462.932f
5574 path.cubicTo(SkBits2Float(0x438bf0ff), SkBits2Float(0x43ea0fef), SkBits2Float(0x 43a0e17a), SkBits2Float(0x43e5f41b), SkBits2Float(0x4398f3fb), SkBits2Float(0x43 e804c8)); // 279.883f, 468.124f, 321.762f, 459.907f, 305.906f, 464.037f 5574 path.cubicTo(SkBits2Float(0x438bf0ff), SkBits2Float(0x43ea0fef), SkBits2Float(0x 43a0e17a), SkBits2Float(0x43e5f41b), SkBits2Float(0x4398f3fb), SkBits2Float(0x43 e804c8)); // 279.883f, 468.124f, 321.762f, 459.907f, 305.906f, 464.037f
5575 path.lineTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 4 62.82f 5575 path.lineTo(SkBits2Float(0x4393d61e), SkBits2Float(0x43e768f9)); // 295.673f, 4 62.82f
5576 path.close(); 5576 path.close();
5577 5577
5578 testSimplify(reporter, path, filename); 5578 testSimplify(reporter, path, filename);
5579 } 5579 }
5580 5580
5581 static void simplifyTest_1(skiatest::Reporter* reporter, const char* filename) {
5582 SkPath path;
5583 path.setFillType((SkPath::FillType) 0);
5584 path.moveTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 1 19.752f
5585 path.quadTo(SkBits2Float(0x42c26810), SkBits2Float(0x42e214b8), SkBits2Float(0x4 2cdcad5), SkBits2Float(0x42d82aa2)); // 97.2032f, 113.04f, 102.896f, 108.083f
5586 path.lineTo(SkBits2Float(0x42cdcb21), SkBits2Float(0x42d82a61)); // 102.897f, 1 08.083f
5587 path.quadTo(SkBits2Float(0x42d5e3c8), SkBits2Float(0x42d12140), SkBits2Float(0x4 2e20ee8), SkBits2Float(0x42cdc937)); // 106.945f, 104.565f, 113.029f, 102.893f
5588 path.lineTo(SkBits2Float(0x42e256e3), SkBits2Float(0x42cdbc92)); // 113.17f, 10 2.868f
5589 path.lineTo(SkBits2Float(0x42f5eadb), SkBits2Float(0x42cc2cb3)); // 122.959f, 1 02.087f
5590 path.lineTo(SkBits2Float(0x42f746a6), SkBits2Float(0x42cccf85)); // 123.638f, 1 02.405f
5591 path.quadTo(SkBits2Float(0x42fa586c), SkBits2Float(0x42d126c4), SkBits2Float(0x4 2f6c657), SkBits2Float(0x42d5d315)); // 125.173f, 104.576f, 123.387f, 106.912f
5592 path.lineTo(SkBits2Float(0x42f591eb), SkBits2Float(0x42d4e76d)); // 122.785f, 1 06.452f
5593 path.lineTo(SkBits2Float(0x42f6c6e0), SkBits2Float(0x42d5d261)); // 123.388f, 1 06.911f
5594 path.quadTo(SkBits2Float(0x42f6bb33), SkBits2Float(0x42d5e1bb), SkBits2Float(0x4 2f6a3d8), SkBits2Float(0x42d6007c)); // 123.366f, 106.941f, 123.32f, 107.001f
5595 path.quadTo(SkBits2Float(0x42ea3850), SkBits2Float(0x42e65af0), SkBits2Float(0x4 2d97a6e), SkBits2Float(0x42ed841c)); // 117.11f, 115.178f, 108.739f, 118.758f
5596 path.lineTo(SkBits2Float(0x42d91d92), SkBits2Float(0x42ed9ec0)); // 108.558f, 1 18.81f
5597 path.lineTo(SkBits2Float(0x42c1a959), SkBits2Float(0x42f146b0)); // 96.8308f, 1 20.638f
5598 path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80f0)); // 95.9684f, 1 19.752f
5599 path.lineTo(SkBits2Float(0x42bfefd4), SkBits2Float(0x42ef80ef)); // 95.9684f, 1 19.752f
5600 path.close();
5601 path.moveTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 1 20.026f
5602 path.lineTo(SkBits2Float(0x42c16d91), SkBits2Float(0x42efc72c)); // 96.714f, 11 9.889f
5603 path.lineTo(SkBits2Float(0x42c131c9), SkBits2Float(0x42ee47a8)); // 96.5972f, 1 19.14f
5604 path.lineTo(SkBits2Float(0x42d8a602), SkBits2Float(0x42ea9fb8)); // 108.324f, 1 17.312f
5605 path.lineTo(SkBits2Float(0x42d8e1ca), SkBits2Float(0x42ec1f3c)); // 108.441f, 1 18.061f
5606 path.lineTo(SkBits2Float(0x42d84926), SkBits2Float(0x42eaba5c)); // 108.143f, 1 17.364f
5607 path.quadTo(SkBits2Float(0x42e84a40), SkBits2Float(0x42e3e1f0), SkBits2Float(0x4 2f439a2), SkBits2Float(0x42d42af8)); // 116.145f, 113.941f, 122.113f, 106.084f
5608 path.quadTo(SkBits2Float(0x42f45121), SkBits2Float(0x42d40c08), SkBits2Float(0x4 2f45cf6), SkBits2Float(0x42d3fc79)); // 122.158f, 106.023f, 122.182f, 105.993f
5609 path.lineTo(SkBits2Float(0x42f45d7f), SkBits2Float(0x42d3fbc5)); // 122.183f, 1 05.992f
5610 path.quadTo(SkBits2Float(0x42f69510), SkBits2Float(0x42d114f4), SkBits2Float(0x4 2f4ccce), SkBits2Float(0x42ce8fb7)); // 123.291f, 104.541f, 122.4f, 103.281f
5611 path.lineTo(SkBits2Float(0x42f609ba), SkBits2Float(0x42cdaf9e)); // 123.019f, 1 02.843f
5612 path.lineTo(SkBits2Float(0x42f62899), SkBits2Float(0x42cf3289)); // 123.079f, 1 03.599f
5613 path.lineTo(SkBits2Float(0x42e294a1), SkBits2Float(0x42d0c268)); // 113.29f, 10 4.38f
5614 path.lineTo(SkBits2Float(0x42e275c2), SkBits2Float(0x42cf3f7d)); // 113.23f, 10 3.624f
5615 path.lineTo(SkBits2Float(0x42e2dc9c), SkBits2Float(0x42d0b5c3)); // 113.431f, 1 04.355f
5616 path.quadTo(SkBits2Float(0x42d75bb8), SkBits2Float(0x42d3df08), SkBits2Float(0x4 2cfc853), SkBits2Float(0x42da7457)); // 107.679f, 105.936f, 103.891f, 109.227f
5617 path.lineTo(SkBits2Float(0x42cec9ba), SkBits2Float(0x42d94f5c)); // 103.394f, 1 08.655f
5618 path.lineTo(SkBits2Float(0x42cfc89f), SkBits2Float(0x42da7416)); // 103.892f, 1 09.227f
5619 path.quadTo(SkBits2Float(0x42c53268), SkBits2Float(0x42e3ac00), SkBits2Float(0x4 2c2eb4e), SkBits2Float(0x42f00d67)); // 98.5984f, 113.836f, 97.4596f, 120.026f
5620 path.lineTo(SkBits2Float(0x42c2eb4e), SkBits2Float(0x42f00d68)); // 97.4596f, 1 20.026f
5621 path.close();
5622
5623 testSimplify(reporter, path, filename);
5624 }
5625
5581 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; 5626 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0;
5582 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; 5627 static void (*firstTest)(skiatest::Reporter* , const char* filename) = testQuads 69;
5583 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; 5628 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
5584 5629
5585 static TestDesc tests[] = { 5630 static TestDesc tests[] = {
5631 TEST(simplifyTest_1),
5586 TEST(carsvg_1), 5632 TEST(carsvg_1),
5587 TEST(tiger8_393), 5633 TEST(tiger8_393),
5588 TEST(bug5169), 5634 TEST(bug5169),
5589 TEST(testQuads73), 5635 TEST(testQuads73),
5590 TEST(testQuads72), 5636 TEST(testQuads72),
5591 TEST(testQuads71), 5637 TEST(testQuads71),
5592 TEST(testQuads70), 5638 TEST(testQuads70),
5593 TEST(testQuads69), 5639 TEST(testQuads69),
5594 TEST(testQuads68), 5640 TEST(testQuads68),
5595 TEST(testQuads67), 5641 TEST(testQuads67),
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
6043 6089
6044 DEF_TEST(PathOpsSimplify, reporter) { 6090 DEF_TEST(PathOpsSimplify, reporter) {
6045 if (runSubTests && runSubTestsFirst) { 6091 if (runSubTests && runSubTestsFirst) {
6046 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop Test, runReverse); 6092 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop Test, runReverse);
6047 } 6093 }
6048 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev erse); 6094 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev erse);
6049 if (runSubTests && !runSubTestsFirst) { 6095 if (runSubTests && !runSubTestsFirst) {
6050 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop Test, runReverse); 6096 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop Test, runReverse);
6051 } 6097 }
6052 } 6098 }
OLDNEW
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tools/pathops_sorter.htm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698