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

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

Issue 2000973002: Make CPDF_Function::Load() return an unique_ptr. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: fix build, nits 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 | « core/fpdfapi/fpdf_page/pageint.h ('k') | 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 4ca8a53f72ff8e0f282d74cde3f2f398f263fe3c..5ffedca5abc1733628e2745976987a82085a43b2 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -342,6 +342,7 @@ void CPDF_RenderStatus::DitherObjectArea(const CPDF_PageObject* pObj,
pBitmap->DitherFS(pal, 16, &rect);
}
}
+
void CPDF_RenderStatus::ProcessObjectNoClip(const CPDF_PageObject* pObj,
const CFX_Matrix* pObj2Device) {
FX_BOOL bRet = FALSE;
@@ -356,16 +357,16 @@ void CPDF_RenderStatus::ProcessObjectNoClip(const CPDF_PageObject* pObj,
bRet = ProcessImage(pObj->AsImage(), pObj2Device);
break;
case CPDF_PageObject::SHADING:
- bRet = ProcessShading(pObj->AsShading(), pObj2Device);
- break;
+ ProcessShading(pObj->AsShading(), pObj2Device);
+ return;
case CPDF_PageObject::FORM:
bRet = ProcessForm(pObj->AsForm(), pObj2Device);
break;
}
- if (!bRet) {
+ if (!bRet)
DrawObjWithBackground(pObj, pObj2Device);
- }
}
+
FX_BOOL CPDF_RenderStatus::DrawObjWithBlend(const CPDF_PageObject* pObj,
const CFX_Matrix* pObj2Device) {
FX_BOOL bRet = FALSE;
@@ -1112,12 +1113,12 @@ CPDF_TransferFunc* CPDF_DocRenderData::GetTransferFunc(CPDF_Object* pObj) {
return nullptr;
for (uint32_t i = 0; i < 3; ++i) {
- pFuncs[2 - i].reset(CPDF_Function::Load(pArray->GetDirectObjectAt(i)));
+ pFuncs[2 - i] = CPDF_Function::Load(pArray->GetDirectObjectAt(i));
if (!pFuncs[2 - i])
return nullptr;
}
} else {
- pFuncs[0].reset(CPDF_Function::Load(pObj));
+ pFuncs[0] = CPDF_Function::Load(pObj);
if (!pFuncs[0])
return nullptr;
}
« no previous file with comments | « core/fpdfapi/fpdf_page/pageint.h ('k') | core/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698