Issue 1500 in pdfium: Make embedder tests pass for SkiaPaths

25 views
Skip to first unread message

n… via monorail

unread,
Oct 8, 2020, 9:12:45 PM10/8/20
to pdfiu...@googlegroups.com
Updates:
Summary: Make embedder tests pass for SkiaPaths

Comment #65 on issue 1500 by ni...@chromium.org: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c65

(No comment was entered for this change.)

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

bugdroid via monorail

unread,
Oct 9, 2020, 1:50:08 AM10/9/20
to pdfiu...@googlegroups.com

Comment #66 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c66

The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/57daee8ec531fa870addf4e886e1471afb9512c1

commit 57daee8ec531fa870addf4e886e1471afb9512c1
Author: Hui Yingst <ni...@chromium.org>
Date: Fri Oct 09 05:47:20 2020

Update Skia/SkiaPaths embedder tests' macOS expected results.

FPDFAnnotEmbedderTest.ExtractInkMultiple,
FPDFAnnotEmbedderTest.AddAndSaveUnderlineAnnotation and
FPDFFormFillEmbedderTest.FormText's Skia expected results are affected
when macOS version is upgraded from 10.15.4 to 10.15.6.

This CL update the macOS expected results for these embedder tests to
match the rendering results generated by macOS version 10.15.6 (same
version as PDFium bots).

Bug: pdfium:1500
Change-Id: I61bddbc5404ab4a6818265b1753d925e7b92913c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74730
Reviewed-by: Lei Zhang <the...@chromium.org>
Commit-Queue: Hui Yingst <ni...@chromium.org>

[modify] https://pdfium.googlesource.com/pdfium/+/57daee8ec531fa870addf4e886e1471afb9512c1/fpdfsdk/fpdf_formfill_embeddertest.cpp
[modify] https://pdfium.googlesource.com/pdfium/+/57daee8ec531fa870addf4e886e1471afb9512c1/fpdfsdk/fpdf_annot_embeddertest.cpp

bugdroid via monorail

unread,
Oct 12, 2020, 7:02:55 PM10/12/20
to pdfiu...@googlegroups.com

Comment #68 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c68


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/607f1e42bb486c52ce488edf889095dc789d11aa

commit 607f1e42bb486c52ce488edf889095dc789d11aa
Author: Hui Yingst <ni...@chromium.org>
Date: Mon Oct 12 23:01:27 2020

Disable FPDFFormFillEmbedderTest.FormText on Windows for Skia and SkiaPaths.

FPDFFormFillEmbedderTest.FormText currently doesn't pass on Windows with
Skia/SkiaPaths enabled. Therefore this CL disables this test for the
same configurations. This CL also fixes the expected results to be
arranged in the order of OS_WIN, OS_APPLE and other platforms.

Bug: pdfium:1500
Change-Id: I2e9219505bf7dbd89fc36b014f0a086b8ec7fe9b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74990

Reviewed-by: Lei Zhang <the...@chromium.org>
Commit-Queue: Hui Yingst <ni...@chromium.org>

bugdroid via monorail

unread,
Oct 12, 2020, 7:04:05 PM10/12/20
to pdfiu...@googlegroups.com

Comment #67 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c67


The following revision refers to this bug:
https://chromium.googlesource.com/chromium/tools/build/+/527303dd8a3376ffdfba1517499bd9bd240caa97

commit 527303dd8a3376ffdfba1517499bd9bd240caa97
Author: Hui Yingst <ni...@chromium.org>
Date: Mon Oct 12 23:01:48 2020

Enable embedder tests on PDFium bots with Skia/SkiaPaths enabled.

The PDFium bots with Skia/SkiaPaths enabled currently skip all the
tests. To gradually enable partial testing on these bots, this CL adds
a new property |selected_tests_only| to PDFium bot recipes so that we
can enable tests gradually until all tests can pass for Skia/SkiaPaths
on these bots.

|selected_tests_only| only enables PDFium unit tests and embedder tests
in this CL.

