summaryrefslogtreecommitdiff
path: root/core/fxge/dib
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/dib
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/dib')
-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
7 files changed, 48 insertions, 49 deletions
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;