Add a pixel test that exercises CFX_ScanlineCompositor
Make sure CompositeRgbBitmapLineSrcBgraPremul() works in a pixel test as
well.
Bug: 359317049, 361002664
Change-Id: Iabd90e942c9f4da1a6410f183ea47859a76af079
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/123612
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index 69c0113..7c837b1 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -762,3 +762,6 @@
bug_660850.in * * * gdi
long_dashed_line.in * * * gdi
matte.in * * * gdi
+
+# TODO(crbug.com/361002664): Remove after associated bug is fixed
+smask_blend.in * * * gdi
diff --git a/testing/resources/pixel/smask_blend.in b/testing/resources/pixel/smask_blend.in
new file mode 100644
index 0000000..0fa27f8
--- /dev/null
+++ b/testing/resources/pixel/smask_blend.in
@@ -0,0 +1,106 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+{{object 2 0}} <<
+ /Type /Pages
+ /Count 1
+ /Kids [3 0 R]
+>>
+endobj
+{{object 3 0}} <<
+ /Type /Page
+ /MediaBox [0 0 200 200]
+ /Parent 2 0 R
+ /Resources <<
+ /ExtGState <<
+ /GS0 <<
+ /Type /ExtGState
+ /SMask 5 0 R
+ >>
+ >>
+ /XObject <<
+ /Fm0 7 0 R
+ >>
+ >>
+ /Contents [4 0 R]
+>>
+endobj
+{{object 4 0}} <<
+ {{streamlen}}
+>>
+stream
+q
+/GS0 gs
+/Fm0 Do
+Q
+endstream
+endobj
+{{object 5 0}} <<
+ /Type /Mask
+ /G 6 0 R
+ /S /Alpha
+>>
+endobj
+{{object 6 0}} <<
+ /Type XObject
+ /Subtype /Form
+ /BBox [0 0 100 100]
+ {{streamlen}}
+>>
+stream
+q
+1 g
+0 0 100 50 re f
+0 g
+0 50 100 100 re f
+Q
+endstream
+endobj
+{{object 7 0}} <<
+ /Type XObject
+ /Subtype /Form
+ /Resources <<
+ /ExtGState <<
+ /GS1 <<
+ /Type /ExtGState
+ /BM /Screen
+ /CA 0.6
+ /ca 0.6
+ >>
+ >>
+ /XObject <<
+ /Fm1 8 0 R
+ >>
+ >>
+ /BBox [0 0 100 100]
+ {{streamlen}}
+>>
+stream
+q
+/GS1 gs
+/Fm1 Do
+Q
+endstream
+endobj
+{{object 8 0}} <<
+ /Type XObject
+ /Subtype /Form
+ /BBox [0 0 100 100]
+ {{streamlen}}
+>>
+stream
+q
+1 g
+0 0 50 100 re f
+0 g
+50 0 100 100 re f
+Q
+endstream
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/smask_blend_expected.pdf.0.png b/testing/resources/pixel/smask_blend_expected.pdf.0.png
new file mode 100644
index 0000000..d7e1bae
--- /dev/null
+++ b/testing/resources/pixel/smask_blend_expected.pdf.0.png
Binary files differ