Bug: pdfium:1500
Change-Id: I6b11527053142b36378f159dc35bd27014811a80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2169566
Commit-Queue: Hui Yingst <ni...@chromium.org>
Reviewed-by: Lei Zhang <the...@chromium.org>

[add] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/fail-unittests-selected-tests-only.json
[add] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/fail-embeddertests-selected-tests-only.json
[modify] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/mac_skia.json
[modify] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.py
[modify] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/mac_skia_paths.json
[modify] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/win_skia_paths.json
[modify] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/linux_skia.json
[modify] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/linux_skia_paths.json
[modify] https://crrev.com/527303dd8a3376ffdfba1517499bd9bd240caa97/recipes/recipes/pdfium.expected/win_skia.json

bugdroid via monorail

unread,
Oct 12, 2020, 9:06:56 PM10/12/20
to pdfiu...@googlegroups.com
Updates:
Labels: merge-merged-config

Comment #69 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c69


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/7ad872e5a1ee7fc335ffa8a28b364248b64b53b3

commit 7ad872e5a1ee7fc335ffa8a28b364248b64b53b3
Author: Hui Yingst <ni...@chromium.org>
Date: Tue Oct 13 01:05:52 2020

Set property |selected_tests_only| to true for Skia/SkiaPaths bots.

Bug: pdfium:1500
Change-Id: If954d726257a47e0abf3c928cf5229f2f388921e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74992
Reviewed-by: Lei Zhang <the...@chromium.org>

[modify] https://pdfium.googlesource.com/pdfium/+/7ad872e5a1ee7fc335ffa8a28b364248b64b53b3/cr-buildbucket.cfg

bugdroid via monorail

unread,
Oct 13, 2020, 2:50:35 PM10/13/20
to pdfiu...@googlegroups.com

Comment #70 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c70


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/db66b427d2c3066d8f5bdf30240d49401d6a928e

commit db66b427d2c3066d8f5bdf30240d49401d6a928e
Author: Hui Yingst <ni...@chromium.org>
Date: Tue Oct 13 18:49:29 2020

Add new builders for Skia and SkiaPaths in the main PDFium console.

Bug: pdfium:1500
Change-Id: Ia291346413d4f62fc27b7379cdadf8e137c9eed1
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74993

Reviewed-by: Lei Zhang <the...@chromium.org>
Commit-Queue: Hui Yingst <ni...@chromium.org>

n… via monorail

unread,
Nov 5, 2020, 6:18:11 PM11/5/20
to pdfiu...@googlegroups.com

Comment #71 on issue 1500 by ni...@chromium.org: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c71

For fixing FPDFEditEmbedderTest.AddTrueTypeFontText and FPDFEditEmbedderTest.AddMarkedText:
Skia's and AGG's rendering results which match checksum |kInsertTrueTypeChecksum| and |kLoadedFontTextChecksum| are attached below.
(SkiaPaths have the same results as Skia.)

Attachments:
kInsertTrueTypeChecksum_skia.png 9.2 KB
kInsertTrueTypeChecksum_agg.png 10.3 KB
kLoadedFontTextChecksum_skia.png 6.9 KB
kLoadedFontTextChecksum_agg.png 7.3 KB

bugdroid via monorail

unread,
Nov 5, 2020, 6:35:49 PM11/5/20
to pdfiu...@googlegroups.com

Comment #72 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c72


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/9d6ec8fb24e8026b861a3d90ef02f998f880a725

commit 9d6ec8fb24e8026b861a3d90ef02f998f880a725
Author: Hui Yingst <ni...@chromium.org>
Date: Thu Nov 05 23:35:38 2020

Enable 2 tests in FPDFEditEmbedderTest for Skia/SkiaPaths.

In the FPDFEditEmbedderTest test suite, AddTrueTypeFontText and
AddMarkedText both test rendering results after inserting text in
truetype font "Arial". Since Skia/SkiaPaths renders texts with different
anti-aliasing methods compared to AGG, and avoids rounding the glyphs'
horizontal positions to integers, the text rendering results will have
small discrepancies along the edge of the text and at some characters'
positions compared to AGG's expected results. However the Skia/SkiaPaths
rendering results are considered acceptable.

