Flutter Engine
The Flutter Engine
|
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkPathTypes.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkRegion.h"
#include "include/core/SkScalar.h"
#include "include/core/SkStream.h"
#include "include/core/SkString.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkMutex.h"
#include "include/private/base/SkTDArray.h"
#include "include/utils/SkParsePath.h"
#include "src/base/SkFloatBits.h"
#include "src/core/SkPathPriv.h"
#include "src/pathops/SkPathOpsDebug.h"
#include "tests/PathOpsDebug.h"
#include "tests/PathOpsExtendedTest.h"
#include "tests/PathOpsThreadedCommon.h"
#include "tests/Test.h"
#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <sstream>
Go to the source code of this file.
Enumerations | |
enum class | ExpectSuccess { kNo , kYes , kFlaky } |
enum class | SkipAssert { kNo , kYes } |
enum class | ExpectMatch { kNo , kYes , kFlaky } |
Functions | |
template<typename T > | |
std::string | std_to_string (T value) |
bool | OpDebug (const SkPath &one, const SkPath &two, SkPathOp op, SkPath *result SkDEBUGPARAMS(bool skipAssert) SkDEBUGPARAMS(const char *testName)) |
bool | SimplifyDebug (const SkPath &one, SkPath *result SkDEBUGPARAMS(bool skipAssert) SkDEBUGPARAMS(const char *testName)) |
void | showOp (const SkPathOp op) |
static void | scaleMatrix (const SkPath &one, const SkPath &two, SkMatrix &scale) |
static int | pathsDrawTheSame (SkBitmap &bits, const SkPath &scaledOne, const SkPath &scaledTwo, int &error2x2) |
static int | pathsDrawTheSame (const SkPath &one, const SkPath &two, SkBitmap &bits, SkPath &scaledOne, SkPath &scaledTwo, int &error2x2) |
bool | drawAsciiPaths (const SkPath &one, const SkPath &two, bool drawPaths) |
int | comparePaths (skiatest::Reporter *reporter, const char *filename, const SkPath &one, const SkPath &two, SkBitmap &bitmap) |
static void | showPathOpPath (const char *testName, const SkPath &one, const SkPath &two, const SkPath &a, const SkPath &b, const SkPath &scaledOne, const SkPath &scaledTwo, const SkPathOp shapeOp, const SkMatrix &scale) |
static int | comparePaths (skiatest::Reporter *reporter, const char *testName, const SkPath &one, const SkPath &scaledOne, const SkPath &two, const SkPath &scaledTwo, SkBitmap &bitmap, const SkPath &a, const SkPath &b, const SkPathOp shapeOp, const SkMatrix &scale, ExpectMatch expectMatch) |
static void | appendTestName (const char *nameSuffix, std::string &out) |
static void | appendTest (const char *pathStr, const char *pathPrefix, const char *nameSuffix, const char *testFunction, bool twoPaths, std::string &out) |
void | markTestFlakyForPathKit () |
bool | testSimplify (SkPath &path, bool useXor, SkPath &out, PathOpsThreadState &state, const char *pathStr) |
static void | json_status (ExpectSuccess expectSuccess, ExpectMatch expectMatch, bool opSucceeded) |
static void | json_path_out (const SkPath &path, const char *pathName, const char *fillTypeName, bool lastField) |
static bool | check_for_duplicate_names (const char *testName) |
static bool | inner_simplify (skiatest::Reporter *reporter, const SkPath &path, const char *filename, ExpectSuccess expectSuccess, SkipAssert skipAssert, ExpectMatch expectMatch) |
bool | testSimplify (skiatest::Reporter *reporter, const SkPath &path, const char *filename) |
bool | testSimplifyFuzz (skiatest::Reporter *reporter, const SkPath &path, const char *filename) |
bool | testSimplifyCheck (skiatest::Reporter *reporter, const SkPath &path, const char *filename, bool checkFail) |
bool | testSimplifyFail (skiatest::Reporter *reporter, const SkPath &path, const char *filename) |
static bool | innerPathOp (skiatest::Reporter *reporter, const SkPath &a, const SkPath &b, const SkPathOp shapeOp, const char *testName, ExpectSuccess expectSuccess, SkipAssert skipAssert, ExpectMatch expectMatch) |
bool | testPathOp (skiatest::Reporter *reporter, const SkPath &a, const SkPath &b, const SkPathOp shapeOp, const char *testName) |
bool | testPathOpCheck (skiatest::Reporter *reporter, const SkPath &a, const SkPath &b, const SkPathOp shapeOp, const char *testName, bool checkFail) |
bool | testPathOpFuzz (skiatest::Reporter *reporter, const SkPath &a, const SkPath &b, const SkPathOp shapeOp, const char *testName) |
bool | testPathOpFail (skiatest::Reporter *reporter, const SkPath &a, const SkPath &b, const SkPathOp shapeOp, const char *testName) |
void | initializeTests (skiatest::Reporter *reporter, const char *test) |
void | RunTestSet (skiatest::Reporter *reporter, TestDesc tests[], size_t count, void(*firstTest)(skiatest::Reporter *, const char *filename), void(*skipTest)(skiatest::Reporter *, const char *filename), void(*stopTest)(skiatest::Reporter *, const char *filename), bool reverse) |
Variables | |
std::vector< std::string > | gUniqueNames |
static const char | marker [] |
static const char * | opStrs [] |
static const char * | opSuffixes [] |
const int | kBitWidth = 64 |
const int | kBitHeight = 64 |
static SkTDArray< SkPathOp > | gTestOp |
static int | sTestNumber = 55 |
static const char * | sTestName = "pathOpTest" |
|
strong |
Enumerator | |
---|---|
kNo | |
kYes | |
kFlaky |
Definition at line 101 of file PathOpsExtendedTest.cpp.
|
strong |
Enumerator | |
---|---|
kNo | |
kYes | |
kFlaky |
Definition at line 90 of file PathOpsExtendedTest.cpp.
|
strong |
|
static |
Definition at line 324 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 315 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 464 of file PathOpsExtendedTest.cpp.
int comparePaths | ( | skiatest::Reporter * | reporter, |
const char * | filename, | ||
const SkPath & | one, | ||
const SkPath & | two, | ||
SkBitmap & | bitmap | ||
) |
Definition at line 252 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 284 of file PathOpsExtendedTest.cpp.
Definition at line 205 of file PathOpsExtendedTest.cpp.
void initializeTests | ( | skiatest::Reporter * | reporter, |
const char * | test | ||
) |
Definition at line 650 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 476 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 547 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 423 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 409 of file PathOpsExtendedTest.cpp.
void markTestFlakyForPathKit | ( | ) |
Definition at line 369 of file PathOpsExtendedTest.cpp.
bool OpDebug | ( | const SkPath & | one, |
const SkPath & | two, | ||
SkPathOp | op, | ||
SkPath *result | SkDEBUGPARAMSbool skipAssert) SkDEBUGPARAMS(const char *testName | ||
) |
Definition at line 252 of file SkPathOpsOp.cpp.
|
static |
Definition at line 196 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 158 of file PathOpsExtendedTest.cpp.
void RunTestSet | ( | skiatest::Reporter * | reporter, |
TestDesc | tests[], | ||
size_t | count, | ||
void(*)(skiatest::Reporter *, const char *filename) | firstTest, | ||
void(*)(skiatest::Reporter *, const char *filename) | skipTest, | ||
void(*)(skiatest::Reporter *, const char *filename) | stopTest, | ||
bool | reverse | ||
) |
Definition at line 691 of file PathOpsExtendedTest.cpp.
Definition at line 132 of file PathOpsExtendedTest.cpp.
void showOp | ( | const SkPathOp | op | ) |
Definition at line 107 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 266 of file PathOpsExtendedTest.cpp.
bool SimplifyDebug | ( | const SkPath & | one, |
SkPath *result | SkDEBUGPARAMSbool skipAssert) SkDEBUGPARAMS(const char *testName | ||
) |
Definition at line 205 of file SkPathOpsSimplify.cpp.
Definition at line 52 of file PathOpsExtendedTest.cpp.
bool testPathOp | ( | skiatest::Reporter * | reporter, |
const SkPath & | a, | ||
const SkPath & | b, | ||
const SkPathOp | shapeOp, | ||
const char * | testName | ||
) |
Definition at line 618 of file PathOpsExtendedTest.cpp.
bool testPathOpCheck | ( | skiatest::Reporter * | reporter, |
const SkPath & | a, | ||
const SkPath & | b, | ||
const SkPathOp | shapeOp, | ||
const char * | testName, | ||
bool | checkFail | ||
) |
Definition at line 624 of file PathOpsExtendedTest.cpp.
bool testPathOpFail | ( | skiatest::Reporter * | reporter, |
const SkPath & | a, | ||
const SkPath & | b, | ||
const SkPathOp | shapeOp, | ||
const char * | testName | ||
) |
Definition at line 636 of file PathOpsExtendedTest.cpp.
bool testPathOpFuzz | ( | skiatest::Reporter * | reporter, |
const SkPath & | a, | ||
const SkPath & | b, | ||
const SkPathOp | shapeOp, | ||
const char * | testName | ||
) |
Definition at line 630 of file PathOpsExtendedTest.cpp.
bool testSimplify | ( | skiatest::Reporter * | reporter, |
const SkPath & | path, | ||
const char * | filename | ||
) |
Definition at line 526 of file PathOpsExtendedTest.cpp.
bool testSimplify | ( | SkPath & | path, |
bool | useXor, | ||
SkPath & | out, | ||
PathOpsThreadState & | state, | ||
const char * | pathStr | ||
) |
Definition at line 376 of file PathOpsExtendedTest.cpp.
bool testSimplifyCheck | ( | skiatest::Reporter * | reporter, |
const SkPath & | path, | ||
const char * | filename, | ||
bool | checkFail | ||
) |
Definition at line 536 of file PathOpsExtendedTest.cpp.
bool testSimplifyFail | ( | skiatest::Reporter * | reporter, |
const SkPath & | path, | ||
const char * | filename | ||
) |
Definition at line 542 of file PathOpsExtendedTest.cpp.
bool testSimplifyFuzz | ( | skiatest::Reporter * | reporter, |
const SkPath & | path, | ||
const char * | filename | ||
) |
Definition at line 531 of file PathOpsExtendedTest.cpp.
Definition at line 264 of file PathOpsExtendedTest.cpp.
std::vector<std::string> gUniqueNames |
Definition at line 42 of file PathOpsExtendedTest.cpp.
const int kBitHeight = 64 |
Definition at line 130 of file PathOpsExtendedTest.cpp.
const int kBitWidth = 64 |
Definition at line 129 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 67 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 74 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 82 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 313 of file PathOpsExtendedTest.cpp.
|
static |
Definition at line 312 of file PathOpsExtendedTest.cpp.