summaryrefslogtreecommitdiff
path: root/core/fxge/skia
diff options
context:
space:
mode:
authorcaryclark <caryclark@google.com>2016-05-13 10:57:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-13 10:57:20 -0700
commitd6e18875ce024a341e221db689cedf10d433be8d (patch)
treeb04343fd19f155c6606322dc39813840b07f107e /core/fxge/skia
parent594b20b485046c954b68734e63e8d2c93fbe4ef5 (diff)
downloadpdfium-d6e18875ce024a341e221db689cedf10d433be8d.tar.xz
allow Skia to be the default graphics engine
PDFium uses fxge to denote the graphics engine used for general rendering. When pdf_use_skia=1 is set, use Skia as the default engine instead of antigrain. R=tsepez@chromium.org,dsinclair@chromium.org Review-Url: https://codereview.chromium.org/1975143002
Diffstat (limited to 'core/fxge/skia')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 4180d58e21..7f47d855c9 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -1139,55 +1139,55 @@ void CFX_SkiaDeviceDriver::CancelDIBits(void* pHandle) {
delete (CFX_ImageRenderer*)pHandle;
}
-CFX_SkiaDevice::CFX_SkiaDevice() {
+CFX_FxgeDevice::CFX_FxgeDevice() {
m_bOwnedBitmap = FALSE;
}
-SkPictureRecorder* CFX_SkiaDevice::CreateRecorder(int size_x, int size_y) {
+SkPictureRecorder* CFX_FxgeDevice::CreateRecorder(int size_x, int size_y) {
CFX_SkiaDeviceDriver* skDriver = new CFX_SkiaDeviceDriver(size_x, size_y);
SetDeviceDriver(skDriver);
return skDriver->GetRecorder();
}
-FX_BOOL CFX_SkiaDevice::Attach(CFX_DIBitmap* pBitmap,
- int dither_bits,
- FX_BOOL bRgbByteOrder,
- CFX_DIBitmap* pOriDevice,
- FX_BOOL bGroupKnockout) {
+bool CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap,
+ int dither_bits,
+ bool bRgbByteOrder,
+ CFX_DIBitmap* pOriDevice,
+ bool bGroupKnockout) {
if (!pBitmap)
- return FALSE;
+ return false;
SetBitmap(pBitmap);
SetDeviceDriver(new CFX_SkiaDeviceDriver(pBitmap, dither_bits, bRgbByteOrder,
pOriDevice, bGroupKnockout));
- return TRUE;
+ return true;
}
-FX_BOOL CFX_SkiaDevice::AttachRecorder(SkPictureRecorder* recorder) {
+bool CFX_FxgeDevice::AttachRecorder(SkPictureRecorder* recorder) {
if (!recorder)
- return FALSE;
+ return false;
SetDeviceDriver(new CFX_SkiaDeviceDriver(recorder));
- return TRUE;
+ return true;
}
-FX_BOOL CFX_SkiaDevice::Create(int width,
- int height,
- FXDIB_Format format,
- int dither_bits,
- CFX_DIBitmap* pOriDevice) {
+bool CFX_FxgeDevice::Create(int width,
+ int height,
+ FXDIB_Format format,
+ int dither_bits,
+ CFX_DIBitmap* pOriDevice) {
m_bOwnedBitmap = TRUE;
CFX_DIBitmap* pBitmap = new CFX_DIBitmap;
if (!pBitmap->Create(width, height, format)) {
delete pBitmap;
- return FALSE;
+ return false;
}
SetBitmap(pBitmap);
CFX_SkiaDeviceDriver* pDriver =
new CFX_SkiaDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE);
SetDeviceDriver(pDriver);
- return TRUE;
+ return true;
}
-CFX_SkiaDevice::~CFX_SkiaDevice() {
+CFX_FxgeDevice::~CFX_FxgeDevice() {
if (m_bOwnedBitmap && GetBitmap())
delete GetBitmap();
}