50 const FPDF_COLORSCHEME* color_scheme,
52 if (!bitmap || !pause || pause
->version != 1)
59 auto owned_context =
std::make_unique<CPDF_PageRenderContext>();
60 CPDF_PageRenderContext* context = owned_context.get();
61 pPage->SetRenderContext(
std::move(owned_context));
63 RetainPtr<CFX_DIBitmap> pBitmap(CFXDIBitmapFromFPDFBitmap(bitmap));
64 auto device =
std::make_unique<CFX_DefaultRenderDevice>();
66 context->m_pDevice =
std::move(device);
68 CPDFSDK_PauseAdapter pause_adapter
(pause
);
70 size_y
, rotate
, flags
, color_scheme
,
71 false, &pause_adapter
);
73#if defined(PDF_USE_SKIA)
74 if (CFX_DefaultRenderDevice::UseSkiaRenderer()) {
75 pBitmap->UnPreMultiply();
79 if (!context->m_pRenderer) {
83 return ToFPDFStatus(context->m_pRenderer->GetStatus());
101 IFSDK_PAUSE* pause) {
111 if (!pContext || !pContext->m_pRenderer)
114 CPDFSDK_PauseAdapter pause_adapter
(pause
);
115 pContext->m_pRenderer->Continue(&pause_adapter);
117#if defined(PDF_USE_SKIA)
118 if (CFX_DefaultRenderDevice::UseSkiaRenderer()) {
119 pContext->m_pDevice->GetBitmap()->UnPreMultiply();
122 return ToFPDFStatus(pContext->m_pRenderer->GetStatus());
RenderContextIface * GetRenderContext()
void ClearRenderContext()
void CPDFSDK_RenderPageWithContext(CPDF_PageRenderContext *pContext, CPDF_Page *pPage, int start_x, int start_y, int size_x, int size_y, int rotate, int flags, const FPDF_COLORSCHEME *color_scheme, bool need_to_restore, CPDFSDK_PauseAdapter *pause)
FPDF_EXPORT int FPDF_CALLCONV FPDF_RenderPageBitmapWithColorScheme_Start(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags, const FPDF_COLORSCHEME *color_scheme, IFSDK_PAUSE *pause)
FPDF_EXPORT int FPDF_CALLCONV FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags, IFSDK_PAUSE *pause)