PathOpsExtendedTest.h revision 0361032c0b53401030a720bc8b4930c3ec59f19e
1/* 2 * Copyright 2012 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7#ifndef PathOpsExtendedTest_DEFINED 8#define PathOpsExtendedTest_DEFINED 9 10#include "SkBitmap.h" 11#include "SkPath.h" 12#include "SkPathOpsTypes.h" 13#include "SkStream.h" 14#include "SkThread.h" 15#include "SkThreadUtils.h" 16#include "Test.h" 17 18struct PathOpsThreadState; 19 20struct TestDesc { 21 void (*fun)(skiatest::Reporter*); 22 const char* str; 23}; 24 25//extern int comparePaths(const SkPath& one, const SkPath& two); 26extern int comparePaths(const SkPath& one, const SkPath& two, SkBitmap& bitmap); 27extern bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths); 28extern void showOp(const SkPathOp op); 29extern void showPath(const SkPath& path, const char* str); 30extern void showPath(const SkPath& path); 31extern void showPathData(const SkPath& path); 32extern bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 33 const SkPathOp ); 34extern bool testSimplify(SkPath& path, bool useXor, SkPath& out, PathOpsThreadState& state, 35 const char* pathStr); 36extern bool testSimplify(skiatest::Reporter* reporter, const SkPath& path); 37 38int initializeTests(const char* testName); 39void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType ); 40void outputProgress(char* ramStr, const char* pathStr, SkPathOp op); 41 42void RunTestSet(skiatest::Reporter* reporter, TestDesc tests[], size_t count, 43 void (*firstTest)(skiatest::Reporter* ), 44 void (*stopTest)(skiatest::Reporter* ), bool reverse); 45void ShowTestName(PathOpsThreadState* data, int a, int b, int c, int d); 46 47#endif 48