From 0201377b6c4bb3b73f2564092426f3962a0bd9ed Mon Sep 17 00:00:00 2001 From: caryclark Date: Thu, 17 Nov 2016 17:28:10 -0800 Subject: fix corpus tests All corpus tests draw reasonably well. There are pixel differences, but no missing features or large scale errors. This was verified by running run_corpus_tests.py on skiapaths and agg build dirs, then running the skdiff tool to generate a report of the pixel difference. For example, after running $ ninja -C out/skia skdiff $ ./out/skia/skdiff /repo/pdfium/out/agg/gen/pdfium/testing/corpus/ /repo/pdfium/out/skiapaths/gen/pdfium/testing/corpus/ ~/aggskiadiffs view the report in a browser at ~/aggskiadiffs/index.html R=dsinclair@chromium.org BUG=skia:5973 Review-Url: https://codereview.chromium.org/2504863003 --- core/fpdfapi/render/cpdf_renderstatus.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp') diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index f16d3f8ad1..d9f2a82276 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -1125,6 +1125,9 @@ void CPDF_RenderStatus::ProcessObjectNoClip(CPDF_PageObject* pObj, #if defined _SKIA_SUPPORT_ DebugVerifyDeviceIsPreMultiplied(); #endif +#if defined _SKIA_SUPPORT_PATHS_ + UnPreMultiplyDevice(); +#endif } bool CPDF_RenderStatus::DrawObjWithBlend(CPDF_PageObject* pObj, @@ -1646,6 +1649,12 @@ void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { } #endif +#if defined _SKIA_SUPPORT_PATHS_ +void CPDF_RenderStatus::UnPreMultiplyDevice() { + m_pDevice->UnPreMultiplyDevice(); +} +#endif + bool CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj, const CFX_Matrix* pObj2Device, CFX_PathData* pClippingPath) { -- cgit v1.2.3