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

Side by Side Diff: tests/PathOpsExtendedTest.h

Issue 1037573004: cumulative pathops patch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix pathopsinverse gm Created 5 years, 9 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
« no previous file with comments | « tests/PathOpsDebug.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('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 #ifndef PathOpsExtendedTest_DEFINED 7 #ifndef PathOpsExtendedTest_DEFINED
8 #define PathOpsExtendedTest_DEFINED 8 #define PathOpsExtendedTest_DEFINED
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
11 #include "SkCommandLineFlags.h" 11 #include "SkCommandLineFlags.h"
12 #include "SkPath.h" 12 #include "SkPath.h"
13 #include "SkPathOpsTypes.h" 13 #include "SkPathOpsTypes.h"
14 #include "SkStream.h" 14 #include "SkStream.h"
15 #include "SkThread.h" 15 #include "SkThread.h"
16 #include "SkThreadUtils.h" 16 #include "SkThreadUtils.h"
17 #include "Test.h" 17 #include "Test.h"
18 18
19 DECLARE_bool(runFail); 19 DECLARE_bool(runFail);
20 DECLARE_bool(runBinary);
20 21
21 struct PathOpsThreadState; 22 struct PathOpsThreadState;
22 23
23 struct TestDesc { 24 struct TestDesc {
24 void (*fun)(skiatest::Reporter*, const char* filename); 25 void (*fun)(skiatest::Reporter*, const char* filename);
25 const char* str; 26 const char* str;
26 }; 27 };
27 28
28 //extern int comparePaths(const SkPath& one, const SkPath& two); 29 //extern int comparePaths(const SkPath& one, const SkPath& two);
29 extern int comparePaths(const SkPath& one, const SkPath& two, SkBitmap& bitmap); 30 extern int comparePaths(skiatest::Reporter* reporter, const char* filename,
31 const SkPath& one, const SkPath& two, SkBitmap& bitmap);
30 extern bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths) ; 32 extern bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths) ;
31 extern void showOp(const SkPathOp op); 33 extern void showOp(const SkPathOp op);
32 extern bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPa th& b, 34 extern bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPa th& b,
33 const SkPathOp , const char* testName); 35 const SkPathOp , const char* testName);
34 extern bool testPathOpCheck(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 36 extern bool testPathOpCheck(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
35 const SkPathOp , const char* testName, bool checkFai l); 37 const SkPathOp , const char* testName, bool checkFai l);
36 extern bool testPathFailOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 38 extern bool testPathFailOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
37 const SkPathOp , const char* testName); 39 const SkPathOp , const char* testName);
38 extern bool testThreadedPathOp(skiatest::Reporter* reporter, const SkPath& a, co nst SkPath& b, 40 extern bool testThreadedPathOp(skiatest::Reporter* reporter, const SkPath& a, co nst SkPath& b,
39 const SkPathOp , const char* testName); 41 const SkPathOp , const char* testName);
40 extern bool testSimplify(SkPath& path, bool useXor, SkPath& out, PathOpsThreadSt ate& state, 42 extern bool testSimplify(SkPath& path, bool useXor, SkPath& out, PathOpsThreadSt ate& state,
41 const char* pathStr); 43 const char* pathStr);
42 extern bool testSimplify(skiatest::Reporter* reporter, const SkPath& path, const char* filename); 44 extern bool testSimplify(skiatest::Reporter* reporter, const SkPath& path, const char* filename);
45 extern bool testSimplifyCheck(skiatest::Reporter* reporter, const SkPath& path,
46 const char* filename, bool checkFail);
43 47
44 void initializeTests(skiatest::Reporter* reporter, const char* testName); 48 void initializeTests(skiatest::Reporter* reporter, const char* testName);
45 void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType ); 49 void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType );
46 void outputProgress(char* ramStr, const char* pathStr, SkPathOp op); 50 void outputProgress(char* ramStr, const char* pathStr, SkPathOp op);
47 51
48 void RunTestSet(skiatest::Reporter* reporter, TestDesc tests[], size_t count, 52 void RunTestSet(skiatest::Reporter* reporter, TestDesc tests[], size_t count,
49 void (*firstTest)(skiatest::Reporter* , const char* filename), 53 void (*firstTest)(skiatest::Reporter* , const char* filename),
54 void (*skipTest)(skiatest::Reporter* , const char* filename),
50 void (*stopTest)(skiatest::Reporter* , const char* filename), bo ol reverse); 55 void (*stopTest)(skiatest::Reporter* , const char* filename), bo ol reverse);
51 void ShowTestArray(); 56 void ShowTestArray();
52 void ShowTestName(PathOpsThreadState* data, int a, int b, int c, int d); 57 void ShowTestName(PathOpsThreadState* data, int a, int b, int c, int d);
53 void ShowFunctionHeader(const char* name); 58 void ShowFunctionHeader(const char* name);
54 void ShowPath(const SkPath& path, const char* pathName); 59 void ShowPath(const SkPath& path, const char* pathName);
55 void ShowOp(SkPathOp op, const char* pathOne, const char* pathTwo); 60 void ShowOp(SkPathOp op, const char* pathOne, const char* pathTwo);
56 61
57 #endif 62 #endif
OLDNEW
« no previous file with comments | « tests/PathOpsDebug.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698