summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-20 11:41:56 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-20 11:41:56 -0700
commit4701fcddeddfef7bccbceaf0f439dee82c3639f0 (patch)
treecdad6c0635837c9ff4d4fcfa3ad192640d4dd9d2 /core
parentbff506d3b5e03891c137d9fe18f65cae112ebf2a (diff)
downloadpdfium-4701fcddeddfef7bccbceaf0f439dee82c3639f0.tar.xz
Fix clang_use_chrome_plugin for Mac and Skia builds
These changes are specific to Mac and Skia builds. They are needed for these builds to compile with clang_use_chrome_plugin. BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2081523002
Diffstat (limited to 'core')
-rw-r--r--core/fxge/apple/apple_int.h4
-rw-r--r--core/fxge/apple/fx_mac_imp.cpp15
-rw-r--r--core/fxge/apple/fx_quartz_device.cpp10
-rw-r--r--core/fxge/include/fx_ge_apple.h6
-rw-r--r--core/fxge/skia/fx_skia_device.cpp21
-rw-r--r--core/fxge/skia/fx_skia_device.h13
6 files changed, 51 insertions, 18 deletions
diff --git a/core/fxge/apple/apple_int.h b/core/fxge/apple/apple_int.h
index 5a3c0756db..c19282b12b 100644
--- a/core/fxge/apple/apple_int.h
+++ b/core/fxge/apple/apple_int.h
@@ -134,9 +134,7 @@ class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver {
const CFX_Matrix* pMatrix,
uint32_t flags,
void*& handle,
- int blend_type) override {
- return FALSE;
- }
+ int blend_type) override;
FX_BOOL DrawDeviceText(int nChars,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp
index a0f2acb370..528b7274db 100644
--- a/core/fxge/apple/fx_mac_imp.cpp
+++ b/core/fxge/apple/fx_mac_imp.cpp
@@ -25,15 +25,18 @@ static const struct {
{"Times-BoldItalic", "Times New Roman Bold Italic"},
{"Times-Italic", "Times New Roman Italic"},
};
+
class CFX_MacFontInfo : public CFX_FolderFontInfo {
public:
- virtual void* MapFont(int weight,
- FX_BOOL bItalic,
- int charset,
- int pitch_family,
- const FX_CHAR* family,
- int& iExact);
+ // CFX_FolderFontInfo
+ void* MapFont(int weight,
+ FX_BOOL bItalic,
+ int charset,
+ int pitch_family,
+ const FX_CHAR* family,
+ int& iExact) override;
};
+
#define JAPAN_GOTHIC "Hiragino Kaku Gothic Pro W6"
#define JAPAN_MINCHO "Hiragino Mincho Pro W6"
static void GetJapanesePreference(CFX_ByteString& face,
diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp
index 4e1e62d6eb..8adf6326c1 100644
--- a/core/fxge/apple/fx_quartz_device.cpp
+++ b/core/fxge/apple/fx_quartz_device.cpp
@@ -731,6 +731,16 @@ FX_BOOL CFX_QuartzDeviceDriver::StretchDIBits(const CFX_DIBSource* pBitmap,
return TRUE;
}
+FX_BOOL CFX_QuartzDeviceDriver::StartDIBits(const CFX_DIBSource* pBitmap,
+ int bitmap_alpha,
+ uint32_t color,
+ const CFX_Matrix* pMatrix,
+ uint32_t flags,
+ void*& handle,
+ int blend_type) {
+ return FALSE;
+}
+
FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlyphRun(
int nChars,
const FXTEXT_CHARPOS* pCharPos,
diff --git a/core/fxge/include/fx_ge_apple.h b/core/fxge/include/fx_ge_apple.h
index 57acef653c..6dce86697f 100644
--- a/core/fxge/include/fx_ge_apple.h
+++ b/core/fxge/include/fx_ge_apple.h
@@ -8,10 +8,14 @@
#define CORE_FXGE_INCLUDE_FX_GE_APPLE_H_
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+
+#include "core/fxge/include/fx_ge.h"
+
class CFX_QuartzDevice : public CFX_RenderDevice {
public:
CFX_QuartzDevice();
- ~CFX_QuartzDevice();
+ ~CFX_QuartzDevice() override;
+
FX_BOOL Attach(CGContextRef context, int32_t nDeviceClass = FXDC_DISPLAY);
FX_BOOL Attach(CFX_DIBitmap* pBitmap);
FX_BOOL Create(int32_t width, int32_t height, FXDIB_Format format);
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index c82b7f3091..f253b06c6d 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -759,6 +759,15 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawPath(
return TRUE;
}
+FX_BOOL CFX_SkiaDeviceDriver::DrawCosmeticLine(FX_FLOAT x1,
+ FX_FLOAT y1,
+ FX_FLOAT x2,
+ FX_FLOAT y2,
+ uint32_t color,
+ int blend_type) {
+ return FALSE;
+}
+
FX_BOOL CFX_SkiaDeviceDriver::FillRectWithBlend(const FX_RECT* pRect,
uint32_t fill_color,
int blend_type) {
@@ -907,6 +916,10 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawShading(const CPDF_ShadingPattern* pPattern,
return true;
}
+uint8_t* CFX_SkiaDeviceDriver::GetBuffer() const {
+ return m_pBitmap->GetBuffer();
+}
+
FX_BOOL CFX_SkiaDeviceDriver::GetClipBox(FX_RECT* pRect) {
// TODO(caryclark) call m_canvas->getClipDeviceBounds() instead
pRect->left = 0;
@@ -953,6 +966,10 @@ FX_BOOL CFX_SkiaDeviceDriver::GetDIBits(CFX_DIBitmap* pBitmap,
return bRet;
}
+CFX_DIBitmap* CFX_SkiaDeviceDriver::GetBackDrop() {
+ return m_pOriDevice;
+}
+
FX_BOOL CFX_SkiaDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap,
uint32_t argb,
const FX_RECT* pSrcRect,
@@ -1086,6 +1103,10 @@ FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource,
return TRUE;
}
+FX_BOOL CFX_SkiaDeviceDriver::ContinueDIBits(void* handle, IFX_Pause* pPause) {
+ return FALSE;
+}
+
void CFX_SkiaDeviceDriver::PreMultiply() {
void* buffer = m_pBitmap->GetBuffer();
if (!buffer)
diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h
index 15f6306cb0..5ad66f79b3 100644
--- a/core/fxge/skia/fx_skia_device.h
+++ b/core/fxge/skia/fx_skia_device.h
@@ -64,16 +64,14 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver {
FX_FLOAT x2,
FX_FLOAT y2,
uint32_t color,
- int blend_type) override {
- return FALSE;
- }
+ int blend_type) override;
FX_BOOL GetClipBox(FX_RECT* pRect) override;
/** Load device buffer into a DIB */
FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override;
- CFX_DIBitmap* GetBackDrop() override { return m_pOriDevice; }
+ CFX_DIBitmap* GetBackDrop() override;
FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
@@ -99,9 +97,7 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver {
void*& handle,
int blend_type) override;
- FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override {
- return FALSE;
- }
+ FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override;
void CancelDIBits(void* handle) override {}
@@ -119,7 +115,8 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver {
int alpha,
FX_BOOL bAlphaMode) override;
- virtual uint8_t* GetBuffer() const { return m_pBitmap->GetBuffer(); }
+ virtual uint8_t* GetBuffer() const;
+
void PaintStroke(SkPaint* spaint,
const CFX_GraphStateData* pGraphState,
const SkMatrix& matrix);