summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
authorcaryclark <caryclark@google.com>2016-11-22 12:44:25 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-22 12:44:25 -0800
commit687fbde2e4ee13637cb3fd9b1fec39a436ef73d7 (patch)
tree9c0d588a6494957b1bfeb12944c6f41e07a01711 /fpdfsdk/fpdfview.cpp
parent89a2d92549d25df6786d53de5671eb141e1fd3e2 (diff)
downloadpdfium-687fbde2e4ee13637cb3fd9b1fec39a436ef73d7.tar.xz
handle antialiased rendering as premultiplied
Transparencies and bitmap patterns need to be unpremultiplied after Skia renders them so that PDFium can use its own compositing. Also added some linear (i.e. axial) gradient support, although its unclear if any of the test corpus uses this feature. R=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2520073003
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index d5f9a0e810..959bf14390 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -598,6 +598,9 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap,
FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y,
rotate, flags, true, nullptr);
+#ifdef _SKIA_SUPPORT_PATHS_
+ pBitmap->UnPreMultiply();
+#endif
pPage->SetRenderContext(nullptr);
}