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

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 2025043002: remove some calls to dib (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 7 months 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 | « no previous file | core/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_render/fpdf_render.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index a3dbbdb3f20c7eb5359a304350a2e01c74039369..6ac78ecd432540d6c60bf54894085ac154dbfac2 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -815,14 +815,19 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
bitmap->MultiplyAlpha(pTextMask.get());
pTextMask.reset();
}
+ int32_t blitAlpha = 255;
if (Transparency & PDFTRANS_GROUP && group_alpha != 1.0f) {
- bitmap->MultiplyAlpha((int32_t)(group_alpha * 255));
+ blitAlpha = (int32_t)(group_alpha * 255);
+#ifndef _SKIA_SUPPORT_
+ bitmap->MultiplyAlpha(blitAlpha);
+ blitAlpha = 255;
+#endif
}
Transparency = m_Transparency;
if (pPageObj->IsForm()) {
Transparency |= PDFTRANS_GROUP;
}
- CompositeDIBitmap(bitmap, rect.left, rect.top, 0, 255, blend_type,
+ CompositeDIBitmap(bitmap, rect.left, rect.top, 0, blitAlpha, blend_type,
Transparency);
return TRUE;
}
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698