https://pdfium.googlesource.com/pdfium/+/5e4a5a467caa13460b3585de228dab1fd4468154commit 5e4a5a467caa13460b3585de228dab1fd4468154
Author: Hui Yingst <
ni...@chromium.org>
Date: Mon Nov 09 21:50:06 2020
Add method CFX_WindowsRenderDevice::DebugVerifyBitmapIsPreMultiplied().
When rendering PDFs on a Windows platform, CFX_WindowsRenderDevice is
always used, and its |m_pDeviceDriver| can never be type
CFX_SkiaDeviceDriver even when Skia is enabled.
However, when Skia is enabled, the rendering process still checks
whether bitmap is pre-multiplied assuming CFX_SkiaDeviceDriver is the
only driver type that's being used, which causes crashes since
CFX_WindowsRenderDevice doesn't have a matching method
DebugVerifyBitmapIsPreMultiplied() for its possible device drivers and
CFX_RenderDevice::DebugVerifyBitmapIsPreMultiplied() gets called.
This CL adds the method
CFX_WindowsRenderDevice::DebugVerifyBitmapIsPreMultiplied() so that for
rendering with Skia on Windows, we can still verify the bitmap is
pre-multiplied without the device driver being CFX_SkiaDeviceDriver
type. This CL also enables the two Windows embedder tests which crash
due to missing this method.
Bug: pdfium:1500
Change-Id: Ie6d22200f44376dd88852da2450ae8f3e6065d5c
Reviewed-on:
https://pdfium-review.googlesource.com/c/pdfium/+/76016