summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-26 16:24:49 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-27 01:04:13 +0000
commit698aed79d6ad6e8e3a0c7a500c108d69f944b82d (patch)
treefbf7e66e0a2ec096561cd0ba5d3c4d577cd64667 /core
parent3070e94f608f36e7312fad2d471e3d7546f82ca2 (diff)
downloadpdfium-698aed79d6ad6e8e3a0c7a500c108d69f944b82d.tar.xz
Cleanup FX macros
This CL renames the FX_OS defines to have _OS_ in their names and drops the _DESKTOP suffix. The FXM defines have been changed to just FX. Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74 Reviewed-on: https://pdfium-review.googlesource.com/14833 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.cpp14
-rw-r--r--core/fpdfapi/font/cpdf_type1font.cpp30
-rw-r--r--core/fpdfapi/font/cpdf_type1font.h2
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp8
-rw-r--r--core/fpdfapi/parser/cpdf_document.h2
-rw-r--r--core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp6
-rw-r--r--core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp4
-rw-r--r--core/fpdfapi/render/cpdf_charposlist.cpp4
-rw-r--r--core/fpdfapi/render/cpdf_devicebuffer.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_dibtransferfunc.cpp14
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp2
-rw-r--r--core/fpdfdoc/cpdf_filespec.cpp16
-rw-r--r--core/fpdfdoc/cpdf_filespec_unittest.cpp16
-rw-r--r--core/fpdfdoc/cpdf_interform.cpp10
-rw-r--r--core/fxcodec/codec/ccodec_faxmodule.h2
-rw-r--r--core/fxcodec/codec/ccodec_jpegmodule.h2
-rw-r--r--core/fxcodec/codec/fx_codec_fax.cpp2
-rw-r--r--core/fxcodec/codec/fx_codec_jpeg.cpp4
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp6
-rw-r--r--core/fxcrt/cfx_datetime.cpp10
-rw-r--r--core/fxcrt/cfx_datetime.h4
-rw-r--r--core/fxcrt/cfx_fileaccess_posix.cpp6
-rw-r--r--core/fxcrt/cfx_fileaccess_posix.h6
-rw-r--r--core/fxcrt/cfx_fileaccess_windows.cpp2
-rw-r--r--core/fxcrt/cfx_fileaccess_windows.h2
-rw-r--r--core/fxcrt/cfx_seekablestreamproxy.cpp2
-rw-r--r--core/fxcrt/fx_random.cpp20
-rw-r--r--core/fxcrt/fx_stream.cpp6
-rw-r--r--core/fxcrt/fx_stream.h8
-rw-r--r--core/fxcrt/fx_system.cpp6
-rw-r--r--core/fxcrt/fx_system.h74
-rw-r--r--core/fxcrt/fx_system_unittest.cpp4
-rw-r--r--core/fxge/agg/fx_agg_driver.cpp6
-rw-r--r--core/fxge/agg/fx_agg_driver.h2
-rw-r--r--core/fxge/cfx_facecache.cpp10
-rw-r--r--core/fxge/cfx_folderfontinfo.cpp2
-rw-r--r--core/fxge/cfx_font.cpp6
-rw-r--r--core/fxge/cfx_fontmapper.cpp10
-rw-r--r--core/fxge/cfx_renderdevice.cpp6
-rw-r--r--core/fxge/cfx_renderdevice.h2
-rw-r--r--core/fxge/dib/cfx_dibitmap.cpp4
-rw-r--r--core/fxge/fx_font.h4
-rw-r--r--core/fxge/fx_ge_fontmap.cpp2
-rw-r--r--core/fxge/fx_ge_linux.cpp4
-rw-r--r--core/fxge/skia/fx_skia_device.cpp4
45 files changed, 179 insertions, 179 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
index 9b326f5c4f..49413d24f5 100644
--- a/core/fpdfapi/font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
@@ -125,7 +125,7 @@ CPDF_FontGlobals* GetFontGlobals() {
return CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
}
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
bool IsValidEmbeddedCharcodeFromUnicodeCharset(CIDSet charset) {
switch (charset) {
@@ -174,7 +174,7 @@ uint32_t EmbeddedCharcodeFromUnicode(const FXCMAP_CMap* pEmbedMap,
return 0;
}
-#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
void FT_UseCIDCharmap(FXFT_Face face, int coding) {
int encoding;
@@ -260,7 +260,7 @@ wchar_t CPDF_CIDFont::GetUnicodeFromCharCode(uint32_t charcode) const {
if (m_pCID2UnicodeMap && m_pCID2UnicodeMap->IsLoaded() && m_pCMap->IsLoaded())
return m_pCID2UnicodeMap->UnicodeFromCID(CIDFromCharCode(charcode));
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
wchar_t unicode;
int charsize = 1;
if (charcode > 255) {
@@ -308,7 +308,7 @@ uint32_t CPDF_CIDFont::CharCodeFromUnicode(wchar_t unicode) const {
return static_cast<uint32_t>(unicode);
if (m_pCMap->m_Coding == CIDCODING_CID)
return 0;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
uint8_t buffer[32];
int ret = FXSYS_WideCharToMultiByte(
g_CharsetCPs[m_pCMap->m_Coding], 0, &unicode, 1,
@@ -408,7 +408,7 @@ bool CPDF_CIDFont::Load() {
m_pStreamAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream);
m_pStreamAcc->LoadAllData(false);
} else if (pmap->GetString() == "Identity") {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (m_pFontFile)
m_bCIDIsGID = true;
#else
@@ -615,7 +615,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) {
uint16_t cid = CIDFromCharCode(charcode);
wchar_t unicode = 0;
if (m_bCIDIsGID) {
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
return cid;
#else
if (m_Flags & FXFONT_SYMBOLIC)
@@ -680,7 +680,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) {
if (m_Charset == CIDSET_JAPAN1) {
if (unicode == '\\') {
unicode = '/';
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
} else if (unicode == 0xa5) {
unicode = 0x5c;
#endif
diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp
index a7ac264fe0..296351fc82 100644
--- a/core/fpdfapi/font/cpdf_type1font.cpp
+++ b/core/fpdfapi/font/cpdf_type1font.cpp
@@ -10,13 +10,13 @@
#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/fx_freetype.h"
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
#include "core/fxge/apple/apple_int.h"
#endif
namespace {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
struct GlyphNameMap {
const char* m_pStrAdobe;
const char* m_pStrUnicode;
@@ -40,7 +40,7 @@ const char* GlyphNameRemap(const char* pStrAdobe) {
return found ? found->m_pStrUnicode : nullptr;
}
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
bool FT_UseType1Charmap(FXFT_Face face) {
if (FXFT_Get_Face_CharmapCount(face) == 0) {
@@ -114,7 +114,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
if (!m_Font.GetFace())
return;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
bool bCoreText = true;
CQuartz2D& quartz2d =
static_cast<CApplePlatform*>(CFX_GEModule::Get()->GetPlatformData())
@@ -138,7 +138,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
uint16_t unicode = prefix[j] * 256 + charcode;
m_GlyphIndex[charcode] =
FXFT_Get_Char_Index(m_Font.GetFace(), unicode);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
CalcExtGID(charcode);
#endif
if (m_GlyphIndex[charcode]) {
@@ -148,7 +148,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
}
if (bGotOne) {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (!bCoreText)
memcpy(m_ExtGID, m_GlyphIndex, 256);
#endif
@@ -168,25 +168,25 @@ void CPDF_Type1Font::LoadGlyphMap() {
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
m_GlyphIndex[charcode] = FXFT_Get_Char_Index(
m_Font.GetFace(), m_Encoding.m_Unicodes[charcode]);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
CalcExtGID(charcode);
#endif
if (m_GlyphIndex[charcode] == 0 && strcmp(name, ".notdef") == 0) {
m_Encoding.m_Unicodes[charcode] = 0x20;
m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), 0x20);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
CalcExtGID(charcode);
#endif
}
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (!bCoreText)
memcpy(m_ExtGID, m_GlyphIndex, 256);
#endif
return;
}
FT_UseType1Charmap(m_Font.GetFace());
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (bCoreText) {
if (m_Flags & FXFONT_SYMBOLIC) {
for (int charcode = 0; charcode < 256; charcode++) {
@@ -254,7 +254,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
return;
}
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (m_Flags & FXFONT_SYMBOLIC) {
for (int charcode = 0; charcode < 256; charcode++) {
const char* name =
@@ -283,7 +283,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
}
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (!bCoreText)
memcpy(m_ExtGID, m_GlyphIndex, 256);
@@ -312,13 +312,13 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
}
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (!bCoreText)
memcpy(m_ExtGID, m_GlyphIndex, 256);
#endif
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
void CPDF_Type1Font::SetExtGID(const char* name, int charcode) {
CFStringRef name_ct = CFStringCreateWithCStringNoCopy(
kCFAllocatorDefault, name, kCFStringEncodingASCII, kCFAllocatorNull);
@@ -335,4 +335,4 @@ void CPDF_Type1Font::CalcExtGID(int charcode) {
name_glyph[255] = 0;
SetExtGID(name_glyph, charcode);
}
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
diff --git a/core/fpdfapi/font/cpdf_type1font.h b/core/fpdfapi/font/cpdf_type1font.h
index 8039583d8e..76c4962ecb 100644
--- a/core/fpdfapi/font/cpdf_type1font.h
+++ b/core/fpdfapi/font/cpdf_type1font.h
@@ -29,7 +29,7 @@ class CPDF_Type1Font : public CPDF_SimpleFont {
// CPDF_SimpleFont:
void LoadGlyphMap() override;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
void SetExtGID(const char* name, int charcode);
void CalcExtGID(int charcode);
#endif
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index fef031119f..6a8ddd1e1c 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -209,7 +209,7 @@ void InsertWidthArrayImpl(int* widths, int size, CPDF_Array* pWidthArray) {
FX_Free(widths);
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
void InsertWidthArray(HDC hDC, int start, int end, CPDF_Array* pWidthArray) {
int size = end - start + 1;
int* widths = FX_Alloc(int, size);
@@ -228,7 +228,7 @@ ByteString FPDF_GetPSNameFromTT(HDC hDC) {
}
return result;
}
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
void InsertWidthArray1(CFX_Font* pFont,
CFX_UnicodeEncoding* pEncoding,
@@ -950,7 +950,7 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, bool bVert) {
return LoadFont(pBaseDict);
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTW* pLogFont,
bool bVert,
bool bTranslateName) {
@@ -1049,4 +1049,4 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont,
DeleteDC(hDC);
return LoadFont(pBaseDict);
}
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h
index c087254286..ab82c4a96a 100644
--- a/core/fpdfapi/parser/cpdf_document.h
+++ b/core/fpdfapi/parser/cpdf_document.h
@@ -95,7 +95,7 @@ class CPDF_Document : public CPDF_IndirectObjectHolder {
CPDF_Font* AddStandardFont(const char* font, CPDF_FontEncoding* pEncoding);
CPDF_Font* AddFont(CFX_Font* pFont, int charset, bool bVert);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
CPDF_Font* AddWindowsFont(LOGFONTA* pLogFont,
bool bVert,
bool bTranslateName = false);
diff --git a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
index 5df3348834..49a898f2ba 100644
--- a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
+++ b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
@@ -42,13 +42,13 @@ TEST_F(CPDFSecurityHandlerEmbeddertest, OwnerPassword) {
}
TEST_F(CPDFSecurityHandlerEmbeddertest, PasswordAfterGenerateSave) {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
+#if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
const char md5[] = "e4a3701ca5b2a759e06455aa8d97d46e";
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
const char md5[] = "6951b6c9891dfe0332a5b1983e484400";
#else
const char md5[] = "50985f3440d3f66c3b599ab138214015";
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
{
ASSERT_TRUE(OpenDocument("encrypted.pdf", "5678", true));
FPDF_PAGE page = LoadPage(0);
diff --git a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
index 502e4666f7..bb186924b6 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
@@ -112,9 +112,9 @@ TEST_F(FPDFParserDecodeEmbeddertest, Bug_455199) {
EXPECT_TRUE(OpenDocument("bug_455199.pdf"));
FPDF_PAGE page = LoadPage(0);
FPDF_BITMAP bitmap = RenderPage(page);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
const char kExpectedMd5sum[] = "b90475ca64d1348c3bf5e2b77ad9187a";
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
const char kExpectedMd5sum[] = "9a2637b73fd5265309bfddd9c69476cd";
#else
const char kExpectedMd5sum[] = "f7e129d97c58e91adeace32a4327b925";
diff --git a/core/fpdfapi/render/cpdf_charposlist.cpp b/core/fpdfapi/render/cpdf_charposlist.cpp
index f286474dd8..16fb3c140c 100644
--- a/core/fpdfapi/render/cpdf_charposlist.cpp
+++ b/core/fpdfapi/render/cpdf_charposlist.cpp
@@ -41,7 +41,7 @@ void CPDF_CharPosList::Load(const std::vector<uint32_t>& charCodes,
charpos.m_Unicode = !unicode.IsEmpty() ? unicode[0] : CharCode;
charpos.m_GlyphIndex = pFont->GlyphFromCharCode(CharCode, &bVert);
uint32_t GlyphID = charpos.m_GlyphIndex;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
charpos.m_ExtGID = pFont->GlyphFromCharCodeExt(CharCode);
GlyphID = charpos.m_ExtGID;
#endif
@@ -55,7 +55,7 @@ void CPDF_CharPosList::Load(const std::vector<uint32_t>& charCodes,
charpos.m_GlyphIndex = pFont->FallbackGlyphFromCharcode(
charpos.m_FallbackFontPosition, CharCode);
pCurrentFont = pFont->GetFontFallback(charpos.m_FallbackFontPosition);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
charpos.m_ExtGID = charpos.m_GlyphIndex;
#endif
}
diff --git a/core/fpdfapi/render/cpdf_devicebuffer.cpp b/core/fpdfapi/render/cpdf_devicebuffer.cpp
index b632dee49d..90301b2e56 100644
--- a/core/fpdfapi/render/cpdf_devicebuffer.cpp
+++ b/core/fpdfapi/render/cpdf_devicebuffer.cpp
@@ -28,7 +28,7 @@ bool CPDF_DeviceBuffer::Initialize(CPDF_RenderContext* pContext,
m_Rect = *pRect;
m_pObject = pObj;
m_Matrix.Translate(-pRect->left, -pRect->top);
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
int horz_size = pDevice->GetDeviceCaps(FXDC_HORZ_SIZE);
int vert_size = pDevice->GetDeviceCaps(FXDC_VERT_SIZE);
if (horz_size && vert_size && max_dpi) {
diff --git a/core/fpdfapi/render/cpdf_dibtransferfunc.cpp b/core/fpdfapi/render/cpdf_dibtransferfunc.cpp
index be2c9f30bb..d72ad48cf1 100644
--- a/core/fpdfapi/render/cpdf_dibtransferfunc.cpp
+++ b/core/fpdfapi/render/cpdf_dibtransferfunc.cpp
@@ -25,7 +25,7 @@ FXDIB_Format CPDF_DIBTransferFunc::GetDestFormat() {
if (m_pSrc->IsAlphaMask())
return FXDIB_8bppMask;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
return (m_pSrc->HasAlpha()) ? FXDIB_Argb : FXDIB_Rgb32;
#else
return (m_pSrc->HasAlpha()) ? FXDIB_Argb : FXDIB_Rgb;
@@ -59,7 +59,7 @@ void CPDF_DIBTransferFunc::TranslateScanline(
(*dest_buf)[index++] = g0;
(*dest_buf)[index++] = r0;
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
index++;
#endif
}
@@ -93,7 +93,7 @@ void CPDF_DIBTransferFunc::TranslateScanline(
(*dest_buf)[index++] = m_RampR[src_byte];
}
src_buf++;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
index++;
#endif
}
@@ -111,7 +111,7 @@ void CPDF_DIBTransferFunc::TranslateScanline(
(*dest_buf)[index++] = m_RampB[*(src_buf++)];
(*dest_buf)[index++] = m_RampG[*(src_buf++)];
(*dest_buf)[index++] = m_RampR[*(src_buf++)];
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
index++;
#endif
}
@@ -127,7 +127,7 @@ void CPDF_DIBTransferFunc::TranslateScanline(
(*dest_buf)[index++] = m_RampR[*(src_buf++)];
if (!bSkip) {
(*dest_buf)[index++] = *src_buf;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
} else {
index++;
#endif
@@ -155,7 +155,7 @@ void CPDF_DIBTransferFunc::TranslateDownSamples(uint8_t* dest_buf,
*dest_buf++ = m_RampR[*(src_buf++)];
}
} else {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (!m_pSrc->HasAlpha()) {
for (int i = 0; i < pixels; i++) {
*dest_buf++ = m_RampB[*(src_buf++)];
@@ -172,7 +172,7 @@ void CPDF_DIBTransferFunc::TranslateDownSamples(uint8_t* dest_buf,
*dest_buf++ = m_RampR[*(src_buf++)];
*dest_buf++ = *(src_buf++);
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
}
#endif
}
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 8cc91e470d..b49394993a 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -2551,7 +2551,7 @@ RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
int width = pClipRect->right - pClipRect->left;
int height = pClipRect->bottom - pClipRect->top;
FXDIB_Format format;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_ || \
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_ || \
defined _SKIA_SUPPORT_PATHS_
format = bLuminosity ? FXDIB_Rgb32 : FXDIB_8bppMask;
#else
diff --git a/core/fpdfdoc/cpdf_filespec.cpp b/core/fpdfdoc/cpdf_filespec.cpp
index 803c4148c7..2f999bcf4e 100644
--- a/core/fpdfdoc/cpdf_filespec.cpp
+++ b/core/fpdfdoc/cpdf_filespec.cpp
@@ -18,13 +18,13 @@
namespace {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
- _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || \
+ _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
WideString ChangeSlashToPlatform(const wchar_t* str) {
WideString result;
while (*str) {
if (*str == '/') {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
result += L':';
#else
result += L'\\';
@@ -49,7 +49,7 @@ WideString ChangeSlashToPDF(const wchar_t* str) {
}
return result;
}
-#endif // _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_APPLE_ || _FX_PLATFORM_WINDOWS_
} // namespace
@@ -63,11 +63,11 @@ WideString CPDF_FileSpec::DecodeFileName(const WideString& filepath) {
if (filepath.GetLength() <= 1)
return WideString();
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (filepath.Left(sizeof("/Mac") - 1) == WideStringView(L"/Mac"))
return ChangeSlashToPlatform(filepath.c_str() + 1);
return ChangeSlashToPlatform(filepath.c_str());
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (filepath[0] != L'/')
return ChangeSlashToPlatform(filepath.c_str());
@@ -157,7 +157,7 @@ WideString CPDF_FileSpec::EncodeFileName(const WideString& filepath) {
if (filepath.GetLength() <= 1)
return WideString();
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (filepath[1] == L':') {
WideString result(L'/');
result += filepath[0];
@@ -173,7 +173,7 @@ WideString CPDF_FileSpec::EncodeFileName(const WideString& filepath) {
if (filepath[0] == L'\\')
return L'/' + ChangeSlashToPDF(filepath.c_str());
return ChangeSlashToPDF(filepath.c_str());
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (filepath.Left(sizeof("Mac") - 1) == L"Mac")
return L'/' + ChangeSlashToPDF(filepath.c_str());
return ChangeSlashToPDF(filepath.c_str());
diff --git a/core/fpdfdoc/cpdf_filespec_unittest.cpp b/core/fpdfdoc/cpdf_filespec_unittest.cpp
index 8d151c9dd8..5537473e2c 100644
--- a/core/fpdfdoc/cpdf_filespec_unittest.cpp
+++ b/core/fpdfdoc/cpdf_filespec_unittest.cpp
@@ -22,7 +22,7 @@ TEST(cpdf_filespec, EncodeDecodeFileName) {
{L"", L""},
// only file name.
{L"test.pdf", L"test.pdf"},
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
// With drive identifier.
{L"r:\\pdfdocs\\spec.pdf", L"/r/pdfdocs/spec.pdf"},
// Relative path.
@@ -33,7 +33,7 @@ TEST(cpdf_filespec, EncodeDecodeFileName) {
{L"\\\\pdfdocs\\spec.pdf", L"/pdfdocs/spec.pdf"},
// Network resource name. It is not supported yet.
// {L"pclib/eng:\\pdfdocs\\spec.pdf", L"/pclib/eng/pdfdocs/spec.pdf"},
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
// Absolute path with colon separator.
{L"Mac HD:PDFDocs:spec.pdf", L"/Mac HD/PDFDocs/spec.pdf"},
// Relative path with colon separator.
@@ -60,10 +60,10 @@ TEST(cpdf_filespec, GetFileName) {
{
// String object.
pdfium::NullTermWstrFuncTestData test_data = {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
L"/C/docs/test.pdf",
L"C:\\docs\\test.pdf"
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
L"/Mac HD/docs/test.pdf",
L"Mac HD:docs:test.pdf"
#else
@@ -78,13 +78,13 @@ TEST(cpdf_filespec, GetFileName) {
{
// Dictionary object.
pdfium::NullTermWstrFuncTestData test_data[5] = {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
{L"/C/docs/test.pdf", L"C:\\docs\\test.pdf"},
{L"/D/docs/test.pdf", L"D:\\docs\\test.pdf"},
{L"/E/docs/test.pdf", L"E:\\docs\\test.pdf"},
{L"/F/docs/test.pdf", L"F:\\docs\\test.pdf"},
{L"/G/docs/test.pdf", L"G:\\docs\\test.pdf"},
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
{L"/Mac HD/docs1/test.pdf", L"Mac HD:docs1:test.pdf"},
{L"/Mac HD/docs2/test.pdf", L"Mac HD:docs2:test.pdf"},
{L"/Mac HD/docs3/test.pdf", L"Mac HD:docs3:test.pdf"},
@@ -123,10 +123,10 @@ TEST(cpdf_filespec, GetFileName) {
TEST(cpdf_filespec, SetFileName) {
pdfium::NullTermWstrFuncTestData test_data = {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
L"C:\\docs\\test.pdf",
L"/C/docs/test.pdf"
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
L"Mac HD:docs:test.pdf",
L"/Mac HD/docs/test.pdf"
#else
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
index 3bbb50b9ec..f17e543e70 100644
--- a/core/fpdfdoc/cpdf_interform.cpp
+++ b/core/fpdfdoc/cpdf_interform.cpp
@@ -322,7 +322,7 @@ class CFieldNameExtractor {
const wchar_t* m_pEnd;
};
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
typedef struct {
bool bFind;
LOGFONTA lf;
@@ -368,7 +368,7 @@ bool RetrieveSpecificFont(uint8_t charSet,
}
return RetrieveSpecificFont(lf);
}
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
int CompareFieldName(const WideString& name1, const WideString& name2) {
const wchar_t* ptr1 = name1.c_str();
@@ -578,7 +578,7 @@ CPDF_Font* AddNativeInterFormFont(CPDF_Dictionary*& pFormDict,
// static
uint8_t CPDF_InterForm::GetNativeCharSet() {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
uint8_t charSet = FX_CHARSET_ANSI;
UINT iCodePage = ::GetACP();
switch (iCodePage) {
@@ -738,7 +738,7 @@ CPDF_Font* CPDF_InterForm::AddStandardFont(CPDF_Document* pDocument,
ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, void* pLogFont) {
ByteString csFontName;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
LOGFONTA lf = {};
if (charSet == FX_CHARSET_ANSI) {
csFontName = "Helvetica";
@@ -783,7 +783,7 @@ CPDF_Font* CPDF_InterForm::AddNativeFont(uint8_t charSet,
if (!pDocument)
return nullptr;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
LOGFONTA lf;
ByteString csFontName = GetNativeFont(charSet, &lf);
if (!csFontName.IsEmpty()) {
diff --git a/core/fxcodec/codec/ccodec_faxmodule.h b/core/fxcodec/codec/ccodec_faxmodule.h
index 92e45e6719..58889d142b 100644
--- a/core/fxcodec/codec/ccodec_faxmodule.h
+++ b/core/fxcodec/codec/ccodec_faxmodule.h
@@ -26,7 +26,7 @@ class CCodec_FaxModule {
bool BlackIs1,
int Columns,
int Rows);
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
static void FaxEncode(const uint8_t* src_buf,
int width,
int height,
diff --git a/core/fxcodec/codec/ccodec_jpegmodule.h b/core/fxcodec/codec/ccodec_jpegmodule.h
index d7e484d56f..cc59924747 100644
--- a/core/fxcodec/codec/ccodec_jpegmodule.h
+++ b/core/fxcodec/codec/ccodec_jpegmodule.h
@@ -57,7 +57,7 @@ class CCodec_JpegModule {
bool ReadScanline(Context* pContext, uint8_t* dest_buf);
uint32_t GetAvailInput(Context* pContext, uint8_t** avail_buf_ptr);
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
static bool JpegEncode(const RetainPtr<CFX_DIBSource>& pSource,
uint8_t** dest_buf,
FX_STRSIZE* dest_size);
diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp
index 9c8eaa25ce..83ff5f7b3a 100644
--- a/core/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/fxcodec/codec/fx_codec_fax.cpp
@@ -607,7 +607,7 @@ std::unique_ptr<CCodec_ScanlineDecoder> CCodec_FaxModule::CreateDecoder(
EncodedByteAlign, BlackIs1);
}
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
namespace {
const uint8_t BlackRunTerminator[128] = {
0x37, 10, 0x02, 3, 0x03, 2, 0x02, 2, 0x03, 3, 0x03, 4, 0x02, 4,
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp
index ea32f00a2e..b77fc87394 100644
--- a/core/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/fxcodec/codec/fx_codec_jpeg.cpp
@@ -88,7 +88,7 @@ static void _error_do_nothing1(j_common_ptr cinfo, int) {}
static void _error_do_nothing2(j_common_ptr cinfo, char*) {}
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
static void _dest_do_nothing(j_compress_ptr cinfo) {}
static boolean _dest_empty(j_compress_ptr cinfo) {
@@ -506,7 +506,7 @@ uint32_t CCodec_JpegModule::GetAvailInput(Context* pContext,
return (uint32_t)ctx->m_SrcMgr.bytes_in_buffer;
}
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
#define JPEG_BLOCK_SIZE 1048576
bool CCodec_JpegModule::JpegEncode(const RetainPtr<CFX_DIBSource>& pSource,
uint8_t** dest_buf,
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index d93d46d57a..d28277173e 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -22,11 +22,11 @@
namespace {
-#if _FX_OS_ == _FX_MACOSX_
+#if _FX_OS_ == _FX_OS_MACOSX_
const double kPngGamma = 1.7;
-#else // _FX_OS_ == _FX_MACOSX_
+#else // _FX_OS_ == _FX_OS_MACOSX_
const double kPngGamma = 2.2;
-#endif // _FX_OS_ == _FX_MACOSX_
+#endif // _FX_OS_ == _FX_OS_MACOSX_
void RGB2BGR(uint8_t* buffer, int width = 1) {
if (buffer && width > 0) {
diff --git a/core/fxcrt/cfx_datetime.cpp b/core/fxcrt/cfx_datetime.cpp
index beba3654a4..521e07cb67 100644
--- a/core/fxcrt/cfx_datetime.cpp
+++ b/core/fxcrt/cfx_datetime.cpp
@@ -7,8 +7,8 @@
#include "core/fxcrt/cfx_datetime.h"
#include "core/fxcrt/fx_system.h"
-#if _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_ || \
- _FX_OS_ == _FX_MACOSX_
+#if _FX_OS_ == _FX_OS_LINUX_ || _FX_OS_ == _FX_OS_ANDROID_ || \
+ _FX_OS_ == _FX_OS_MACOSX_
#include <sys/time.h>
#include <time.h>
#endif
@@ -92,9 +92,9 @@ bool FX_IsLeapYear(int32_t iYear) {
void CFX_DateTime::Now() {
FXUT_SYSTEMTIME utLocal;
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
::GetLocalTime((LPSYSTEMTIME)&utLocal);
-#else // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#else // _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
timeval curTime;
gettimeofday(&curTime, nullptr);
@@ -108,7 +108,7 @@ void CFX_DateTime::Now() {
utLocal.wMinute = st.tm_min;
utLocal.wSecond = st.tm_sec;
utLocal.wMillisecond = curTime.tv_usec / 1000;
-#endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#endif // _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
year_ = utLocal.wYear;
month_ = static_cast<uint8_t>(utLocal.wMonth);
diff --git a/core/fxcrt/cfx_datetime.h b/core/fxcrt/cfx_datetime.h
index 272c2496cc..28991103f5 100644
--- a/core/fxcrt/cfx_datetime.h
+++ b/core/fxcrt/cfx_datetime.h
@@ -91,14 +91,14 @@ class CFX_DateTime {
uint16_t millisecond_;
};
-#if _FX_OS_ != _FX_ANDROID_
+#if _FX_OS_ != _FX_OS_ANDROID_
#pragma pack(push, 1)
#endif
struct FX_TIMEZONE {
int8_t tzHour;
uint8_t tzMinute;
};
-#if _FX_OS_ != _FX_ANDROID_
+#if _FX_OS_ != _FX_OS_ANDROID_
#pragma pack(pop)
#endif
diff --git a/core/fxcrt/cfx_fileaccess_posix.cpp b/core/fxcrt/cfx_fileaccess_posix.cpp
index d98e58dbe9..2f85670c59 100644
--- a/core/fxcrt/cfx_fileaccess_posix.cpp
+++ b/core/fxcrt/cfx_fileaccess_posix.cpp
@@ -18,9 +18,9 @@
#define O_LARGEFILE 0
#endif // O_LARGEFILE
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \
- _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
- _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
+#if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_ || \
+ _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || \
+ _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_
namespace {
diff --git a/core/fxcrt/cfx_fileaccess_posix.h b/core/fxcrt/cfx_fileaccess_posix.h
index 0b739e72d8..efa25ebb4c 100644
--- a/core/fxcrt/cfx_fileaccess_posix.h
+++ b/core/fxcrt/cfx_fileaccess_posix.h
@@ -9,9 +9,9 @@
#include "core/fxcrt/ifx_fileaccess.h"
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \
- _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
- _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
+#if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_ || \
+ _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || \
+ _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_
class CFX_FileAccess_Posix : public IFX_FileAccess {
public:
CFX_FileAccess_Posix();
diff --git a/core/fxcrt/cfx_fileaccess_windows.cpp b/core/fxcrt/cfx_fileaccess_windows.cpp
index 105ad788f7..1ac4496edb 100644
--- a/core/fxcrt/cfx_fileaccess_windows.cpp
+++ b/core/fxcrt/cfx_fileaccess_windows.cpp
@@ -11,7 +11,7 @@
#include "core/fxcrt/fx_string.h"
#include "third_party/base/ptr_util.h"
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
namespace {
diff --git a/core/fxcrt/cfx_fileaccess_windows.h b/core/fxcrt/cfx_fileaccess_windows.h
index f05ab39d6e..6fd07d553c 100644
--- a/core/fxcrt/cfx_fileaccess_windows.h
+++ b/core/fxcrt/cfx_fileaccess_windows.h
@@ -9,7 +9,7 @@
#include "core/fxcrt/ifx_fileaccess.h"
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
class CFX_FileAccess_Windows : public IFX_FileAccess {
public:
CFX_FileAccess_Windows();
diff --git a/core/fxcrt/cfx_seekablestreamproxy.cpp b/core/fxcrt/cfx_seekablestreamproxy.cpp
index 24f7869f45..3c0b5d5aef 100644
--- a/core/fxcrt/cfx_seekablestreamproxy.cpp
+++ b/core/fxcrt/cfx_seekablestreamproxy.cpp
@@ -6,7 +6,7 @@
#include "core/fxcrt/cfx_seekablestreamproxy.h"
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
#include <io.h>
#endif
diff --git a/core/fxcrt/fx_random.cpp b/core/fxcrt/fx_random.cpp
index 483a56bbf4..56f84d59b3 100644
--- a/core/fxcrt/fx_random.cpp
+++ b/core/fxcrt/fx_random.cpp
@@ -16,12 +16,12 @@
#define MT_Upper_Mask 0x80000000
#define MT_Lower_Mask 0x7fffffff
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include <wincrypt.h>
-#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include <sys/time.h>
#include <unistd.h>
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
namespace {
@@ -33,7 +33,7 @@ struct MTContext {
bool g_bHaveGlobalSeed = false;
uint32_t g_nGlobalSeed = 0;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
bool GenerateSeedFromCryptoRandom(uint32_t* pSeed) {
HCRYPTPROV hCP = 0;
if (!::CryptAcquireContext(&hCP, nullptr, nullptr, PROV_RSA_FULL, 0) ||
@@ -50,30 +50,30 @@ uint32_t GenerateSeedFromEnvironment() {
char c;
uintptr_t p = reinterpret_cast<uintptr_t>(&c);
uint32_t seed = ~static_cast<uint32_t>(p >> 3);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
SYSTEMTIME st;
GetSystemTime(&st);
seed ^= static_cast<uint32_t>(st.wSecond) * 1000000;
seed ^= static_cast<uint32_t>(st.wMilliseconds) * 1000;
seed ^= GetCurrentProcessId();
-#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
struct timeval tv;
gettimeofday(&tv, 0);
seed ^= static_cast<uint32_t>(tv.tv_sec) * 1000000;
seed ^= static_cast<uint32_t>(tv.tv_usec);
seed ^= static_cast<uint32_t>(getpid());
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
return seed;
}
void* ContextFromNextGlobalSeed() {
if (!g_bHaveGlobalSeed) {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (!GenerateSeedFromCryptoRandom(&g_nGlobalSeed))
g_nGlobalSeed = GenerateSeedFromEnvironment();
-#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
g_nGlobalSeed = GenerateSeedFromEnvironment();
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
g_bHaveGlobalSeed = true;
}
return FX_Random_MT_Start(++g_nGlobalSeed);
diff --git a/core/fxcrt/fx_stream.cpp b/core/fxcrt/fx_stream.cpp
index e15fdb0a81..bd75ad6ec7 100644
--- a/core/fxcrt/fx_stream.cpp
+++ b/core/fxcrt/fx_stream.cpp
@@ -100,7 +100,7 @@ bool IFX_SeekableStream::WriteString(const ByteStringView& str) {
}
FX_FileHandle* FX_OpenFolder(const char* path) {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
auto pData = pdfium::MakeUnique<CFindFileDataA>();
pData->m_Handle =
FindFirstFileExA((ByteString(path) + "/*.*").c_str(), FindExInfoStandard,
@@ -121,7 +121,7 @@ bool FX_GetNextFile(FX_FileHandle* handle,
if (!handle)
return false;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (handle->m_bEnd)
return false;
@@ -145,7 +145,7 @@ void FX_CloseFolder(FX_FileHandle* handle) {
if (!handle)
return;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
FindClose(handle->m_Handle);
delete handle;
#else
diff --git a/core/fxcrt/fx_stream.h b/core/fxcrt/fx_stream.h
index d7944167c6..84e33c2060 100644
--- a/core/fxcrt/fx_stream.h
+++ b/core/fxcrt/fx_stream.h
@@ -11,13 +11,13 @@
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/retain_ptr.h"
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include <direct.h>
class CFindFileDataA;
typedef CFindFileDataA FX_FileHandle;
-#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include <dirent.h>
#include <fcntl.h>
@@ -26,7 +26,7 @@ typedef CFindFileDataA FX_FileHandle;
#include <unistd.h>
typedef DIR FX_FileHandle;
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
FX_FileHandle* FX_OpenFolder(const char* path);
bool FX_GetNextFile(FX_FileHandle* handle, ByteString* filename, bool* bFolder);
@@ -109,7 +109,7 @@ class IFX_SeekableStream : public IFX_SeekableReadStream,
bool Flush() override = 0;
};
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
class CFindFileData {
public:
virtual ~CFindFileData() {}
diff --git a/core/fxcrt/fx_system.cpp b/core/fxcrt/fx_system.cpp
index bf13ad2e5e..a5ceec5be1 100644
--- a/core/fxcrt/fx_system.cpp
+++ b/core/fxcrt/fx_system.cpp
@@ -106,7 +106,7 @@ const char* FXSYS_i64toa(int64_t value, char* str, int radix) {
return FXSYS_IntToStr<int64_t, uint64_t, char*>(value, str, radix);
}
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
int FXSYS_GetACP() {
return 0;
@@ -219,7 +219,7 @@ int FXSYS_MultiByteToWideChar(uint32_t codepage,
return wlen;
}
-#else // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
size_t FXSYS_wcsftime(wchar_t* strDest,
size_t maxsize,
@@ -239,4 +239,4 @@ size_t FXSYS_wcsftime(wchar_t* strDest,
return wcsftime(strDest, maxsize, format, timeptr);
}
-#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h
index 7a95bf4fd0..426dc085fc 100644
--- a/core/fxcrt/fx_system.h
+++ b/core/fxcrt/fx_system.h
@@ -18,34 +18,34 @@
#include <wchar.h>
// _FX_OS_ values:
-#define _FX_WIN32_DESKTOP_ 1
-#define _FX_WIN64_DESKTOP_ 2
-#define _FX_LINUX_DESKTOP_ 4
-#define _FX_MACOSX_ 7
-#define _FX_ANDROID_ 12
-
-// _FXM_PLATFORM_ values;
-#define _FXM_PLATFORM_WINDOWS_ 1 // _FX_WIN32_DESKTOP_ or _FX_WIN64_DESKTOP_.
-#define _FXM_PLATFORM_LINUX_ 2 // _FX_LINUX_DESKTOP_ always.
-#define _FXM_PLATFORM_APPLE_ 3 // _FX_MACOSX_ always.
-#define _FXM_PLATFORM_ANDROID_ 4 // _FX_ANDROID_ always.
+#define _FX_OS_WIN32_ 1
+#define _FX_OS_WIN64_ 2
+#define _FX_OS_LINUX_ 4
+#define _FX_OS_MACOSX_ 7
+#define _FX_OS_ANDROID_ 12
+
+// _FX_PLATFORM_ values;
+#define _FX_PLATFORM_WINDOWS_ 1 // _FX_OS_WIN32_ or _FX_OS_WIN64_.
+#define _FX_PLATFORM_LINUX_ 2 // _FX_OS_LINUX_ always.
+#define _FX_PLATFORM_APPLE_ 3 // _FX_OS_MACOSX_ always.
+#define _FX_PLATFORM_ANDROID_ 4 // _FX_OS_ANDROID_ always.
#ifndef _FX_OS_
#if defined(__ANDROID__)
-#define _FX_OS_ _FX_ANDROID_
-#define _FXM_PLATFORM_ _FXM_PLATFORM_ANDROID_
+#define _FX_OS_ _FX_OS_ANDROID_
+#define _FX_PLATFORM_ _FX_PLATFORM_ANDROID_
#elif defined(_WIN32)
-#define _FX_OS_ _FX_WIN32_DESKTOP_
-#define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_
+#define _FX_OS_ _FX_OS_WIN32_
+#define _FX_PLATFORM_ _FX_PLATFORM_WINDOWS_
#elif defined(_WIN64)
-#define _FX_OS_ _FX_WIN64_DESKTOP_
-#define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_
+#define _FX_OS_ _FX_OS_WIN64_
+#define _FX_PLATFORM_ _FX_PLATFORM_WINDOWS_
#elif defined(__linux__)
-#define _FX_OS_ _FX_LINUX_DESKTOP_
-#define _FXM_PLATFORM_ _FXM_PLATFORM_LINUX_
+#define _FX_OS_ _FX_OS_LINUX_
+#define _FX_PLATFORM_ _FX_PLATFORM_LINUX_
#elif defined(__APPLE__)
-#define _FX_OS_ _FX_MACOSX_
-#define _FXM_PLATFORM_ _FXM_PLATFORM_APPLE_
+#define _FX_OS_ _FX_OS_MACOSX_
+#define _FX_PLATFORM_ _FX_PLATFORM_APPLE_
#endif
#endif // _FX_OS_
@@ -57,15 +57,15 @@
#error Sorry, VC++ 2015 or later is required to compile PDFium.
#endif // defined(_MSC_VER) && _MSC_VER < 1900
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include <windows.h>
#include <sal.h>
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
#include <Carbon/Carbon.h>
#include <libkern/OSAtomic.h>
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
#ifdef __cplusplus
extern "C" {
@@ -84,11 +84,11 @@ typedef size_t FX_STRSIZE;
// files larger than 2GB even if the platform does. The value must be signed
// to support -1 error returns.
// TODO(tsepez): support larger files.
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#define FX_FILESIZE int32_t
-#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#define FX_FILESIZE off_t
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#ifndef ASSERT
#ifndef NDEBUG
@@ -154,7 +154,7 @@ extern "C" {
#define FXSYS_wcslen(ptr) ((FX_STRSIZE)wcslen(ptr))
#endif // __cplusplus
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#define FXSYS_GetACP GetACP
#define FXSYS_itoa _itoa
#define FXSYS_strlwr _strlwr
@@ -181,7 +181,7 @@ size_t FXSYS_wcsftime(wchar_t* strDest,
#define FXSYS_wcsupr _wcsupr
#endif // _NATIVE_WCHAR_T_DEFINED
-#else // _FXM_PLATFORM == _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
int FXSYS_GetACP();
char* FXSYS_itoa(int value, char* str, int radix);
@@ -207,7 +207,7 @@ wchar_t* FXSYS_wcslwr(wchar_t* str);
wchar_t* FXSYS_wcsupr(wchar_t* str);
#define FXSYS_pow(a, b) (float)pow(a, b)
#define FXSYS_wcsftime wcsftime
-#endif // _FXM_PLATFORM == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#define FXDWORD_GET_LSBFIRST(p) \
((static_cast<uint32_t>(p[3]) << 24) | (static_cast<uint32_t>(p[2]) << 16) | \
@@ -230,7 +230,7 @@ int FXSYS_round(float f);
// size_t size;
// printf("xyz: %" PRIuS, size);
// The "u" in the macro corresponds to %u, and S is for "size".
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && !defined(PRId64)
#error "inttypes.h has already been included before this header file, but "
@@ -247,20 +247,20 @@ int FXSYS_round(float f);
#define PRIuS "zu"
#endif
-#else // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
#if !defined(PRIuS)
#define PRIuS "Iu"
#endif
-#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
// Prevent a function from ever being inlined, typically because we'd
// like it to appear in stack traces.
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#define NEVER_INLINE __declspec(noinline)
-#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#define NEVER_INLINE __attribute__((__noinline__))
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#endif // CORE_FXCRT_FX_SYSTEM_H_
diff --git a/core/fxcrt/fx_system_unittest.cpp b/core/fxcrt/fx_system_unittest.cpp
index 6a0fe71abe..73f9c75c1e 100644
--- a/core/fxcrt/fx_system_unittest.cpp
+++ b/core/fxcrt/fx_system_unittest.cpp
@@ -11,7 +11,7 @@
// Unit test covering cases where PDFium replaces well-known library
// functionality on any given platformn.
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
namespace {
@@ -158,7 +158,7 @@ TEST(fxcrt, FXSYS_i64toa) {
"111111111111111111111111111111111111111111111111111111111111111");
}
-#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
+#endif // _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_
TEST(fxcrt, FXSYS_wcsftime) {
struct tm good_time = {};
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 7f24378feb..b394facace 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -1109,7 +1109,7 @@ CFX_AggDeviceDriver::CFX_AggDeviceDriver(
const RetainPtr<CFX_DIBitmap>& pOriDevice,
bool bGroupKnockout)
: m_pBitmap(pBitmap),
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
m_pPlatformGraphics(nullptr),
#endif
m_FillFlags(0),
@@ -1127,7 +1127,7 @@ uint8_t* CFX_AggDeviceDriver::GetBuffer() const {
return m_pBitmap->GetBuffer();
}
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
void CFX_AggDeviceDriver::InitPlatform() {}
void CFX_AggDeviceDriver::DestroyPlatform() {}
@@ -1140,7 +1140,7 @@ bool CFX_AggDeviceDriver::DrawDeviceText(int nChars,
uint32_t color) {
return false;
}
-#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
+#endif // _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
int CFX_AggDeviceDriver::GetDeviceCaps(int caps_id) const {
switch (caps_id) {
diff --git a/core/fxge/agg/fx_agg_driver.h b/core/fxge/agg/fx_agg_driver.h
index 0afc7e3123..92500c3df6 100644
--- a/core/fxge/agg/fx_agg_driver.h
+++ b/core/fxge/agg/fx_agg_driver.h
@@ -112,7 +112,7 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver {
RetainPtr<CFX_DIBitmap> m_pBitmap;
std::unique_ptr<CFX_ClipRgn> m_pClipRgn;
std::vector<std::unique_ptr<CFX_ClipRgn>> m_StateStack;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
void* m_pPlatformGraphics;
#endif
int m_FillFlags;
diff --git a/core/fxge/cfx_facecache.cpp b/core/fxge/cfx_facecache.cpp
index 217c41119c..782e5f9d07 100644
--- a/core/fxge/cfx_facecache.cpp
+++ b/core/fxge/cfx_facecache.cpp
@@ -24,7 +24,7 @@
#include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/core/SkTypeface.h"
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include "third_party/skia/include/ports/SkFontMgr.h"
#include "third_party/skia/include/ports/SkFontMgr_empty.h"
#endif
@@ -284,7 +284,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(const CFX_Font* pFont,
int nMatrixB = static_cast<int>(pMatrix->b * 10000);
int nMatrixC = static_cast<int>(pMatrix->c * 10000);
int nMatrixD = static_cast<int>(pMatrix->d * 10000);
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
if (pFont->GetSubstFont()) {
keygen.Generate(9, nMatrixA, nMatrixB, nMatrixC, nMatrixD, dest_width,
anti_alias, pFont->GetSubstFont()->m_Weight,
@@ -317,7 +317,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(const CFX_Font* pFont,
}
#endif
ByteString FaceGlyphsKey(keygen.key_, keygen.key_len_);
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_ || \
+#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_ || \
defined _SKIA_SUPPORT_PATHS_
return LookUpGlyphBitmap(pFont, pMatrix, FaceGlyphsKey, glyph_index,
bFontStyle, dest_width, anti_alias);
@@ -375,7 +375,7 @@ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(const CFX_Font* pFont) {
m_pTypeface = SkTypeface::MakeFromStream(
new SkMemoryStream(pFont->GetFontData(), pFont->GetSize()));
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (!m_pTypeface) {
sk_sp<SkFontMgr> customMgr(SkFontMgr_New_Custom_Empty());
m_pTypeface.reset(customMgr->createFromStream(
@@ -386,7 +386,7 @@ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(const CFX_Font* pFont) {
}
#endif
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ != _FX_PLATFORM_APPLE_
void CFX_FaceCache::InitPlatform() {}
#endif
diff --git a/core/fxge/cfx_folderfontinfo.cpp b/core/fxge/cfx_folderfontinfo.cpp
index 0dc61c998f..f2a19a4c4f 100644
--- a/core/fxge/cfx_folderfontinfo.cpp
+++ b/core/fxge/cfx_folderfontinfo.cpp
@@ -136,7 +136,7 @@ void CFX_FolderFontInfo::ScanPath(const ByteString& path) {
}
ByteString fullpath = path;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
fullpath += "\\";
#else
fullpath += "/";
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 6e252fc065..87ce9b53ec 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -217,7 +217,7 @@ CFX_Font::CFX_Font()
m_pFontData(nullptr),
m_pGsubData(nullptr),
m_dwSize(0),
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
m_pPlatformFont(nullptr),
#endif
m_bEmbedded(false),
@@ -244,7 +244,7 @@ bool CFX_Font::LoadClone(const CFX_Font* pFont) {
m_dwSize = pFont->m_dwSize;
m_pFontData = pFont->m_pFontData;
m_pGsubData = pFont->m_pGsubData;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
m_pPlatformFont = pFont->m_pPlatformFont;
#endif
m_pOwnedStream = pFont->m_pOwnedStream;
@@ -276,7 +276,7 @@ CFX_Font::~CFX_Font() {
delete m_pOwnedStream;
#endif // PDF_ENABLE_XFA
FX_Free(m_pGsubData);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ && !defined _SKIA_SUPPORT_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ && !defined _SKIA_SUPPORT_
ReleasePlatformResource();
#endif
}
diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp
index 4e26c62eeb..ac840ea168 100644
--- a/core/fxge/cfx_fontmapper.cpp
+++ b/core/fxge/cfx_fontmapper.cpp
@@ -577,13 +577,13 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const ByteString& name,
bItalic = italic_angle != 0;
weight = old_weight;
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
+#if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
const char* narrow_family = "LiberationSansNarrow";
-#elif _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
+#elif _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_
const char* narrow_family = "RobotoCondensed";
#else
const char* narrow_family = "ArialNarrow";
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
auto pos = SubstName.Find("Narrow");
if (pos.has_value() && pos.value() != 0)
family = narrow_family;
@@ -644,8 +644,8 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const ByteString& name,
}
} else {
if (Charset == FX_CHARSET_Symbol) {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
- _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || \
+ _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_
if (SubstName == "Symbol") {
pSubstFont->m_Family = "Chrome Symbol";
pSubstFont->m_Charset = FX_CHARSET_Symbol;
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index c6f9411176..9c44fbc1ef 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -332,7 +332,7 @@ void DrawNormalTextHelper(const RetainPtr<CFX_DIBitmap>& bitmap,
}
bool ShouldDrawDeviceText(const CFX_Font* pFont, uint32_t text_flags) {
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (text_flags & FXFONT_CIDFONT)
return false;
@@ -352,7 +352,7 @@ FXTEXT_CHARPOS::FXTEXT_CHARPOS()
: m_Unicode(0),
m_GlyphIndex(0),
m_FontCharWidth(0),
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
m_ExtGID(0),
#endif
m_FallbackFontPosition(0),
@@ -438,7 +438,7 @@ bool CFX_RenderDevice::CreateCompatibleBitmap(
}
if (m_RenderCaps & FXRC_BYTEMASK_OUTPUT)
return pDIB->Create(width, height, FXDIB_8bppMask);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_PATHS_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_PATHS_
return pDIB->Create(
width, height,
m_RenderCaps & FXRC_ALPHA_OUTPUT ? FXDIB_Argb : FXDIB_Rgb32);
diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h
index 4dc8faa466..66fa0a8c6b 100644
--- a/core/fxge/cfx_renderdevice.h
+++ b/core/fxge/cfx_renderdevice.h
@@ -75,7 +75,7 @@ class FXTEXT_CHARPOS {
uint32_t m_Unicode;
uint32_t m_GlyphIndex;
int32_t m_FontCharWidth;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
uint32_t m_ExtGID;
#endif
int32_t m_FallbackFontPosition;
diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp
index 8e105937ee..857ca9a3ce 100644
--- a/core/fxge/dib/cfx_dibitmap.cpp
+++ b/core/fxge/dib/cfx_dibitmap.cpp
@@ -296,7 +296,7 @@ bool CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel,
if (HasAlpha()) {
if (!ConvertFormat(IsCmykImage() ? FXDIB_Cmyka : FXDIB_Argb))
return false;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
} else if (!ConvertFormat(IsCmykImage() ? FXDIB_Cmyk : FXDIB_Rgb32)) {
#else
} else if (!ConvertFormat(IsCmykImage() ? FXDIB_Cmyk : FXDIB_Rgb)) {
@@ -375,7 +375,7 @@ bool CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel, int value) {
if (!ConvertFormat(IsCmykImage() ? FXDIB_Cmyka : FXDIB_Argb)) {
return false;
}
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
} else if (!ConvertFormat(IsCmykImage() ? FXDIB_Cmyk : FXDIB_Rgb)) {
#else
} else if (!ConvertFormat(IsCmykImage() ? FXDIB_Cmyk : FXDIB_Rgb32)) {
diff --git a/core/fxge/fx_font.h b/core/fxge/fx_font.h
index e4b085a931..47a8b6084a 100644
--- a/core/fxge/fx_font.h
+++ b/core/fxge/fx_font.h
@@ -136,7 +136,7 @@ class CFX_Font {
bool IsEmbedded() const { return m_bEmbedded; }
uint8_t* GetSubData() const { return m_pGsubData; }
void SetSubData(uint8_t* data) { m_pGsubData = data; }
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
void* GetPlatformFont() const { return m_pPlatformFont; }
void SetPlatformFont(void* font) { m_pPlatformFont = font; }
#endif
@@ -172,7 +172,7 @@ class CFX_Font {
uint8_t* m_pFontData;
uint8_t* m_pGsubData;
uint32_t m_dwSize;
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
void* m_pPlatformFont;
#endif
bool m_bEmbedded;
diff --git a/core/fxge/fx_ge_fontmap.cpp b/core/fxge/fx_ge_fontmap.cpp
index 0f2703875d..b11ee9c6f3 100644
--- a/core/fxge/fx_ge_fontmap.cpp
+++ b/core/fxge/fx_ge_fontmap.cpp
@@ -72,7 +72,7 @@ unsigned long _FTStreamRead(FXFT_Stream stream,
void _FTStreamClose(FXFT_Stream stream);
};
-#if _FX_OS_ == _FX_ANDROID_
+#if _FX_OS_ == _FX_OS_ANDROID_
std::unique_ptr<IFX_SystemFontInfo> IFX_SystemFontInfo::CreateDefault(
const char** pUnused) {
return nullptr;
diff --git a/core/fxge/fx_ge_linux.cpp b/core/fxge/fx_ge_linux.cpp
index 650510f63e..302470b386 100644
--- a/core/fxge/fx_ge_linux.cpp
+++ b/core/fxge/fx_ge_linux.cpp
@@ -13,7 +13,7 @@
#include "core/fxge/ifx_systemfontinfo.h"
#include "third_party/base/ptr_util.h"
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
+#if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
namespace {
const size_t kLinuxGpNameSize = 6;
@@ -162,4 +162,4 @@ void CFX_GEModule::InitPlatform() {
}
void CFX_GEModule::DestroyPlatform() {}
-#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 6b82bc217b..c8af215f26 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -870,7 +870,7 @@ class SkiaState {
m_positions[index + count] = {cp.m_Origin.x * flip,
cp.m_Origin.y * vFlip};
m_glyphs[index + count] = static_cast<uint16_t>(cp.m_GlyphIndex);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (cp.m_ExtGID)
m_glyphs[index + count] = static_cast<uint16_t>(cp.m_ExtGID);
#endif
@@ -1590,7 +1590,7 @@ bool CFX_SkiaDeviceDriver::DrawDeviceText(int nChars,
}
}
glyphs[index] = static_cast<uint16_t>(cp.m_GlyphIndex);
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
if (cp.m_ExtGID)
glyphs[index] = static_cast<uint16_t>(cp.m_ExtGID);
#endif