| Index: tests/PathOpsExtendedTest.cpp
|
| diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
|
| index c32bfa1e061f5a4549e2c3735dc1b5639c5ea105..c3162abcc973a670d6039679ce02e9dac9ebe41a 100644
|
| --- a/tests/PathOpsExtendedTest.cpp
|
| +++ b/tests/PathOpsExtendedTest.cpp
|
| @@ -9,6 +9,7 @@
|
| #include "PathOpsThreadedCommon.h"
|
| #include "SkBitmap.h"
|
| #include "SkCanvas.h"
|
| +#include "SkForceLinking.h"
|
| #include "SkMatrix.h"
|
| #include "SkPaint.h"
|
| #include "SkStream.h"
|
| @@ -18,6 +19,8 @@
|
| #include <sys/sysctl.h>
|
| #endif
|
|
|
| +__SK_FORCE_IMAGE_DECODER_LINKING;
|
| +
|
| static const char marker[] =
|
| "</div>\n"
|
| "\n"
|
| @@ -627,29 +630,35 @@ bool testThreadedPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkP
|
| return innerPathOp(reporter, a, b, shapeOp, testName, true);
|
| }
|
|
|
| +SK_DECLARE_STATIC_MUTEX(gMutex);
|
| +
|
| int initializeTests(skiatest::Reporter* reporter, const char* test) {
|
| #ifdef SK_DEBUG
|
| SkPathOpsDebug::gMaxWindSum = 4;
|
| SkPathOpsDebug::gMaxWindValue = 4;
|
| #endif
|
| -#if DEBUG_SHOW_TEST_NAME
|
| - testName = test;
|
| - size_t testNameSize = strlen(test);
|
| - SkFILEStream inFile("../../experimental/Intersection/op.htm");
|
| - if (inFile.isValid()) {
|
| - SkTDArray<char> inData;
|
| - inData.setCount(inFile.getLength());
|
| - size_t inLen = inData.count();
|
| - inFile.read(inData.begin(), inLen);
|
| - inFile.setPath(NULL);
|
| - char* insert = strstr(inData.begin(), marker);
|
| - if (insert) {
|
| - insert += sizeof(marker) - 1;
|
| - const char* numLoc = insert + 4 /* indent spaces */ + testNameSize - 1;
|
| - testNumber = atoi(numLoc) + 1;
|
| + if (reporter->verbose()) {
|
| + SkAutoMutexAcquire lock(gMutex);
|
| + testName = test;
|
| + size_t testNameSize = strlen(test);
|
| + SkFILEStream inFile("../../experimental/Intersection/op.htm");
|
| + if (inFile.isValid()) {
|
| + SkTDArray<char> inData;
|
| + inData.setCount(inFile.getLength());
|
| + size_t inLen = inData.count();
|
| + inFile.read(inData.begin(), inLen);
|
| + inFile.setPath(NULL);
|
| + char* insert = strstr(inData.begin(), marker);
|
| + if (insert) {
|
| + insert += sizeof(marker) - 1;
|
| + const char* numLoc = insert + 4 /* indent spaces */ + testNameSize - 1;
|
| + testNumber = atoi(numLoc) + 1;
|
| + }
|
| }
|
| + } else {
|
| + testName = "pathOpTest";
|
| + testNumber = 1;
|
| }
|
| -#endif
|
| return reporter->allowThreaded() ? SkThreadPool::kThreadPerCore : 1;
|
| }
|
|
|
|
|