commit | a3b27852635dfa0106b5317ea7cc40dfc8a8d34f | [log] [tgz] |
---|---|---|
author | ztenghui <ztenghui@google.com> | Tue May 26 10:00:17 2015 -0700 |
committer | ztenghui <ztenghui@google.com> | Tue May 26 10:47:52 2015 -0700 |
tree | 3e5c1a3c3bda88148a6ee1932097d27b9cabfc43 | |
parent | 200f0e2b670cc0ef8574907c29e22068622284fb [diff] |
Update the golden images and compare algorithm This seems caused by the change in anti-alias edge. Update the algorithm to be more tolerant. b/21436806 Change-Id: I7337a0792530ad3a74b9cd6028969e52a0c06d0c
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_1_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_1_golden.png index 91776a9..67f5746 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_1_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_1_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_2_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_2_golden.png index 9af40a3..c60dfba 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_2_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_random_path_2_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_1_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_1_golden.png index b3acfe7..e7cc4d1 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_1_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_1_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_2_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_2_golden.png index bbc84b9..c7c049b 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_2_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_a_2_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_cq_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_cq_golden.png index 8d73cfd..5880467 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_cq_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_cq_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_st_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_st_golden.png index 6094a9a..93fb1d0 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_st_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_repeated_st_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_1_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_1_golden.png index f8b660a..899a235 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_1_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_1_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_2_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_2_golden.png index e86e1b0..ba6d8c7 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_2_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_scale_2_golden.png Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/vector_icon_transformation_1_golden.png b/tests/tests/graphics/res/drawable-nodpi/vector_icon_transformation_1_golden.png index baf418d..1703878 100644 --- a/tests/tests/graphics/res/drawable-nodpi/vector_icon_transformation_1_golden.png +++ b/tests/tests/graphics/res/drawable-nodpi/vector_icon_transformation_1_golden.png Binary files differ
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java index d266efd..fdb8dae 100644 --- a/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java +++ b/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java
@@ -101,7 +101,8 @@ // exactly with the golden image. // We can increase the threshold if the Skia is drawing with some variance // on different devices. So far, the tests show they are matching correctly. - private static final float PIXEL_ERROR_THRESHOLD = 0.00001f; + private static final float PIXEL_ERROR_THRESHOLD = 0.02f; + private static final float PIXEL_ERROR_COUNT_THRESHOLD = 0.005f; private static final boolean DBG_DUMP_PNG = false; @@ -220,7 +221,7 @@ totalDiffPixelCount++; } } - if ((totalDiffPixelCount / totalPixelCount) >= PIXEL_ERROR_THRESHOLD) { + if ((totalDiffPixelCount / totalPixelCount) >= PIXEL_ERROR_COUNT_THRESHOLD) { fail((filename +": totalDiffPixelCount is " + totalDiffPixelCount)); }