| OLD | NEW | 
|---|
| 1 |  | 
| 2 /* | 1 /* | 
| 3  * Copyright 2011 Google Inc. | 2  * Copyright 2011 Google Inc. | 
| 4  * | 3  * | 
| 5  * 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 | 
| 6  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 7  */ | 6  */ | 
|  | 7 | 
| 8 #include "Test.h" | 8 #include "Test.h" | 
| 9 | 9 | 
| 10 #include "SkCommandLineFlags.h" | 10 #include "SkCommandLineFlags.h" | 
| 11 #include "SkError.h" | 11 #include "SkError.h" | 
| 12 #include "SkString.h" | 12 #include "SkString.h" | 
| 13 #include "SkTArray.h" | 13 #include "SkTArray.h" | 
| 14 #include "SkTime.h" | 14 #include "SkTime.h" | 
| 15 | 15 | 
| 16 #if SK_SUPPORT_GPU | 16 #if SK_SUPPORT_GPU | 
| 17 #include "GrContext.h" | 17 #include "GrContext.h" | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 34 void Reporter::reportFailed(const SkString& desc) { | 34 void Reporter::reportFailed(const SkString& desc) { | 
| 35     this->onReportFailed(desc); | 35     this->onReportFailed(desc); | 
| 36 } | 36 } | 
| 37 | 37 | 
| 38 void Reporter::endTest(Test* test) { | 38 void Reporter::endTest(Test* test) { | 
| 39     this->onEnd(test); | 39     this->onEnd(test); | 
| 40 } | 40 } | 
| 41 | 41 | 
| 42 /////////////////////////////////////////////////////////////////////////////// | 42 /////////////////////////////////////////////////////////////////////////////// | 
| 43 | 43 | 
|  | 44 const char* Test::gResourcePath; | 
|  | 45 | 
| 44 Test::Test() : fReporter(NULL), fPassed(true) {} | 46 Test::Test() : fReporter(NULL), fPassed(true) {} | 
| 45 | 47 | 
| 46 Test::~Test() { | 48 Test::~Test() { | 
| 47     SkSafeUnref(fReporter); | 49     SkSafeUnref(fReporter); | 
| 48 } | 50 } | 
| 49 | 51 | 
| 50 void Test::setReporter(Reporter* r) { | 52 void Test::setReporter(Reporter* r) { | 
| 51     SkRefCnt_SafeAssign(fReporter, r); | 53     SkRefCnt_SafeAssign(fReporter, r); | 
| 52 } | 54 } | 
| 53 | 55 | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 114     } | 116     } | 
| 115     fReporter->endTest(this); | 117     fReporter->endTest(this); | 
| 116 | 118 | 
| 117 } | 119 } | 
| 118 | 120 | 
| 119 SkString Test::GetTmpDir() { | 121 SkString Test::GetTmpDir() { | 
| 120     const char* tmpDir = FLAGS_tmpDir.isEmpty() ? NULL : FLAGS_tmpDir[0]; | 122     const char* tmpDir = FLAGS_tmpDir.isEmpty() ? NULL : FLAGS_tmpDir[0]; | 
| 121     return SkString(tmpDir); | 123     return SkString(tmpDir); | 
| 122 } | 124 } | 
| 123 | 125 | 
| 124 static const char* gResourcePath = NULL; | 126 void Test::SetResourcePath(const char* resourcePath) { | 
| 125 void Test::SetResourcePath(const char* resourcePath) { gResourcePath = resourceP
     ath; } | 127     gResourcePath = resourcePath; | 
|  | 128 } | 
| 126 | 129 | 
| 127 SkString Test::GetResourcePath() { | 130 SkString Test::GetResourcePath() { | 
| 128     return SkString(gResourcePath); | 131     return SkString(gResourcePath); | 
| 129 } | 132 } | 
| OLD | NEW | 
|---|