This CL updates the expected results for Skia and SkiaPaths for these
tests so that they can can be enabled.

Bug: pdfium:1500
Change-Id: I7f55444f7f90ffafe85477e70415b38794f798b9
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72212
Reviewed-by: Daniel Hosseinian <dh...@chromium.org>
Commit-Queue: Hui Yingst <ni...@chromium.org>

[modify] https://pdfium.googlesource.com/pdfium/+/9d6ec8fb24e8026b861a3d90ef02f998f880a725/fpdfsdk/fpdf_edit_embeddertest.cpp

n… via monorail

unread,
Nov 5, 2020, 10:51:43 PM11/5/20
to pdfiu...@googlegroups.com

Comment #73 on issue 1500 by ni...@chromium.org: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c73

The AGG and Skia rendering results for test FPDFEditEmbedderTest.RemoveAllFromStream are attached below:

Attachments:
kStream1RemovedChecksum_agg.png 16.8 KB
kStream1RemovedChecksum-skia.png 16.1 KB

bugdroid via monorail

unread,
Nov 6, 2020, 12:35:25 PM11/6/20
to pdfiu...@googlegroups.com

Comment #74 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c74


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/0d692fe5be9585e686fe5a5197f69f205ad83e3a

commit 0d692fe5be9585e686fe5a5197f69f205ad83e3a
Author: Hui Yingst <ni...@chromium.org>
Date: Fri Nov 06 17:32:50 2020

Enable FPDFEditEmbedderTest.RemoveAllFromStream for Skia/SkiaPaths.

The Skia/SkiaPaths rendering result for
FPDFEditEmbedderTest.RemoveAllFromStream has small discrepancies
compared to AGG's expectation due to the following reasons:

