| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_TEST_PIXEL_COMPARATOR_H_ | 5 #ifndef CC_TEST_PIXEL_COMPARATOR_H_ |
| 6 #define CC_TEST_PIXEL_COMPARATOR_H_ | 6 #define CC_TEST_PIXEL_COMPARATOR_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // Limit for percentage of pixels with a small error. | 62 // Limit for percentage of pixels with a small error. |
| 63 float small_error_pixels_percentage_limit_; | 63 float small_error_pixels_percentage_limit_; |
| 64 // Limit for average absolute error (excluding identical pixels). | 64 // Limit for average absolute error (excluding identical pixels). |
| 65 float avg_abs_error_limit_; | 65 float avg_abs_error_limit_; |
| 66 // Limit for largest absolute error. | 66 // Limit for largest absolute error. |
| 67 int max_abs_error_limit_; | 67 int max_abs_error_limit_; |
| 68 // Threshold for small errors. | 68 // Threshold for small errors. |
| 69 int small_error_threshold_; | 69 int small_error_threshold_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 // All pixels can be off by one, but any more than that is an error. |
| 73 class FuzzyPixelOffByOneComparator : public FuzzyPixelComparator { |
| 74 public: |
| 75 explicit FuzzyPixelOffByOneComparator(bool discard_alpha) |
| 76 : FuzzyPixelComparator(discard_alpha, 100.f, 0.f, 1.f, 1, 0) {} |
| 77 }; |
| 78 |
| 72 } // namespace cc | 79 } // namespace cc |
| 73 | 80 |
| 74 #endif // CC_TEST_PIXEL_COMPARATOR_H_ | 81 #endif // CC_TEST_PIXEL_COMPARATOR_H_ |
| OLD | NEW |