From 7484762421e85aa5d610f47aa547470786eecab8 Mon Sep 17 00:00:00 2001 From: npm Date: Fri, 29 Jul 2016 15:20:25 -0700 Subject: Refactor fxge/fx_apple and fx_win header files - Renamed header for CFX_QuartzDevice class - Removed unused class CFX_WinBitmapDevice - Split remaining fx_ge_win32 header Review-Url: https://codereview.chromium.org/2197513004 --- core/fxge/apple/cfx_quartzdevice.h | 31 +++++++++++++++++++++++++++++++ core/fxge/apple/fx_apple_platform.cpp | 2 +- core/fxge/apple/fx_quartz_device.cpp | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 core/fxge/apple/cfx_quartzdevice.h (limited to 'core/fxge/apple') diff --git a/core/fxge/apple/cfx_quartzdevice.h b/core/fxge/apple/cfx_quartzdevice.h new file mode 100644 index 0000000000..e9261d62b8 --- /dev/null +++ b/core/fxge/apple/cfx_quartzdevice.h @@ -0,0 +1,31 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXGE_APPLE_CFX_QUARTZDEVICE_H_ +#define CORE_FXGE_APPLE_CFX_QUARTZDEVICE_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() 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); + + CGContextRef GetContext(); + + protected: + CGContextRef m_pContext; + FX_BOOL m_bOwnedBitmap; +}; +#endif + +#endif // CORE_FXGE_APPLE_CFX_QUARTZDEVICE_H_ diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp index c7e81d5339..a3665efe70 100644 --- a/core/fxge/apple/fx_apple_platform.cpp +++ b/core/fxge/apple/fx_apple_platform.cpp @@ -14,10 +14,10 @@ #endif #include "core/fxge/apple/apple_int.h" +#include "core/fxge/apple/cfx_quartzdevice.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/ge/fx_text_int.h" #include "core/fxge/include/fx_freetype.h" -#include "core/fxge/include/fx_ge_apple.h" #ifndef _SKIA_SUPPORT_ diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp index a9b9268ae6..966f0bd26d 100644 --- a/core/fxge/apple/fx_quartz_device.cpp +++ b/core/fxge/apple/fx_quartz_device.cpp @@ -18,7 +18,7 @@ #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ #include "core/fxge/apple/apple_int.h" -#include "core/fxge/include/fx_ge_apple.h" +#include "core/fxge/apple/cfx_quartzdevice.h" #ifndef CGFLOAT_IS_DOUBLE #error Expected CGFLOAT_IS_DOUBLE to be defined by CoreGraphics headers #endif -- cgit v1.2.3