| 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 * TODO(epoger): Combine this with tools/image_expectations.h, or eliminate one
of the two. | 7 * TODO(epoger): Combine this with tools/image_expectations.h, or eliminate one
of the two. |
| 8 */ | 8 */ |
| 9 #ifndef gm_expectations_DEFINED | 9 #ifndef gm_expectations_DEFINED |
| 10 #define gm_expectations_DEFINED | 10 #define gm_expectations_DEFINED |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 SkTArray<GmResultDigest> fAllowedResultDigests; | 164 SkTArray<GmResultDigest> fAllowedResultDigests; |
| 165 bool fIgnoreFailure; | 165 bool fIgnoreFailure; |
| 166 SkBitmap fBitmap; | 166 SkBitmap fBitmap; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 /** | 169 /** |
| 170 * Abstract source of Expectations objects for individual tests. | 170 * Abstract source of Expectations objects for individual tests. |
| 171 */ | 171 */ |
| 172 class ExpectationsSource : public SkRefCnt { | 172 class ExpectationsSource : public SkRefCnt { |
| 173 public: | 173 public: |
| 174 SK_DECLARE_INST_COUNT(ExpectationsSource) | |
| 175 | |
| 176 virtual Expectations get(const char *testName) const = 0; | 174 virtual Expectations get(const char *testName) const = 0; |
| 177 | 175 |
| 178 private: | 176 private: |
| 179 typedef SkRefCnt INHERITED; | 177 typedef SkRefCnt INHERITED; |
| 180 }; | 178 }; |
| 181 | 179 |
| 182 /** | 180 /** |
| 183 * Return Expectations based on individual image files on disk. | 181 * Return Expectations based on individual image files on disk. |
| 184 */ | 182 */ |
| 185 class IndividualImageExpectationsSource : public ExpectationsSource { | 183 class IndividualImageExpectationsSource : public ExpectationsSource { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 * Returns true if successful. | 220 * Returns true if successful. |
| 223 */ | 221 */ |
| 224 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); | 222 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); |
| 225 | 223 |
| 226 Json::Value fJsonRoot; | 224 Json::Value fJsonRoot; |
| 227 Json::Value fJsonExpectedResults; | 225 Json::Value fJsonExpectedResults; |
| 228 }; | 226 }; |
| 229 | 227 |
| 230 } | 228 } |
| 231 #endif | 229 #endif |
| OLD | NEW |