Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: core/fxge/skia/fx_skia_device.cpp

Issue 1975143002: allow Skia to be the default graphics engine (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/include/fx_ge.h ('k') | fpdfsdk/fpdf_progressive.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/skia/fx_skia_device.cpp
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 4180d58e21a17b5ee5492addca8c61cc35e6f007..7f47d855c91df9653d6efd4c7357c4deeb637751 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();
}
« no previous file with comments | « core/fxge/include/fx_ge.h ('k') | fpdfsdk/fpdf_progressive.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698