summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-03 15:05:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-03 20:39:56 +0000
commit1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca (patch)
tree315955cce6b29093dcddfc48c0811957a172bedf /core/fxge
parent2ae80f52cec81c080515724f99deb06b2fee3cc9 (diff)
downloadpdfium-1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca.tar.xz
Drop FXSYS_ from mem methods
This Cl drops the FXSYS_ from mem methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236 Reviewed-on: https://pdfium-review.googlesource.com/3613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/android/cfpf_skiafontdescriptor.h2
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.cpp2
-rw-r--r--core/fxge/android/cfpf_skiapathfont.h2
-rw-r--r--core/fxge/dib/cfx_bitmapcomposer.cpp2
-rw-r--r--core/fxge/dib/cfx_bitmapstorer.cpp6
-rw-r--r--core/fxge/dib/cfx_dibitmap.cpp43
-rw-r--r--core/fxge/dib/cfx_dibsource.cpp22
-rw-r--r--core/fxge/dib/cfx_scanlinecompositor.cpp6
-rw-r--r--core/fxge/dib/fx_dib_convert.cpp16
-rw-r--r--core/fxge/dib/fx_dib_engine.cpp2
-rw-r--r--core/fxge/ge/cfx_facecache.cpp10
-rw-r--r--core/fxge/ge/cfx_fontmapper.cpp2
-rw-r--r--core/fxge/ge/cfx_graphstatedata.cpp2
-rw-r--r--core/fxge/skia/fx_skia_device.cpp4
-rw-r--r--core/fxge/win32/cfx_psrenderer.cpp8
-rw-r--r--core/fxge/win32/cpsoutput.cpp2
-rw-r--r--core/fxge/win32/fx_win32_device.cpp6
-rw-r--r--core/fxge/win32/fx_win32_dib.cpp14
-rw-r--r--core/fxge/win32/fx_win32_gdipext.cpp8
19 files changed, 79 insertions, 80 deletions
diff --git a/core/fxge/android/cfpf_skiafontdescriptor.h b/core/fxge/android/cfpf_skiafontdescriptor.h
index 56f8a34fa5..f653050feb 100644
--- a/core/fxge/android/cfpf_skiafontdescriptor.h
+++ b/core/fxge/android/cfpf_skiafontdescriptor.h
@@ -27,7 +27,7 @@ class CFPF_SkiaFontDescriptor {
FX_Free(m_pFamily);
int32_t iSize = FXSYS_strlen(pFamily);
m_pFamily = FX_Alloc(char, iSize + 1);
- FXSYS_memcpy(m_pFamily, pFamily, iSize * sizeof(char));
+ memcpy(m_pFamily, pFamily, iSize * sizeof(char));
m_pFamily[iSize] = 0;
}
char* m_pFamily;
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index 00d989e55c..534f41a548 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -371,7 +371,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(
if (iFaceIndex < 0)
return nullptr;
FXFT_StreamRec streamRec;
- FXSYS_memset(&streamRec, 0, sizeof(FXFT_StreamRec));
+ memset(&streamRec, 0, sizeof(FXFT_StreamRec));
streamRec.size = pFileRead->GetSize();
streamRec.descriptor.pointer = static_cast<void*>(pFileRead.Get());
streamRec.read = FPF_SkiaStream_Read;
diff --git a/core/fxge/android/cfpf_skiapathfont.h b/core/fxge/android/cfpf_skiapathfont.h
index f8ddc6c83a..8b7a4f9fb4 100644
--- a/core/fxge/android/cfpf_skiapathfont.h
+++ b/core/fxge/android/cfpf_skiapathfont.h
@@ -24,7 +24,7 @@ class CFPF_SkiaPathFont : public CFPF_SkiaFontDescriptor {
FX_Free(m_pPath);
int32_t iSize = FXSYS_strlen(pPath);
m_pPath = FX_Alloc(char, iSize + 1);
- FXSYS_memcpy(m_pPath, pPath, iSize * sizeof(char));
+ memcpy(m_pPath, pPath, iSize * sizeof(char));
m_pPath[iSize] = 0;
}
char* m_pPath;
diff --git a/core/fxge/dib/cfx_bitmapcomposer.cpp b/core/fxge/dib/cfx_bitmapcomposer.cpp
index 7124ba9d46..8dd87b1def 100644
--- a/core/fxge/dib/cfx_bitmapcomposer.cpp
+++ b/core/fxge/dib/cfx_bitmapcomposer.cpp
@@ -95,7 +95,7 @@ void CFX_BitmapComposer::DoCompose(uint8_t* dest_scan,
m_pAddClipScan[i] = clip_scan[i] * m_BitmapAlpha / 255;
}
} else {
- FXSYS_memset(m_pAddClipScan, m_BitmapAlpha, dest_width);
+ memset(m_pAddClipScan, m_BitmapAlpha, dest_width);
}
clip_scan = m_pAddClipScan;
}
diff --git a/core/fxge/dib/cfx_bitmapstorer.cpp b/core/fxge/dib/cfx_bitmapstorer.cpp
index ac876b16b7..4e1cb3bc38 100644
--- a/core/fxge/dib/cfx_bitmapstorer.cpp
+++ b/core/fxge/dib/cfx_bitmapstorer.cpp
@@ -32,11 +32,11 @@ void CFX_BitmapStorer::ComposeScanline(int line,
? const_cast<uint8_t*>(m_pBitmap->m_pAlphaMask->GetScanline(line))
: nullptr;
if (dest_buf)
- FXSYS_memcpy(dest_buf, scanline, m_pBitmap->GetPitch());
+ memcpy(dest_buf, scanline, m_pBitmap->GetPitch());
if (dest_alpha_buf) {
- FXSYS_memcpy(dest_alpha_buf, scan_extra_alpha,
- m_pBitmap->m_pAlphaMask->GetPitch());
+ memcpy(dest_alpha_buf, scan_extra_alpha,
+ m_pBitmap->m_pAlphaMask->GetPitch());
}
}
diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp
index 0adc088b53..b97917dba7 100644
--- a/core/fxge/dib/cfx_dibitmap.cpp
+++ b/core/fxge/dib/cfx_dibitmap.cpp
@@ -90,7 +90,7 @@ bool CFX_DIBitmap::Copy(const CFX_RetainPtr<CFX_DIBSource>& pSrc) {
SetPalette(pSrc->GetPalette());
SetAlphaMask(pSrc->m_pAlphaMask);
for (int row = 0; row < pSrc->GetHeight(); row++)
- FXSYS_memcpy(m_pBuffer + row * m_Pitch, pSrc->GetScanline(row), m_Pitch);
+ memcpy(m_pBuffer + row * m_Pitch, pSrc->GetScanline(row), m_Pitch);
return true;
}
@@ -130,20 +130,19 @@ void CFX_DIBitmap::Clear(uint32_t color) {
}
switch (GetFormat()) {
case FXDIB_1bppMask:
- FXSYS_memset(m_pBuffer, (color & 0xff000000) ? 0xff : 0,
- m_Pitch * m_Height);
+ memset(m_pBuffer, (color & 0xff000000) ? 0xff : 0, m_Pitch * m_Height);
break;
case FXDIB_1bppRgb: {
int index = FindPalette(color);
- FXSYS_memset(m_pBuffer, index ? 0xff : 0, m_Pitch * m_Height);
+ memset(m_pBuffer, index ? 0xff : 0, m_Pitch * m_Height);
break;
}
case FXDIB_8bppMask:
- FXSYS_memset(m_pBuffer, color >> 24, m_Pitch * m_Height);
+ memset(m_pBuffer, color >> 24, m_Pitch * m_Height);
break;
case FXDIB_8bppRgb: {
int index = FindPalette(color);
- FXSYS_memset(m_pBuffer, index, m_Pitch * m_Height);
+ memset(m_pBuffer, index, m_Pitch * m_Height);
break;
}
case FXDIB_Rgb:
@@ -151,7 +150,7 @@ void CFX_DIBitmap::Clear(uint32_t color) {
int a, r, g, b;
ArgbDecode(color, a, r, g, b);
if (r == g && g == b) {
- FXSYS_memset(m_pBuffer, r, m_Pitch * m_Height);
+ memset(m_pBuffer, r, m_Pitch * m_Height);
} else {
int byte_pos = 0;
for (int col = 0; col < m_Width; col++) {
@@ -160,7 +159,7 @@ void CFX_DIBitmap::Clear(uint32_t color) {
m_pBuffer[byte_pos++] = r;
}
for (int row = 1; row < m_Height; row++) {
- FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
+ memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
}
}
break;
@@ -177,7 +176,7 @@ void CFX_DIBitmap::Clear(uint32_t color) {
((uint32_t*)m_pBuffer)[i] = color;
}
for (int row = 1; row < m_Height; row++) {
- FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
+ memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
}
break;
}
@@ -227,7 +226,7 @@ bool CFX_DIBitmap::TransferBitmap(
m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
const uint8_t* src_scan =
pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
- FXSYS_memcpy(dest_scan, src_scan, width * Bpp);
+ memcpy(dest_scan, src_scan, width * Bpp);
}
}
} else {
@@ -336,10 +335,10 @@ bool CFX_DIBitmap::TransferMask(int dest_left,
for (int col = 0; col < width; col++) {
int src_bitpos = src_left + col;
if (src_scan[src_bitpos / 8] & (1 << (7 - src_bitpos % 8))) {
- FXSYS_memcpy(dest_color_pos, color_p, comps);
+ memcpy(dest_color_pos, color_p, comps);
*dest_alpha_pos = 0xff;
} else {
- FXSYS_memset(dest_color_pos, 0, comps);
+ memset(dest_color_pos, 0, comps);
*dest_alpha_pos = 0;
}
dest_color_pos += comps;
@@ -348,7 +347,7 @@ bool CFX_DIBitmap::TransferMask(int dest_left,
} else {
src_scan += src_left;
for (int col = 0; col < width; col++) {
- FXSYS_memcpy(dest_color_pos, color_p, comps);
+ memcpy(dest_color_pos, color_p, comps);
dest_color_pos += comps;
*dest_alpha_pos++ = (alpha * (*src_scan++) / 255);
}
@@ -505,12 +504,12 @@ bool CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel, int value) {
}
int Bpp = GetBPP() / 8;
if (Bpp == 1) {
- FXSYS_memset(m_pBuffer, value, m_Height * m_Pitch);
+ memset(m_pBuffer, value, m_Height * m_Pitch);
return true;
}
if (destChannel == FXDIB_Alpha && m_pAlphaMask) {
- FXSYS_memset(m_pAlphaMask->GetBuffer(), value,
- m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
+ memset(m_pAlphaMask->GetBuffer(), value,
+ m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
return true;
}
for (int row = 0; row < m_Height; row++) {
@@ -601,7 +600,7 @@ bool CFX_DIBitmap::GetGrayData(void* pIccTransform) {
if (!pMask->Create(m_Width, m_Height, FXDIB_8bppMask))
return false;
- FXSYS_memset(pMask->GetBuffer(), gray[0], pMask->GetPitch() * m_Height);
+ memset(pMask->GetBuffer(), gray[0], pMask->GetPitch() * m_Height);
for (int row = 0; row < m_Height; row++) {
uint8_t* src_pos = m_pBuffer + row * m_Pitch;
uint8_t* dest_pos = (uint8_t*)pMask->GetScanline(row);
@@ -1230,7 +1229,7 @@ bool CFX_DIBitmap::CompositeRect(int left,
for (int row = rect.top; row < rect.bottom; row++) {
uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left;
if (src_alpha == 255) {
- FXSYS_memset(dest_scan, gray, width);
+ memset(dest_scan, gray, width);
} else {
for (int col = 0; col < width; col++) {
*dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, gray, src_alpha);
@@ -1262,7 +1261,7 @@ bool CFX_DIBitmap::CompositeRect(int left,
uint8_t left_flag = *dest_scan_top & (255 << (8 - left_shift));
uint8_t right_flag = *dest_scan_top_r & (255 >> right_shift);
if (new_width) {
- FXSYS_memset(dest_scan_top + 1, index ? 255 : 0, new_width - 1);
+ memset(dest_scan_top + 1, index ? 255 : 0, new_width - 1);
if (!index) {
*dest_scan_top &= left_flag;
*dest_scan_top_r &= right_flag;
@@ -1310,7 +1309,7 @@ bool CFX_DIBitmap::CompositeRect(int left,
m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(row) + rect.left
: nullptr;
if (dest_scan_alpha) {
- FXSYS_memset(dest_scan_alpha, 0xff, width);
+ memset(dest_scan_alpha, 0xff, width);
}
if (Bpp == 4) {
uint32_t* scan = (uint32_t*)dest_scan;
@@ -1357,7 +1356,7 @@ bool CFX_DIBitmap::CompositeRect(int left,
uint8_t back_alpha = *dest_scan_alpha;
if (back_alpha == 0) {
*dest_scan_alpha++ = src_alpha;
- FXSYS_memcpy(dest_scan, color_p, Bpp);
+ memcpy(dest_scan, color_p, Bpp);
dest_scan += Bpp;
continue;
}
@@ -1417,7 +1416,7 @@ bool CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format) {
}
CFX_RetainPtr<CFX_DIBitmap> pAlphaMask;
if (dest_format == FXDIB_Argb) {
- FXSYS_memset(dest_buf, 0xff, dest_pitch * m_Height + 4);
+ memset(dest_buf, 0xff, dest_pitch * m_Height + 4);
if (m_pAlphaMask) {
for (int row = 0; row < m_Height; row++) {
uint8_t* pDstScanline = dest_buf + row * dest_pitch + 3;
diff --git a/core/fxge/dib/cfx_dibsource.cpp b/core/fxge/dib/cfx_dibsource.cpp
index 4b76b02ee7..1a11632759 100644
--- a/core/fxge/dib/cfx_dibsource.cpp
+++ b/core/fxge/dib/cfx_dibsource.cpp
@@ -63,7 +63,7 @@ CFX_RetainPtr<CFX_DIBitmap> CFX_DIBSource::Clone(const FX_RECT* pClip) const {
for (int row = rect.top; row < rect.bottom; row++) {
const uint8_t* src_scan = GetScanline(row) + rect.left * m_bpp / 8;
uint8_t* dest_scan = (uint8_t*)pNewBitmap->GetScanline(row - rect.top);
- FXSYS_memcpy(dest_scan, src_scan, copy_len);
+ memcpy(dest_scan, src_scan, copy_len);
}
}
return pNewBitmap;
@@ -103,8 +103,8 @@ bool CFX_DIBSource::BuildAlphaMask() {
m_pAlphaMask = nullptr;
return false;
}
- FXSYS_memset(m_pAlphaMask->GetBuffer(), 0xff,
- m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
+ memset(m_pAlphaMask->GetBuffer(), 0xff,
+ m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
return true;
}
@@ -203,7 +203,7 @@ void CFX_DIBSource::SetPalette(const uint32_t* pSrc) {
if (!m_pPalette)
m_pPalette.reset(FX_Alloc(uint32_t, pal_size));
pal_size = std::min(pal_size, kPaletteSize);
- FXSYS_memcpy(m_pPalette.get(), pSrc, pal_size * sizeof(uint32_t));
+ memcpy(m_pPalette.get(), pSrc, pal_size * sizeof(uint32_t));
}
void CFX_DIBSource::GetPalette(uint32_t* pal, int alpha) const {
@@ -272,9 +272,9 @@ bool CFX_DIBSource::SetAlphaMask(const CFX_RetainPtr<CFX_DIBSource>& pAlphaMask,
return false;
}
for (int row = 0; row < m_Height; row++) {
- FXSYS_memcpy(const_cast<uint8_t*>(m_pAlphaMask->GetScanline(row)),
- pAlphaMask->GetScanline(row + rect.top) + rect.left,
- m_pAlphaMask->m_Pitch);
+ memcpy(const_cast<uint8_t*>(m_pAlphaMask->GetScanline(row)),
+ pAlphaMask->GetScanline(row + rect.top) + rect.left,
+ m_pAlphaMask->m_Pitch);
}
return true;
}
@@ -293,11 +293,11 @@ CFX_RetainPtr<CFX_DIBitmap> CFX_DIBSource::FlipImage(bool bXFlip,
uint8_t* dest_scan =
pDestBuffer + m_Pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
- FXSYS_memcpy(dest_scan, src_scan, m_Pitch);
+ memcpy(dest_scan, src_scan, m_Pitch);
continue;
}
if (m_bpp == 1) {
- FXSYS_memset(dest_scan, 0, m_Pitch);
+ memset(dest_scan, 0, m_Pitch);
for (int col = 0; col < m_Width; col++)
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
int dest_col = m_Width - col - 1;
@@ -337,7 +337,7 @@ CFX_RetainPtr<CFX_DIBitmap> CFX_DIBSource::FlipImage(bool bXFlip,
uint8_t* dest_scan =
pDestBuffer + dest_pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
- FXSYS_memcpy(dest_scan, src_scan, dest_pitch);
+ memcpy(dest_scan, src_scan, dest_pitch);
continue;
}
dest_scan += (m_Width - 1);
@@ -418,7 +418,7 @@ CFX_RetainPtr<CFX_DIBitmap> CFX_DIBSource::SwapXY(
int col_start = bYFlip ? m_Width - dest_clip.bottom : dest_clip.top;
int col_end = bYFlip ? m_Width - dest_clip.top : dest_clip.bottom;
if (GetBPP() == 1) {
- FXSYS_memset(dest_buf, 0xff, dest_pitch * result_height);
+ memset(dest_buf, 0xff, dest_pitch * result_height);
for (int row = row_start; row < row_end; row++) {
const uint8_t* src_scan = GetScanline(row);
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) -
diff --git a/core/fxge/dib/cfx_scanlinecompositor.cpp b/core/fxge/dib/cfx_scanlinecompositor.cpp
index 1e2a282c1f..ff7dd06c3e 100644
--- a/core/fxge/dib/cfx_scanlinecompositor.cpp
+++ b/core/fxge/dib/cfx_scanlinecompositor.cpp
@@ -198,7 +198,7 @@ void CompositeRow_Rgb2Mask(uint8_t* dest_scan,
int width,
const uint8_t* clip_scan) {
if (!clip_scan) {
- FXSYS_memset(dest_scan, 0xff, width);
+ memset(dest_scan, 0xff, width);
return;
}
for (int i = 0; i < width; ++i) {
@@ -872,7 +872,7 @@ void CompositeRow_Rgb2Rgb_NoBlend_NoClip(uint8_t* dest_scan,
int dest_Bpp,
int src_Bpp) {
if (dest_Bpp == src_Bpp) {
- FXSYS_memcpy(dest_scan, src_scan, width * dest_Bpp);
+ memcpy(dest_scan, src_scan, width * dest_Bpp);
return;
}
for (int col = 0; col < width; col++) {
@@ -3386,7 +3386,7 @@ void ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format,
int palsize = 1 << (src_format & 0xff);
pDestPalette = FX_Alloc(uint32_t, palsize);
if (isDstCmyk == isSrcCmyk) {
- FXSYS_memcpy(pDestPalette, pSrcPalette, palsize * sizeof(uint32_t));
+ memcpy(pDestPalette, pSrcPalette, palsize * sizeof(uint32_t));
} else {
for (int i = 0; i < palsize; i++) {
FX_CMYK cmyk = pSrcPalette[i];
diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp
index d3cff24326..17eae7e3af 100644
--- a/core/fxge/dib/fx_dib_convert.cpp
+++ b/core/fxge/dib/fx_dib_convert.cpp
@@ -155,7 +155,7 @@ bool ConvertBuffer_1bppMask2Gray(uint8_t* dest_buf,
reset_gray = 0x00;
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset(dest_scan, reset_gray, width);
+ memset(dest_scan, reset_gray, width);
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
@@ -177,7 +177,7 @@ bool ConvertBuffer_8bppMask2Gray(uint8_t* dest_buf,
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
- FXSYS_memcpy(dest_scan, src_scan, width);
+ memcpy(dest_scan, src_scan, width);
}
return true;
}
@@ -217,7 +217,7 @@ bool ConvertBuffer_1bppPlt2Gray(uint8_t* dest_buf,
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset(dest_scan, gray[0], width);
+ memset(dest_scan, gray[0], width);
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
@@ -313,7 +313,7 @@ void ConvertBuffer_IndexCopy(uint8_t* dest_buf,
if (pSrcBitmap->GetBPP() == 1) {
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset(dest_scan, 0, width);
+ memset(dest_scan, 0, width);
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
@@ -327,7 +327,7 @@ void ConvertBuffer_IndexCopy(uint8_t* dest_buf,
uint8_t* dest_scan = dest_buf + row * dest_pitch;
const uint8_t* src_scan =
pSrcBitmap->GetScanline(src_top + row) + src_left;
- FXSYS_memcpy(dest_scan, src_scan, width);
+ memcpy(dest_scan, src_scan, width);
}
}
}
@@ -355,7 +355,7 @@ bool ConvertBuffer_Plt2PltRgb8(uint8_t* dest_buf,
dst_plt[i] = FXARGB_MAKE(0xff, r, g, b);
}
} else {
- FXSYS_memcpy(dst_plt, src_plt, plt_size * 4);
+ memcpy(dst_plt, src_plt, plt_size * 4);
}
return true;
}
@@ -418,7 +418,7 @@ bool ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf,
}
}
}
- FXSYS_memcpy(dst_plt, pPalette, sizeof(uint32_t) * 256);
+ memcpy(dst_plt, pPalette, sizeof(uint32_t) * 256);
return true;
}
@@ -587,7 +587,7 @@ bool ConvertBuffer_24bppRgb2Rgb24(
uint8_t* dest_scan = dest_buf + row * dest_pitch;
const uint8_t* src_scan =
pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
- FXSYS_memcpy(dest_scan, src_scan, width * 3);
+ memcpy(dest_scan, src_scan, width * 3);
}
return true;
}
diff --git a/core/fxge/dib/fx_dib_engine.cpp b/core/fxge/dib/fx_dib_engine.cpp
index 9a5a7c1351..a232142681 100644
--- a/core/fxge/dib/fx_dib_engine.cpp
+++ b/core/fxge/dib/fx_dib_engine.cpp
@@ -274,7 +274,7 @@ CStretchEngine::CStretchEngine(IFX_ScanlineComposer* pDestBitmap,
return;
}
if (dest_format == FXDIB_Rgb32) {
- FXSYS_memset(m_pDestScanline, 255, size);
+ memset(m_pDestScanline, 255, size);
}
m_InterPitch = (m_DestClip.Width() * m_DestBpp + 31) / 32 * 4;
m_ExtraMaskPitch = (m_DestClip.Width() * 8 + 31) / 32 * 4;
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp
index 0e9e40135a..69be8a1535 100644
--- a/core/fxge/ge/cfx_facecache.cpp
+++ b/core/fxge/ge/cfx_facecache.cpp
@@ -57,8 +57,8 @@ void ContrastAdjust(uint8_t* pDataIn,
if (temp == 0 || temp == 255) {
int rowbytes = std::min(abs(nSrcRowBytes), nDstRowBytes);
for (row = 0; row < nHeight; row++) {
- FXSYS_memcpy(pDataOut + row * nDstRowBytes, pDataIn + row * nSrcRowBytes,
- rowbytes);
+ memcpy(pDataOut + row * nDstRowBytes, pDataIn + row * nSrcRowBytes,
+ rowbytes);
}
return;
}
@@ -206,14 +206,14 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(const CFX_Font* pFont,
}
}
} else {
- FXSYS_memset(pDestBuf, 0, dest_pitch * bmheight);
+ memset(pDestBuf, 0, dest_pitch * bmheight);
if (anti_alias == FXFT_RENDER_MODE_MONO &&
FXFT_Get_Bitmap_PixelMode(FXFT_Get_Glyph_Bitmap(m_Face)) ==
FXFT_PIXEL_MODE_MONO) {
int rowbytes = abs(src_pitch) > dest_pitch ? dest_pitch : abs(src_pitch);
for (int row = 0; row < bmheight; row++) {
- FXSYS_memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch,
- rowbytes);
+ memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch,
+ rowbytes);
}
} else {
ContrastAdjust(pSrcBuf, pDestBuf, bmwidth, bmheight, src_pitch,
diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp
index e04e581434..9b2e1aa583 100644
--- a/core/fxge/ge/cfx_fontmapper.cpp
+++ b/core/fxge/ge/cfx_fontmapper.cpp
@@ -280,7 +280,7 @@ CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr)
: m_bListLoaded(false), m_pFontMgr(mgr) {
m_MMFaces[0] = nullptr;
m_MMFaces[1] = nullptr;
- FXSYS_memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces));
+ memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces));
}
CFX_FontMapper::~CFX_FontMapper() {
diff --git a/core/fxge/ge/cfx_graphstatedata.cpp b/core/fxge/ge/cfx_graphstatedata.cpp
index 8c5508f2f2..82fede176a 100644
--- a/core/fxge/ge/cfx_graphstatedata.cpp
+++ b/core/fxge/ge/cfx_graphstatedata.cpp
@@ -34,7 +34,7 @@ void CFX_GraphStateData::Copy(const CFX_GraphStateData& src) {
m_LineWidth = src.m_LineWidth;
if (m_DashCount) {
m_DashArray = FX_Alloc(float, m_DashCount);
- FXSYS_memcpy(m_DashArray, src.m_DashArray, m_DashCount * sizeof(float));
+ memcpy(m_DashArray, src.m_DashArray, m_DashCount * sizeof(float));
}
}
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 1dc8ab2c7b..81ca95fbe8 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -1753,11 +1753,11 @@ bool CFX_SkiaDeviceDriver::DrawShading(const CPDF_ShadingPattern* pPattern,
SkPoint tempCubics[4];
for (int i = 0; i < (int)SK_ARRAY_COUNT(tempCubics); i++)
tempCubics[i] = cubics[(flag * 3 + i) % 12];
- FXSYS_memcpy(cubics, tempCubics, sizeof(tempCubics));
+ memcpy(cubics, tempCubics, sizeof(tempCubics));
SkColor tempColors[2];
tempColors[0] = colors[flag];
tempColors[1] = colors[(flag + 1) % 4];
- FXSYS_memcpy(colors, tempColors, sizeof(tempColors));
+ memcpy(colors, tempColors, sizeof(tempColors));
}
for (int i = iStartPoint; i < (int)SK_ARRAY_COUNT(cubics); i++) {
CFX_PointF point = stream.ReadCoords();
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index 40c643ea14..46af33710c 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -260,8 +260,8 @@ void CFX_PSRenderer::SetGraphState(const CFX_GraphStateData* pGraphState) {
}
if (!m_bGraphStateSet ||
m_CurGraphState.m_DashCount != pGraphState->m_DashCount ||
- FXSYS_memcmp(m_CurGraphState.m_DashArray, pGraphState->m_DashArray,
- sizeof(float) * m_CurGraphState.m_DashCount)) {
+ memcmp(m_CurGraphState.m_DashArray, pGraphState->m_DashArray,
+ sizeof(float) * m_CurGraphState.m_DashCount)) {
buf << "[";
for (int i = 0; i < pGraphState->m_DashCount; ++i) {
buf << pGraphState->m_DashArray[i] << " ";
@@ -392,7 +392,7 @@ bool CFX_PSRenderer::DrawDIBits(const CFX_RetainPtr<CFX_DIBSource>& pSource,
uint8_t* src_buf = FX_Alloc(uint8_t, src_size);
for (int row = 0; row < height; row++) {
const uint8_t* src_scan = pSource->GetScanline(row);
- FXSYS_memcpy(src_buf + row * pitch, src_scan, pitch);
+ memcpy(src_buf + row * pitch, src_scan, pitch);
}
std::unique_ptr<uint8_t, FxFreeDeleter> output_buf;
uint32_t output_size;
@@ -471,7 +471,7 @@ bool CFX_PSRenderer::DrawDIBits(const CFX_RetainPtr<CFX_DIBSource>& pSource,
src_scan += 3;
}
} else {
- FXSYS_memcpy(dest_scan, src_scan, src_pitch);
+ memcpy(dest_scan, src_scan, src_pitch);
}
}
uint8_t* compressed_buf;
diff --git a/core/fxge/win32/cpsoutput.cpp b/core/fxge/win32/cpsoutput.cpp
index 24df15226b..7a8434ec33 100644
--- a/core/fxge/win32/cpsoutput.cpp
+++ b/core/fxge/win32/cpsoutput.cpp
@@ -29,7 +29,7 @@ void CPSOutput::OutputPS(const char* str, int len) {
char buffer[1026];
int send_len = std::min(len, 1024);
*(reinterpret_cast<uint16_t*>(buffer)) = send_len;
- FXSYS_memcpy(buffer + 2, str + sent_len, send_len);
+ memcpy(buffer + 2, str + sent_len, send_len);
// TODO(thestig/rbpotter): Do PASSTHROUGH for non-Chromium usage.
// ExtEscape(m_hDC, PASSTHROUGH, send_len + 2, buffer, 0, nullptr);
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index de17c0d0b5..a27ac6fbd2 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -446,7 +446,7 @@ void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf,
bool CFX_Win32FontInfo::EnumFontList(CFX_FontMapper* pMapper) {
m_pMapper = pMapper;
LOGFONTA lf;
- FXSYS_memset(&lf, 0, sizeof(LOGFONTA));
+ memset(&lf, 0, sizeof(LOGFONTA));
lf.lfCharSet = FXFONT_DEFAULT_CHARSET;
lf.lfFaceName[0] = 0;
lf.lfPitchAndFamily = 0;
@@ -879,7 +879,7 @@ bool CGdiDeviceDriver::GDI_StretchBitMask(
BITMAPINFOHEADER bmiHeader;
uint32_t bmiColors[2];
} bmi;
- FXSYS_memset(&bmi.bmiHeader, 0, sizeof(BITMAPINFOHEADER));
+ memset(&bmi.bmiHeader, 0, sizeof(BITMAPINFOHEADER));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biBitCount = 1;
bmi.bmiHeader.biCompression = BI_RGB;
@@ -1180,7 +1180,7 @@ bool CGdiDisplayDriver::GetDIBits(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
BitBlt(hDCMemory, 0, 0, width, height, m_hDC, left, top, SRCCOPY);
SelectObject(hDCMemory, holdbmp);
BITMAPINFO bmi;
- FXSYS_memset(&bmi, 0, sizeof bmi);
+ memset(&bmi, 0, sizeof bmi);
bmi.bmiHeader.biSize = sizeof bmi.bmiHeader;
bmi.bmiHeader.biBitCount = pBitmap->GetBPP();
bmi.bmiHeader.biHeight = -height;
diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp
index 9815457bbd..f2c47265f7 100644
--- a/core/fxge/win32/fx_win32_dib.cpp
+++ b/core/fxge/win32/fx_win32_dib.cpp
@@ -19,7 +19,7 @@ CFX_ByteString CFX_WindowsDIB::GetBitmapInfo(
len += sizeof(DWORD) * (int)(1 << pBitmap->GetBPP());
}
BITMAPINFOHEADER* pbmih = (BITMAPINFOHEADER*)result.GetBuffer(len);
- FXSYS_memset(pbmih, 0, sizeof(BITMAPINFOHEADER));
+ memset(pbmih, 0, sizeof(BITMAPINFOHEADER));
pbmih->biSize = sizeof(BITMAPINFOHEADER);
pbmih->biBitCount = pBitmap->GetBPP();
pbmih->biCompression = BI_RGB;
@@ -70,15 +70,15 @@ CFX_RetainPtr<CFX_DIBitmap> _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi,
if (!pBitmap->Create(width, height, format))
return nullptr;
- FXSYS_memcpy(pBitmap->GetBuffer(), pData, pitch * height);
+ memcpy(pBitmap->GetBuffer(), pData, pitch * height);
if (bBottomUp) {
uint8_t* temp_buf = FX_Alloc(uint8_t, pitch);
int top = 0, bottom = height - 1;
while (top < bottom) {
- FXSYS_memcpy(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
- FXSYS_memcpy(pBitmap->GetBuffer() + top * pitch,
- pBitmap->GetBuffer() + bottom * pitch, pitch);
- FXSYS_memcpy(pBitmap->GetBuffer() + bottom * pitch, temp_buf, pitch);
+ memcpy(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
+ memcpy(pBitmap->GetBuffer() + top * pitch,
+ pBitmap->GetBuffer() + bottom * pitch, pitch);
+ memcpy(pBitmap->GetBuffer() + bottom * pitch, temp_buf, pitch);
top++;
bottom--;
}
@@ -189,7 +189,7 @@ CFX_RetainPtr<CFX_DIBitmap> CFX_WindowsDIB::LoadDIBitmap(
CFX_WindowsDIB::CFX_WindowsDIB(HDC hDC, int width, int height) {
Create(width, height, FXDIB_Rgb, (uint8_t*)1);
BITMAPINFOHEADER bmih;
- FXSYS_memset(&bmih, 0, sizeof bmih);
+ memset(&bmih, 0, sizeof bmih);
bmih.biSize = sizeof bmih;
bmih.biBitCount = 24;
bmih.biHeight = -height;
diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp
index 41f9ba55ad..6a3527f393 100644
--- a/core/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/fxge/win32/fx_win32_gdipext.cpp
@@ -1297,7 +1297,7 @@ class GpStream final : public IStream {
}
bytes_left = m_InterStream.GetLength() - m_ReadPos;
bytes_out = std::min(pdfium::base::checked_cast<size_t>(cb), bytes_left);
- FXSYS_memcpy(Output, m_InterStream.GetBuffer() + m_ReadPos, bytes_out);
+ memcpy(Output, m_InterStream.GetBuffer() + m_ReadPos, bytes_out);
m_ReadPos += (int32_t)bytes_out;
if (pcbRead) {
*pcbRead = (ULONG)bytes_out;
@@ -1508,11 +1508,11 @@ CFX_RetainPtr<CFX_DIBitmap> CGdiplusExt::LoadDIBitmap(WINDIB_Open_Args_ args) {
int dest_pitch = (width * pInfo->pbmi->bmiHeader.biBitCount + 31) / 32 * 4;
LPBYTE pData = FX_Alloc2D(BYTE, dest_pitch, height);
if (dest_pitch == pInfo->Stride) {
- FXSYS_memcpy(pData, pInfo->pScan0, dest_pitch * height);
+ memcpy(pData, pInfo->pScan0, dest_pitch * height);
} else {
for (int i = 0; i < height; i++) {
- FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i,
- dest_pitch);
+ memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i,
+ dest_pitch);
}
}
CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = _FX_WindowsDIB_LoadFromBuf(