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

Side by Side Diff: tests/PathOpsExtendedTest.h

Issue 1029993002: Revert of pathops version two (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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);
21 20
22 struct PathOpsThreadState; 21 struct PathOpsThreadState;
23 22
24 struct TestDesc { 23 struct TestDesc {
25 void (*fun)(skiatest::Reporter*, const char* filename); 24 void (*fun)(skiatest::Reporter*, const char* filename);
26 const char* str; 25 const char* str;
27 }; 26 };
28 27
29 //extern int comparePaths(const SkPath& one, const SkPath& two); 28 //extern int comparePaths(const SkPath& one, const SkPath& two);
30 extern int comparePaths(skiatest::Reporter* reporter, const char* filename, 29 extern int comparePaths(const SkPath& one, const SkPath& two, SkBitmap& bitmap);
31 const SkPath& one, const SkPath& two, SkBitmap& bitmap);
32 extern bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths) ; 30 extern bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths) ;
33 extern void showOp(const SkPathOp op); 31 extern void showOp(const SkPathOp op);
34 extern bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPa th& b, 32 extern bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPa th& b,
35 const SkPathOp , const char* testName); 33 const SkPathOp , const char* testName);
36 extern bool testPathOpCheck(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 34 extern bool testPathOpCheck(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
37 const SkPathOp , const char* testName, bool checkFai l); 35 const SkPathOp , const char* testName, bool checkFai l);
38 extern bool testPathFailOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 36 extern bool testPathFailOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
39 const SkPathOp , const char* testName); 37 const SkPathOp , const char* testName);
40 extern bool testThreadedPathOp(skiatest::Reporter* reporter, const SkPath& a, co nst SkPath& b, 38 extern bool testThreadedPathOp(skiatest::Reporter* reporter, const SkPath& a, co nst SkPath& b,
41 const SkPathOp , const char* testName); 39 const SkPathOp , const char* testName);
42 extern bool testSimplify(SkPath& path, bool useXor, SkPath& out, PathOpsThreadSt ate& state, 40 extern bool testSimplify(SkPath& path, bool useXor, SkPath& out, PathOpsThreadSt ate& state,
43 const char* pathStr); 41 const char* pathStr);
44 extern bool testSimplify(skiatest::Reporter* reporter, const SkPath& path, const char* filename); 42 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);
47 43
48 void initializeTests(skiatest::Reporter* reporter, const char* testName); 44 void initializeTests(skiatest::Reporter* reporter, const char* testName);
49 void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType ); 45 void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType );
50 void outputProgress(char* ramStr, const char* pathStr, SkPathOp op); 46 void outputProgress(char* ramStr, const char* pathStr, SkPathOp op);
51 47
52 void RunTestSet(skiatest::Reporter* reporter, TestDesc tests[], size_t count, 48 void RunTestSet(skiatest::Reporter* reporter, TestDesc tests[], size_t count,
53 void (*firstTest)(skiatest::Reporter* , const char* filename), 49 void (*firstTest)(skiatest::Reporter* , const char* filename),
54 void (*skipTest)(skiatest::Reporter* , const char* filename),
55 void (*stopTest)(skiatest::Reporter* , const char* filename), bo ol reverse); 50 void (*stopTest)(skiatest::Reporter* , const char* filename), bo ol reverse);
56 void ShowTestArray(); 51 void ShowTestArray();
57 void ShowTestName(PathOpsThreadState* data, int a, int b, int c, int d); 52 void ShowTestName(PathOpsThreadState* data, int a, int b, int c, int d);
58 void ShowFunctionHeader(const char* name); 53 void ShowFunctionHeader(const char* name);
59 void ShowPath(const SkPath& path, const char* pathName); 54 void ShowPath(const SkPath& path, const char* pathName);
60 void ShowOp(SkPathOp op, const char* pathOne, const char* pathTwo); 55 void ShowOp(SkPathOp op, const char* pathOne, const char* pathTwo);
61 56
62 #endif 57 #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