summaryrefslogtreecommitdiff
path: root/core/fxge/apple/fx_quartz_device.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-21 11:24:24 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-21 11:24:24 -0700
commit095d346ff71ebe0385dfe7fa77baad6a1ce91fcb (patch)
tree2cfdb14ff75fb94607eea2306c56e282b25edf31 /core/fxge/apple/fx_quartz_device.cpp
parent8f93cc640473a7d2855c3bc9bfd5169a8b1ca76c (diff)
downloadpdfium-095d346ff71ebe0385dfe7fa77baad6a1ce91fcb.tar.xz
Move ifx_renderdevicedriver to a separate file to share
Move ifx_renderdevicedriver class to its own file to share with multiple devices to reduce code duplication. Review-Url: https://codereview.chromium.org/2078783002
Diffstat (limited to 'core/fxge/apple/fx_quartz_device.cpp')
-rw-r--r--core/fxge/apple/fx_quartz_device.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp
index 8adf6326c1..b3591a3da1 100644
--- a/core/fxge/apple/fx_quartz_device.cpp
+++ b/core/fxge/apple/fx_quartz_device.cpp
@@ -190,24 +190,20 @@ CFX_QuartzDeviceDriver::~CFX_QuartzDeviceDriver() {
CGContextRelease(m_context);
}
}
-int CFX_QuartzDeviceDriver::GetDeviceCaps(int capsID) {
+int CFX_QuartzDeviceDriver::GetDeviceCaps(int capsID) const {
switch (capsID) {
- case FXDC_DEVICE_CLASS: {
+ case FXDC_DEVICE_CLASS:
return m_deviceClass;
- }
- case FXDC_PIXEL_WIDTH: {
+ case FXDC_PIXEL_WIDTH:
return m_width;
- }
- case FXDC_PIXEL_HEIGHT: {
+ case FXDC_PIXEL_HEIGHT:
return m_height;
- }
- case FXDC_BITS_PIXEL: {
+ case FXDC_BITS_PIXEL:
return 32;
- }
- case FXDC_RENDER_CAPS: {
+ case FXDC_RENDER_CAPS:
return m_renderCaps;
- }
- default: { return 0; }
+ default:
+ return 0;
}
}
CFX_Matrix CFX_QuartzDeviceDriver::GetCTM() const {