Enable embedder tests RenderWithPause and RenderWithoutPause for Skia/SkiaPaths.
In test suite FPDFProgressiveRenderEmbedderTest, when Skia/SkiaPaths
is enabled, the rendering results for RenderWithPause and
RenderWithoutPause have acceptable small discrepancies on the edge of
texts, which is caused by Skia uses different anti-aliasing and font
face rendering methods compared to AGG.
This CL updates the Skia/SkiaPaths expected checksums for these two
tests so that they can pass.
Bug: pdfium:1500
Change-Id: I9d7de67e029daf2029a40bc3eccd3f3128b2145c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72015
Commit-Queue: Hui Yingst <nigi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp b/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
index b3daa4e..02e9896 100644
--- a/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
+++ b/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
@@ -20,6 +20,15 @@
constexpr FX_ARGB kRed = 0xFFFF0000;
constexpr FX_ARGB kWhite = 0xFFFFFFFF;
+#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
+#if defined(OS_LINUX)
+static constexpr char kAnnotationStampWithApBaseContentChecksum[] =
+ "fbd62f1df1cae1fd2fbf5a24bed6b4cd";
+#else
+static constexpr char kAnnotationStampWithApBaseContentChecksum[] =
+ "44e6dd3c36d8bbfb38d306b442e61241";
+#endif // defined(OS_LINUX)
+#else
#if defined(OS_WIN)
static constexpr char kAnnotationStampWithApBaseContentChecksum[] =
"649d6792ea50faf98c013c2d81710595";
@@ -30,6 +39,7 @@
static constexpr char kAnnotationStampWithApBaseContentChecksum[] =
"a24edc7740f1d6f76899652dcf825dea";
#endif
+#endif // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
} // namespace
@@ -219,13 +229,7 @@
return FinishRenderPageWithForms(page, form_handle_);
}
-// TODO(crbug.com/pdfium/11): Fix this test and enable.
-#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
-#define MAYBE_RenderWithoutPause DISABLED_RenderWithoutPause
-#else
-#define MAYBE_RenderWithoutPause RenderWithoutPause
-#endif
-TEST_F(FPDFProgressiveRenderEmbedderTest, MAYBE_RenderWithoutPause) {
+TEST_F(FPDFProgressiveRenderEmbedderTest, RenderWithoutPause) {
// Test rendering of page content using progressive render APIs
// without pausing the rendering.
ASSERT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
@@ -239,13 +243,7 @@
UnloadPage(page);
}
-// TODO(crbug.com/pdfium/11): Fix this test and enable.
-#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
-#define MAYBE_RenderWithPause DISABLED_RenderWithPause
-#else
-#define MAYBE_RenderWithPause RenderWithPause
-#endif
-TEST_F(FPDFProgressiveRenderEmbedderTest, MAYBE_RenderWithPause) {
+TEST_F(FPDFProgressiveRenderEmbedderTest, RenderWithPause) {
// Test rendering of page content using progressive render APIs
// with pause in rendering.
ASSERT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));