summaryrefslogtreecommitdiff
path: root/core/fxge/include
diff options
context:
space:
mode:
authorcaryclark <caryclark@google.com>2016-07-06 10:20:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-06 10:20:25 -0700
commita27d49a3e9eafd7fd911a0a6039ce80284ccb463 (patch)
tree73fbb66b229652524c21c956e25f88e42d37be88 /core/fxge/include
parentc4dedf32b1f5c71740df5be2a9b1446a01df304c (diff)
downloadpdfium-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/include')
-rw-r--r--core/fxge/include/fx_dib.h4
-rw-r--r--core/fxge/include/fx_ge.h7
2 files changed, 10 insertions, 1 deletions
diff --git a/core/fxge/include/fx_dib.h b/core/fxge/include/fx_dib.h
index 5a31722a82..8d9f27e3f7 100644
--- a/core/fxge/include/fx_dib.h
+++ b/core/fxge/include/fx_dib.h
@@ -247,6 +247,10 @@ class CFX_DIBSource {
int& src_top,
const CFX_ClipRgn* pClipRgn);
+#if defined _SKIA_SUPPORT_
+ void DebugVerifyBitmapIsPreMultiplied(void* buffer = nullptr) const;
+#endif
+
CFX_DIBitmap* m_pAlphaMask;
protected:
diff --git a/core/fxge/include/fx_ge.h b/core/fxge/include/fx_ge.h
index 5599a75f59..ea2adec1dc 100644
--- a/core/fxge/include/fx_ge.h
+++ b/core/fxge/include/fx_ge.h
@@ -215,6 +215,7 @@ class CFX_RenderDevice {
CFX_RenderDevice();
virtual ~CFX_RenderDevice();
+ void Flush();
void SetDeviceDriver(IFX_RenderDeviceDriver* pDriver);
IFX_RenderDeviceDriver* GetDeviceDriver() const { return m_pDeviceDriver; }
@@ -378,6 +379,10 @@ class CFX_RenderDevice {
CFX_PathData* pClippingPath,
int nFlag);
+#ifdef _SKIA_SUPPORT_
+ virtual void DebugVerifyBitmapIsPreMultiplied() const;
+#endif
+
private:
void InitDeviceInfo();
void UpdateClipBox();
@@ -416,7 +421,7 @@ class CFX_FxgeDevice : public CFX_RenderDevice {
#ifdef _SKIA_SUPPORT_
bool AttachRecorder(SkPictureRecorder* recorder);
SkPictureRecorder* CreateRecorder(int size_x, int size_y);
- void PreMultiply();
+ void DebugVerifyBitmapIsPreMultiplied() const override;
#endif
protected: