Insert FlushForDraw() within DrawBitsWithMask()
Calls FlushForDraw() before drawing within
CFX_SkiaDeviceDriver::DrawBitsWithMask(). Without this call, clipping
does not update correctly before drawing masked images.
Fixed: pdfium:1845
Change-Id: I73acd38debd7d538024a316c7f194581470f1dc7
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/102470
Reviewed-by: Nigi <nigi@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index f6330e5..c024cb3 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -2033,6 +2033,8 @@
return false;
}
{
+ m_pCache->FlushForDraw();
+
SkAutoCanvasRestore scoped_save_restore(m_pCanvas, /*doSave=*/true);
SkMatrix skMatrix;
SetBitmapMatrix(matrix, srcWidth, srcHeight, &skMatrix);
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index 10c5f7b..054e263 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -418,7 +418,6 @@
xfermodes2.pdf * * * skia
# TODO(pdfium:1804): Remove after associated bug is fixed
-# TODO(pdfium:1845): Remove after associated bug is fixed
xfermodes3.pdf * * * skia
zh_file1.pdf mac * * *
@@ -491,9 +490,6 @@
# TODO(pdfium:1723): Remove after associated bug is fixed
bug_1723.in * * * *
-# TODO(pdfium:1845): Remove after associated bug is fixed
-bug_1845.in * * * skia
-
# TODO(pdfium:1846): Remove after associated bug is fixed
bug_1846.in * * * agg