summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-10-03 06:14:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-03 06:14:50 -0700
commitc9347083c8b813454e971ce9e648cf7d8b25d60b (patch)
tree0b4e04aa82b94b20e6828fa60e23ddf84c7c7e09
parent3a88205e8ddce125d78fb6961f7eac2470bbcd55 (diff)
downloadpdfium-c9347083c8b813454e971ce9e648cf7d8b25d60b.tar.xz
Remove _FX_OS_ checks in core/fxge/win32/.
All the files are already excluded by the build system. Review-Url: https://codereview.chromium.org/2387863002
-rw-r--r--core/fxge/win32/fx_win32_device.cpp17
-rw-r--r--core/fxge/win32/fx_win32_dib.cpp5
-rw-r--r--core/fxge/win32/fx_win32_dwrite.cpp9
-rw-r--r--core/fxge/win32/fx_win32_gdipext.cpp21
-rw-r--r--core/fxge/win32/fx_win32_print.cpp9
5 files changed, 23 insertions, 38 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 8e689240dd..f0eb2dbce2 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -4,22 +4,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_system.h"
+#include <crtdbg.h>
#include <algorithm>
#include <memory>
#include <vector>
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
-#include <crtdbg.h>
-
#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/fx_memory.h"
-
-#ifndef _SKIA_SUPPORT_
-#include "core/fxge/agg/fx_agg_driver.h"
-#endif
-
+#include "core/fxcrt/fx_system.h"
#include "core/fxge/cfx_fontmapper.h"
#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/cfx_graphstatedata.h"
@@ -36,6 +29,10 @@
#include "core/fxge/win32/win32_int.h"
#include "third_party/base/stl_util.h"
+#ifndef _SKIA_SUPPORT_
+#include "core/fxge/agg/fx_agg_driver.h"
+#endif
+
namespace {
const struct {
@@ -1392,5 +1389,3 @@ IFX_RenderDeviceDriver* CFX_WindowsDevice::CreateDriver(HDC hDC) {
return new CGdiPrinterDriver(hDC);
return new CGdiDisplayDriver(hDC);
}
-
-#endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_
diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp
index cd48ad25b5..1f5688ddd2 100644
--- a/core/fxge/win32/fx_win32_dib.cpp
+++ b/core/fxge/win32/fx_win32_dib.cpp
@@ -4,11 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_system.h"
-
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
#include <windows.h>
+#include "core/fxcrt/fx_system.h"
#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/win32/cfx_windowsdib.h"
#include "core/fxge/win32/win32_int.h"
@@ -218,4 +216,3 @@ void CFX_WindowsDIB::LoadFromDevice(HDC hDC, int left, int top) {
void CFX_WindowsDIB::SetToDevice(HDC hDC, int left, int top) {
::BitBlt(hDC, left, top, m_Width, m_Height, m_hMemDC, 0, 0, SRCCOPY);
}
-#endif
diff --git a/core/fxge/win32/fx_win32_dwrite.cpp b/core/fxge/win32/fx_win32_dwrite.cpp
index b4bb9b6204..b12e5d7d15 100644
--- a/core/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/fxge/win32/fx_win32_dwrite.cpp
@@ -4,12 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_system.h"
-#include "core/fxge/ge/cfx_cliprgn.h"
-
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
#include <dwrite.h>
+#include "core/fxcrt/fx_system.h"
+#include "core/fxge/ge/cfx_cliprgn.h"
#include "core/fxge/win32/dwrite_int.h"
typedef HRESULT(__stdcall* FuncType_DWriteCreateFactory)(
@@ -91,7 +89,7 @@ class CDwFontFileLoader final : public IDWriteFontFileLoader {
class CDwFontContext {
public:
- CDwFontContext(IDWriteFactory* dwriteFactory);
+ explicit CDwFontContext(IDWriteFactory* dwriteFactory);
~CDwFontContext();
HRESULT Initialize();
@@ -446,4 +444,3 @@ STDMETHODIMP CDwGdiTextRenderer::DrawGlyphRun(
text_bbox.top, FXDIB_BLEND_NORMAL, pClipRgn);
return hr;
}
-#endif
diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp
index d3135a249c..2d19808517 100644
--- a/core/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/fxge/win32/fx_win32_gdipext.cpp
@@ -4,25 +4,25 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_system.h"
-
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
#include <windows.h>
-#include <algorithm>
-
-namespace Gdiplus {
-using std::min;
-using std::max;
-} // namespace Gdiplus
-#include <gdiplus.h>
+#include <algorithm>
+#include "core/fxcrt/fx_system.h"
#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/cfx_graphstatedata.h"
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/win32/cfx_windowsdib.h"
#include "core/fxge/win32/win32_int.h"
+// Has to come before gdiplus.h
+namespace Gdiplus {
+using std::min;
+using std::max;
+} // namespace Gdiplus
+
+#include <gdiplus.h> // NOLINT
+
using namespace Gdiplus; // NOLINT
using namespace Gdiplus::DllExports; // NOLINT
@@ -1524,4 +1524,3 @@ CFX_DIBitmap* CGdiplusExt::LoadDIBitmap(WINDIB_Open_Args_ args) {
FreeDIBitmap(pInfo);
return pDIBitmap;
}
-#endif
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index b83714d3e0..6d00d835d9 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -4,14 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_system.h"
-
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
-
#include <windows.h>
#include <algorithm>
+#include <memory>
+#include <vector>
+#include "core/fxcrt/fx_system.h"
#include "core/fxge/cfx_renderdevice.h"
#include "core/fxge/cfx_windowsdevice.h"
#include "core/fxge/dib/dib_int.h"
@@ -327,5 +326,3 @@ FX_BOOL CGdiPrinterDriver::DrawDeviceText(int nChars,
return FALSE;
#endif
}
-
-#endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_