- Skia uses different glyph loading method compared to AGG, and it
changes for rendering text at different scales (See
https://crbug.com/pdfium/1500#c7). The text rendering discrepancies
between Skia and AGG decreases as the scale goes up.
- For text rendering, Skia uses regular anti-aliasing while AGG by
default turn on LCD anti-aliasing, which will cause discrepancies
along the edges of the text.

Since the Skia/SkiaPaths rendering result is acceptable, this CL adds
the expected result for Skia/SkiaPaths so that this test can pass.

Bug: pdfium:1500
Change-Id: I9d9efd70b2663e35eb3d05bf9b20fb8f98200b51
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76030

Reviewed-by: Daniel Hosseinian <dh...@chromium.org>
Commit-Queue: Hui Yingst <ni...@chromium.org>

bugdroid via monorail

unread,
Nov 9, 2020, 4:52:21 PM11/9/20
to pdfiu...@googlegroups.com

Comment #75 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c75


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/5e4a5a467caa13460b3585de228dab1fd4468154

commit 5e4a5a467caa13460b3585de228dab1fd4468154
Author: Hui Yingst <ni...@chromium.org>
Date: Mon Nov 09 21:50:06 2020

Add method CFX_WindowsRenderDevice::DebugVerifyBitmapIsPreMultiplied().

When rendering PDFs on a Windows platform, CFX_WindowsRenderDevice is
always used, and its |m_pDeviceDriver| can never be type
CFX_SkiaDeviceDriver even when Skia is enabled.

However, when Skia is enabled, the rendering process still checks
whether bitmap is pre-multiplied assuming CFX_SkiaDeviceDriver is the
only driver type that's being used, which causes crashes since
CFX_WindowsRenderDevice doesn't have a matching method
DebugVerifyBitmapIsPreMultiplied() for its possible device drivers and
CFX_RenderDevice::DebugVerifyBitmapIsPreMultiplied() gets called.

This CL adds the method
CFX_WindowsRenderDevice::DebugVerifyBitmapIsPreMultiplied() so that for
rendering with Skia on Windows, we can still verify the bitmap is
pre-multiplied without the device driver being CFX_SkiaDeviceDriver
type. This CL also enables the two Windows embedder tests which crash
due to missing this method.

Bug: pdfium:1500
Change-Id: Ie6d22200f44376dd88852da2450ae8f3e6065d5c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76016

Reviewed-by: Daniel Hosseinian <dh...@chromium.org>
Commit-Queue: Hui Yingst <ni...@chromium.org>

bugdroid via monorail

unread,
Nov 9, 2020, 5:37:54 PM11/9/20
to pdfiu...@googlegroups.com

Comment #76 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c76


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/603dcd8c116df8c00c69755d87ef28dc9584f134

commit 603dcd8c116df8c00c69755d87ef28dc9584f134
Author: Hui Yingst <ni...@chromium.org>
Date: Mon Nov 09 22:36:46 2020

Enable FPDFAnnotEmbedderTest.BUG_1206 for Skia/SkiaPaths.

With Skia/SkiaPaths enabled, the rendering result for
FPDFAnnotEmbedderTest.BUG_1206 has small discrepancies compared to AGG's
expected result. These discrepancies are caused by Skia's own way of
hairline handling which happens when the scale of rectangles are
relatively small.

Since the discrepancies are not very visible and the Skia/SkiaPaths
rendering results are considered acceptable, this CL updates the
Skia/SkiaPaths expectation for this test so that it can pass.

Bug: pdfium:1500
Change-Id: I8692d0469186d1a8b779f13810cdba6c53221805
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76070
Commit-Queue: Hui Yingst <ni...@chromium.org>
Reviewed-by: Daniel Hosseinian <dh...@chromium.org>

[modify] https://pdfium.googlesource.com/pdfium/+/603dcd8c116df8c00c69755d87ef28dc9584f134/fpdfsdk/fpdf_annot_embeddertest.cpp

n… via monorail

unread,
Nov 9, 2020, 8:31:34 PM11/9/20
to pdfiu...@googlegroups.com

Comment #77 on issue 1500 by ni...@chromium.org: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c77

FPDFEditEmbedderTest.SetTextKeepClippingPath rendering results:
AGG: SetTextKeepClippingPath_agg.png
Skia/SkiaPaths: SetTextKeepClippingPath_skia.png

Attachments:
SetTextKeepClippingPath_agg.png 2.3 KB
SetTextKeepClippingPath_skia.png 2.1 KB

n… via monorail

unread,
Nov 9, 2020, 8:35:28 PM11/9/20
to pdfiu...@googlegroups.com

Comment #78 on issue 1500 by ni...@chromium.org: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c78

FPDFEditEmbedderTest.AddStandardFontText rendering results:
AGG: kBottomTextChecksum_agg.png, md5_1_agg.png, md5_2_agg.png.
Skia/SkiaPaths: kBottomTextChecksum_skia.png, md5_1_skia.png, md5_2_skia.png.

Attachments:
kBottomTextChecksum_agg.png 6.8 KB
md5_1_agg.png 11.3 KB
md5_2_agg.png 24.5 KB
kBottomTextChecksum_skia.png 6.4 KB
md5_1_skia.png 9.9 KB
md5_2_skia.png 21.6 KB

n… via monorail

unread,
Nov 9, 2020, 8:37:07 PM11/9/20
to pdfiu...@googlegroups.com

Comment #79 on issue 1500 by ni...@chromium.org: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c79

FPDFEditEmbedderTest.AddCIDFontText rendering results:
AGG: AddCIDFontText_agg.png
Skia/SkiaPaths: AddCIDFontText_skia.png

Attachments:
AddCIDFontText_agg.png 10.8 KB
AddCIDFontText_skia.png 10.0 KB

bugdroid via monorail

unread,
Nov 10, 2020, 9:29:30 PM11/10/20
to pdfiu...@googlegroups.com

Comment #80 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c80


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/5ce6a3f2250530d92eb4b079ca852f54834f7485

commit 5ce6a3f2250530d92eb4b079ca852f54834f7485
Author: Hui Yingst <ni...@chromium.org>
Date: Wed Nov 11 02:29:09 2020

Enable 4 embeddertests in FPDFEditEmbedderTest suite for Skia/SkiaPaths.

Due to Skia uses different glyph loading methods (See
crbug.com/pdfium/1500#c7) and different default anti-aliasing options
for text rendering compared to AGG, the text rendering results for
Skia/SkiaPaths often have acceptable discrepancies compared to AGG's
expected results.

This CL updates the Skia/SkiaPaths expected results for 4 embedder tests
inside the FPDFEditEmbedderTest suite, which check text rendering
results for different fonts and the rendering results are acceptable. As
the result, these 4 tests can be enabled for Skia/SkiaPaths.

Bug: pdfium:1500
Change-Id: Idd6dcfca251641e4d8bf6717c9efd13744f208fd
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76090

Reviewed-by: Daniel Hosseinian <dh...@chromium.org>
Commit-Queue: Hui Yingst <ni...@chromium.org>

n… via monorail

unread,
Nov 16, 2020, 3:41:40 PM11/16/20
to pdfiu...@googlegroups.com

Comment #81 on issue 1500 by ni...@chromium.org: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c81

Rendering results for FPDFEditEmbedderTest.RemoveMarkedObjectsPrime are attached below, which includes the AGG and Skia results for the original PDF and the PDF after removing marked objects.

Attachments:
RemoveMarkedObjectsPrime_original_agg.png 21.4 KB
RemoveMarkedObjectsPrime_nonprime_agg.png 12.8 KB
RemoveMarkedObjectsPrime_original_skia.png 20.4 KB
RemoveMarkedObjectsPrime_nonprime_skia.png 11.8 KB

bugdroid via monorail

unread,
Nov 17, 2020, 12:30:27 AM11/17/20
to pdfiu...@googlegroups.com

Comment #82 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c82


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/f26b5f891b859525d6326525d5058a5b2683ddb2

commit f26b5f891b859525d6326525d5058a5b2683ddb2
Author: Hui Yingst <ni...@chromium.org>
Date: Tue Nov 17 05:26:03 2020

Enable FPDFEditEmbedderTest.RemoveMarkedObjectsPrime for Skia/SkiaPaths.

Test FPDFEditEmbedderTest.RemoveMarkedObjectsPrime fails with Skia or
SkiaPathshttps enabled due to the same reasons as stated in
https://pdfium-review.googlesource.com/76030.


Since the Skia/SkiaPaths rendering result is acceptable, this CL adds
the expected results for Skia/SkiaPaths so that this test can pass.

Bug: pdfium:1500
Change-Id: I22f22111e1d0e4e559eb10554484028424905e01
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76390

Commit-Queue: Hui Yingst <ni...@chromium.org>
Reviewed-by: Daniel Hosseinian <dh...@chromium.org>

bugdroid via monorail

unread,
Nov 17, 2020, 12:30:28 AM11/17/20
to pdfiu...@googlegroups.com

Comment #83 on issue 1500 by bugdroid: Make embedder tests pass for SkiaPaths
https://bugs.chromium.org/p/pdfium/issues/detail?id=1500#c83


The following revision refers to this bug:
https://pdfium.googlesource.com/pdfium/+/6823afb28ceb5aee566d007670180643653e85b6

commit 6823afb28ceb5aee566d007670180643653e85b6
Author: Hui Yingst <ni...@chromium.org>
Date: Tue Nov 17 05:29:53 2020

Enable some Windows-only embedder tests for Skia/SkiaPaths.

Some Windows-only embedder tests are no longer failing with Skia or
SkiaPaths enabled. Therefore this CL enables these tests depending on
the configurations they can run successfully with.

Bug: pdfium:1500
Change-Id: Ia766ad9b74b19acd7651d845b3c1242910c4a462
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76370

Commit-Queue: Hui Yingst <ni...@chromium.org>
Reviewed-by: Daniel Hosseinian <dh...@chromium.org>

Reply all
Reply to author
Forward
0 new messages