Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: core/fpdfapi/render/cpdf_renderstatus.cpp

Issue 2520073003: handle antialiased rendering as premultiplied (Closed)
Patch Set: more work on premultiplied mismatch Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/render/cpdf_renderstatus.h ('k') | core/fxge/cfx_fxgedevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/render/cpdf_renderstatus.cpp
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 7c389ef37c664a08bdfda7b3f468dbf37b280237..202e7e3bb76b768fb7afbbe535273615a5588ca8 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -893,6 +893,9 @@ std::unique_ptr<CFX_DIBitmap> DrawPatternBitmap(
CPDF_RenderContext context(pDoc, pCache);
context.AppendLayer(pPattern->form(), &mtPattern2Bitmap);
context.Render(&bitmap_device, &options, nullptr);
+#if defined _SKIA_SUPPORT_PATHS_
+ pBitmap->UnPreMultiply();
+#endif
return pBitmap;
}
@@ -1136,9 +1139,6 @@ 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,
@@ -1547,6 +1547,9 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
nullptr, nullptr, &m_Options, 0, m_bDropObjects,
pFormResource, true);
bitmap_render.ProcessObjectNoClip(pPageObj, &new_matrix);
+#if defined _SKIA_SUPPORT_PATHS_
+ bitmap->UnPreMultiply();
+#endif
m_bStopped = bitmap_render.m_bStopped;
if (pSMaskDict) {
CFX_Matrix smask_matrix = *pPageObj->m_GeneralState.GetSMaskMatrix();
@@ -1650,12 +1653,6 @@ 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) {
« no previous file with comments | « core/fpdfapi/render/cpdf_renderstatus.h ('k') | core/fxge/cfx_fxgedevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698