38aeb0fd7a
Also: - make GrMemoryPoolBenches threadsafe - some tweaks to various DM code - rename GM::shortName() to getName() to match benches and tests On my desktop, (289 GMs, 617 benches) x 4 configs, 227 tests takes 46s in Debug, 14s in Release. (Still minutes faster than running tests && bench && gm.) GPU singlethreading is definitely the limiting factor again; going to reexamine whether that's helpful to thread it again. BUG=skia: R=reed@google.com, bsalomon@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/178473006 git-svn-id: http://skia.googlecode.com/svn/trunk@13603 2bbb7eff-a529-9590-31e7-b0007b416f81
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#include "DMTestTask.h"
|
|
#include "DMUtil.h"
|
|
#include "SkCommandLineFlags.h"
|
|
|
|
DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests.");
|
|
DEFINE_bool2(pathOpsSingleThread, z, false, "Disallow pathOps tests from using threads.");
|
|
DEFINE_bool2(pathOpsVerbose, V, false, "Tell pathOps tests to be verbose.");
|
|
|
|
namespace DM {
|
|
|
|
static SkString test_name(const char* name) {
|
|
SkString result("test ");
|
|
result.append(name);
|
|
return result;
|
|
}
|
|
|
|
TestTask::TestTask(Reporter* reporter,
|
|
TaskRunner* taskRunner,
|
|
skiatest::TestRegistry::Factory factory)
|
|
: Task(reporter, taskRunner)
|
|
, fTest(factory(NULL))
|
|
, fName(test_name(fTest->getName())) {}
|
|
|
|
void TestTask::draw() {
|
|
if (this->usesGpu()) {
|
|
fTest->setGrContextFactory(this->getGrContextFactory());
|
|
}
|
|
fTest->setReporter(&fTestReporter);
|
|
fTest->run();
|
|
if (!fTest->passed()) {
|
|
this->fail(fTestReporter.failure());
|
|
}
|
|
}
|
|
|
|
bool TestTask::TestReporter::allowExtendedTest() const { return FLAGS_pathOpsExtended; }
|
|
bool TestTask::TestReporter::allowThreaded() const { return !FLAGS_pathOpsSingleThread; }
|
|
bool TestTask::TestReporter::verbose() const { return FLAGS_pathOpsVerbose; }
|
|
|
|
} // namespace DM
|