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

Unified Diff: cc/trees/layer_tree_host_pixeltest_blending.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_blending.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc
index 5bce9ddb70196fdba90d7c3d3de95f549ab1eee9..7a9ef2123836ed8549689b9025dbb432a4c8a95c 100644
--- a/cc/trees/layer_tree_host_pixeltest_blending.cc
+++ b/cc/trees/layer_tree_host_pixeltest_blending.cc
@@ -233,31 +233,27 @@ class LayerTreeHostBlendingPixelTest : public LayerTreePixelTest {
if ((flags & kUseAntialiasing) && (type == PIXEL_TEST_GL)) {
// Anti aliasing causes differences up to 7 pixels at the edges.
- int large_error_allowed = 7;
+ // Several pixels have 9 units difference on the alpha channel.
+ int large_error_allowed = (flags & kUseMasks) ? 7 : 9;
// Blending results might differ with one pixel.
int small_error_allowed = 1;
// Most of the errors are one pixel errors.
- float percentage_pixels_small_error = 12.5f;
+ float percentage_pixels_small_error = (flags & kUseMasks) ? 7.7f : 12.1f;
// Because of anti-aliasing, around 3% of pixels (at the edges) have
// bigger errors (from small_error_allowed + 1 to large_error_allowed).
- float percentage_pixels_error = 15.0f;
+ float percentage_pixels_error = (flags & kUseMasks) ? 12.4f : 15.f;
// The average error is still close to 1.
- float average_error_allowed_in_bad_pixels = 1.3f;
+ float average_error_allowed_in_bad_pixels =
+ (flags & kUseMasks) ? 1.3f : 1.f;
// The sepia filter generates more small errors, but the number of large
// errors remains around 3%.
if (flags & kUseColorMatrix) {
- percentage_pixels_small_error = 26.f;
- percentage_pixels_error = 29.f;
+ percentage_pixels_small_error = (flags & kUseMasks) ? 14.0f : 26.f;
+ percentage_pixels_error = (flags & kUseMasks) ? 18.5f : 29.f;
+ average_error_allowed_in_bad_pixels = (flags & kUseMasks) ? 0.9f : 0.7f;
}
- // Anti-aliased pixels in combination with non-separable blend modes and
- // a white background produces several black pixels (6 for these tests).
- // Having a mask will hide the black pixels.
- // TODO(rosca): fix this issue for non-separable blend modes.
- if (!(flags & kUseMasks))
- large_error_allowed = 255;
-
pixel_comparator_.reset(
new FuzzyPixelComparator(false, // discard_alpha
percentage_pixels_error,
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698