diff options
author | caryclark <caryclark@google.com> | 2016-07-06 10:20:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-06 10:20:25 -0700 |
commit | a27d49a3e9eafd7fd911a0a6039ce80284ccb463 (patch) | |
tree | 73fbb66b229652524c21c956e25f88e42d37be88 /core/fxge/ge | |
parent | c4dedf32b1f5c71740df5be2a9b1446a01df304c (diff) | |
download | pdfium-a27d49a3e9eafd7fd911a0a6039ce80284ccb463.tar.xz |
copy graphics state fully
The dash parameters where not copied; the copy
could point at random data and cause corpus
tests to hang when testing Skia.
PDFium measures text directly by calling FreeType.
Turn off hinting altogether in Skia so that drawn
text matches the metrics that PDFium measures.
Premultiply bits retrieved from images, and check
to see that the device bits are always
premultiplied.
Look for null graphics state and matrices.
R=thestig@chromium.org,dsinclair@chromium.org
BUG=pdfium:532
Review-Url: https://codereview.chromium.org/2120353004
Diffstat (limited to 'core/fxge/ge')
-rw-r--r-- | core/fxge/ge/fx_ge_device.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/fxge/ge/fx_ge_device.cpp b/core/fxge/ge/fx_ge_device.cpp index 00cc541c22..9bb950beed 100644 --- a/core/fxge/ge/fx_ge_device.cpp +++ b/core/fxge/ge/fx_ge_device.cpp @@ -7,6 +7,10 @@ #include "core/fxge/include/fx_ge.h" #include "core/fxge/include/ifx_renderdevicedriver.h" +#if defined _SKIA_SUPPORT_ +#include "third_party/skia/include/core/SkTypes.h" +#endif + CFX_RenderDevice::CFX_RenderDevice() : m_pBitmap(nullptr), m_Width(0), @@ -20,6 +24,11 @@ CFX_RenderDevice::~CFX_RenderDevice() { delete m_pDeviceDriver; } +void CFX_RenderDevice::Flush() { + delete m_pDeviceDriver; + m_pDeviceDriver = nullptr; +} + void CFX_RenderDevice::SetDeviceDriver(IFX_RenderDeviceDriver* pDriver) { delete m_pDeviceDriver; m_pDeviceDriver = pDriver; @@ -480,3 +489,10 @@ FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) { void CFX_RenderDevice::CancelDIBits(void* handle) { m_pDeviceDriver->CancelDIBits(handle); } + +#ifdef _SKIA_SUPPORT_ + +void CFX_RenderDevice::DebugVerifyBitmapIsPreMultiplied() const { + SkASSERT(0); +} +#endif |