Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: cc/test/pixel_comparator.h

Issue 532003003: Adding support for blending in cc::SoftwareRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/trees/layer_tree_host_pixeltest_blending.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/trees/layer_tree_host_pixeltest_blending.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698