38 m_pBitmapDevice = std::make_unique<CFX_DefaultRenderDevice>();
48 constexpr uint32_t kNoPitch = 0;
49 absl::optional<CFX_DIBitmap::PitchAndSize> pitch_size =
50 CFX_DIBitmap::CalculatePitchAndSize(width, height, dibFormat, kNoPitch);
51 if (!pitch_size.has_value())
54 if (pitch_size.value().size <= kImageSizeLimitBytes &&
55 m_pBitmapDevice->Create(width, height, dibFormat,
nullptr)) {
60 pContext->GetBackgroundToDevice(m_pBitmapDevice.get(), pObj, pOptions,
bool Initialize(CPDF_RenderContext *pContext, CFX_RenderDevice *pDevice, const FX_RECT &rect, const CPDF_PageObject *pObj, const CPDF_RenderOptions *pOptions, int max_dpi)