| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * 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 |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #ifndef gm_expectations_DEFINED | 7 #ifndef gm_expectations_DEFINED |
| 8 #define gm_expectations_DEFINED | 8 #define gm_expectations_DEFINED |
| 9 | 9 |
| 10 #include "gm.h" | 10 #include "gm.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 SkTArray<GmResultDigest> fAllowedResultDigests; | 165 SkTArray<GmResultDigest> fAllowedResultDigests; |
| 166 bool fIgnoreFailure; | 166 bool fIgnoreFailure; |
| 167 SkBitmap fBitmap; | 167 SkBitmap fBitmap; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * Abstract source of Expectations objects for individual tests. | 171 * Abstract source of Expectations objects for individual tests. |
| 172 */ | 172 */ |
| 173 class ExpectationsSource : public SkRefCnt { | 173 class ExpectationsSource : public SkRefCnt { |
| 174 public: | 174 public: |
| 175 SK_DECLARE_INST_COUNT(ExpectationsSource) |
| 176 |
| 175 virtual Expectations get(const char *testName) = 0; | 177 virtual Expectations get(const char *testName) = 0; |
| 178 |
| 179 private: |
| 180 typedef SkRefCnt INHERITED; |
| 176 }; | 181 }; |
| 177 | 182 |
| 178 /** | 183 /** |
| 179 * Return Expectations based on individual image files on disk. | 184 * Return Expectations based on individual image files on disk. |
| 180 */ | 185 */ |
| 181 class IndividualImageExpectationsSource : public ExpectationsSource { | 186 class IndividualImageExpectationsSource : public ExpectationsSource { |
| 182 public: | 187 public: |
| 183 /** | 188 /** |
| 184 * Create an ExpectationsSource that will return Expectations based on | 189 * Create an ExpectationsSource that will return Expectations based on |
| 185 * image files found within rootDir. | 190 * image files found within rootDir. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 * Returns true if successful. | 264 * Returns true if successful. |
| 260 */ | 265 */ |
| 261 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); | 266 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); |
| 262 | 267 |
| 263 Json::Value fJsonRoot; | 268 Json::Value fJsonRoot; |
| 264 Json::Value fJsonExpectedResults; | 269 Json::Value fJsonExpectedResults; |
| 265 }; | 270 }; |
| 266 | 271 |
| 267 } | 272 } |
| 268 #endif | 273 #endif |
| OLD | NEW |