[Skia] Eagerly flush paths
Flushes paths eagerly to Skia, rather than accumulating sequences of
similar paths. The anti-aliasing method used by Skia is sensitive to the
exact paths passed to individual drawing operations, so we must send
unaccumulated paths for consistency.
In most cases, eager flushing shouldn't have much performance impact, as
we're not actually flushing more anyway, and in some cases it may even
be beneficial, as Skia can optimize the simpler paths more easily.
This change requires updating some expectations to account for the
difference in anti-aliasing methods.
A future change will simplify SkiaState to eliminate support for lazy
flushing, which creates significant extra complexity.
Bug: pdfium:1963
Change-Id: I5bea6c6a41a05948834c9763de33c54360312da4
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104393
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Nigi <nigi@chromium.org>
diff --git a/DEPS b/DEPS
index 54e2edd..4f0b45e 100644
--- a/DEPS
+++ b/DEPS
@@ -140,7 +140,7 @@
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling pdfium_tests
# and whatever else without interference from each other.
- 'pdfium_tests_revision': '5275dbcb7cfa4b6b7e049d7a4e2b58a86fa3aca0',
+ 'pdfium_tests_revision': '746093a2b0c48d5a081fd44c183cfe0287d4f331',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling resultdb
# and whatever else without interference from each other.
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index e615529..a73189b 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -848,6 +848,9 @@
if (MatrixOffset(pMatrix, &delta))
skPath.offset(delta.fX, delta.fY);
m_skPath.addPath(skPath);
+
+ // TODO(crbug.com/pdfium/1963): Simplify code assuming eager flushing.
+ Flush();
}
void FlushPath() {
@@ -1025,6 +1028,8 @@
}
}
}
+
+ // TODO(crbug.com/pdfium/1963): Simplify code assuming eager flushing.
return true;
}
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index b05b633..b224dad 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -209,16 +209,8 @@
form_combobox_per.pdf * nov8 * *
form_combobox_plus.pdf mac * * *
form_combobox_plus.pdf * nov8 * *
-
-# TODO(pdfium:1963): Remove after associated bug is fixed
-form_combobox_plus.pdf * * * skia
-
form_combobox_product.pdf mac * * *
form_combobox_product.pdf * nov8 * *
-
-# TODO(pdfium:1963): Remove after associated bug is fixed
-form_combobox_product.pdf * * * skia
-
form_combobox_resetform.pdf * * * *
form_combobox_time.pdf mac * * *
form_combobox_time.pdf * nov8 * *
@@ -366,9 +358,6 @@
# TODO(pdfium:1846): Remove after associated bug is fixed
bug_1846.in * * * agg
-# TODO(pdfium:1963): Remove after associated bug is fixed
-bug_1963.in * * * skia
-
# TODO(pdfium:1973): Remove after associated bug is fixed
bug_1973.in * * * *
diff --git a/testing/resources/pixel/bug_1883_expected_skia.pdf.1.png b/testing/resources/pixel/bug_1883_expected_skia.pdf.1.png
index ea6b2d8..0660877 100644
--- a/testing/resources/pixel/bug_1883_expected_skia.pdf.1.png
+++ b/testing/resources/pixel/bug_1883_expected_skia.pdf.1.png
Binary files differ
diff --git a/testing/resources/pixel/bug_1883_expected_skia.pdf.2.png b/testing/resources/pixel/bug_1883_expected_skia.pdf.2.png
index fce6fac..f0050f8 100644
--- a/testing/resources/pixel/bug_1883_expected_skia.pdf.2.png
+++ b/testing/resources/pixel/bug_1883_expected_skia.pdf.2.png
Binary files differ
diff --git a/testing/resources/pixel/bug_1883_expected_skia.pdf.3.png b/testing/resources/pixel/bug_1883_expected_skia.pdf.3.png
index 87b49d2..88d3e25 100644
--- a/testing/resources/pixel/bug_1883_expected_skia.pdf.3.png
+++ b/testing/resources/pixel/bug_1883_expected_skia.pdf.3.png
Binary files differ
diff --git a/testing/resources/pixel/bug_1983_expected_skia.pdf.0.png b/testing/resources/pixel/bug_1983_expected_skia.pdf.0.png
index c48fe3d..1e341ac 100644
--- a/testing/resources/pixel/bug_1983_expected_skia.pdf.0.png
+++ b/testing/resources/pixel/bug_1983_expected_skia.pdf.0.png
Binary files differ