diff options
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r-- | core/fpdfapi/page/cpdf_color.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_contentparser.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_image.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_meshstream.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_streamcontentparser.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_streamparser.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/page/fpdf_page_colors.cpp | 3 | ||||
-rw-r--r-- | core/fpdfapi/page/fpdf_page_func.cpp | 4 |
8 files changed, 16 insertions, 17 deletions
diff --git a/core/fpdfapi/page/cpdf_color.cpp b/core/fpdfapi/page/cpdf_color.cpp index 46771513f4..f0e433c243 100644 --- a/core/fpdfapi/page/cpdf_color.cpp +++ b/core/fpdfapi/page/cpdf_color.cpp @@ -71,7 +71,7 @@ void CPDF_Color::SetValue(float* comps) { if (!m_pBuffer) return; if (m_pCS->GetFamily() != PDFCS_PATTERN) - FXSYS_memcpy(m_pBuffer, comps, m_pCS->CountComponents() * sizeof(float)); + memcpy(m_pBuffer, comps, m_pCS->CountComponents() * sizeof(float)); } void CPDF_Color::SetValue(CPDF_Pattern* pPattern, float* comps, int ncomps) { @@ -94,7 +94,7 @@ void CPDF_Color::SetValue(CPDF_Pattern* pPattern, float* comps, int ncomps) { pvalue->m_nComps = ncomps; pvalue->m_pPattern = pPattern; if (ncomps) - FXSYS_memcpy(pvalue->m_Comps, comps, ncomps * sizeof(float)); + memcpy(pvalue->m_Comps, comps, ncomps * sizeof(float)); pvalue->m_pCountedPattern = nullptr; if (pPattern && pPattern->document()) { @@ -120,7 +120,7 @@ void CPDF_Color::Copy(const CPDF_Color* pSrc) { return; m_pBuffer = m_pCS->CreateBuf(); - FXSYS_memcpy(m_pBuffer, pSrc->m_pBuffer, m_pCS->GetBufSize()); + memcpy(m_pBuffer, pSrc->m_pBuffer, m_pCS->GetBufSize()); if (m_pCS->GetFamily() != PDFCS_PATTERN) return; diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp index 7ceb509348..46e2c52c75 100644 --- a/core/fpdfapi/page/cpdf_contentparser.cpp +++ b/core/fpdfapi/page/cpdf_contentparser.cpp @@ -142,7 +142,7 @@ void CPDF_ContentParser::Continue(IFX_Pause* pPause) { m_pData = FX_Alloc(uint8_t, m_Size); uint32_t pos = 0; for (const auto& stream : m_StreamArray) { - FXSYS_memcpy(m_pData + pos, stream->GetData(), stream->GetSize()); + memcpy(m_pData + pos, stream->GetData(), stream->GetSize()); pos += stream->GetSize(); m_pData[pos++] = ' '; } diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp index 4fc1c344ef..da49fab8b1 100644 --- a/core/fpdfapi/page/cpdf_image.cpp +++ b/core/fpdfapi/page/cpdf_image.cpp @@ -269,8 +269,8 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) { mask_buf.reset(FX_Alloc2D(uint8_t, maskHeight, maskWidth)); mask_size = maskHeight * maskWidth; // Safe since checked alloc returned. for (int32_t a = 0; a < maskHeight; a++) { - FXSYS_memcpy(mask_buf.get() + a * maskWidth, - pMaskBitmap->GetScanline(a), maskWidth); + memcpy(mask_buf.get() + a * maskWidth, pMaskBitmap->GetScanline(a), + maskWidth); } } pMaskDict->SetNewFor<CPDF_Number>("Length", mask_size); @@ -288,7 +288,7 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) { uint8_t* pDest = dest_buf; if (bCopyWithoutAlpha) { for (int32_t i = 0; i < BitmapHeight; i++) { - FXSYS_memcpy(pDest, src_buf, dest_pitch); + memcpy(pDest, src_buf, dest_pitch); pDest += dest_pitch; src_buf += src_pitch; } diff --git a/core/fpdfapi/page/cpdf_meshstream.cpp b/core/fpdfapi/page/cpdf_meshstream.cpp index c0074f84cc..b0a21c627a 100644 --- a/core/fpdfapi/page/cpdf_meshstream.cpp +++ b/core/fpdfapi/page/cpdf_meshstream.cpp @@ -210,7 +210,7 @@ std::tuple<float, float, float> CPDF_MeshStream::ReadColor() { } float result[kMaxComponents]; - FXSYS_memset(result, 0, sizeof(result)); + memset(result, 0, sizeof(result)); int nResults; for (const auto& func : m_funcs) { if (func && func->CountOutputs() <= kMaxComponents) diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 59de3c50cb..30686133c2 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp +++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp @@ -326,11 +326,11 @@ void CPDF_StreamContentParser::AddNameParam(const CFX_ByteStringC& bsName) { } else { param.m_Type = ContentParam::NAME; if (bsName.Find('#') == -1) { - FXSYS_memcpy(param.m_Name.m_Buffer, bsName.raw_str(), bsName.GetLength()); + memcpy(param.m_Name.m_Buffer, bsName.raw_str(), bsName.GetLength()); param.m_Name.m_Len = bsName.GetLength(); } else { CFX_ByteString str = PDF_NameDecode(bsName); - FXSYS_memcpy(param.m_Name.m_Buffer, str.c_str(), str.GetLength()); + memcpy(param.m_Name.m_Buffer, str.c_str(), str.GetLength()); param.m_Name.m_Len = str.GetLength(); } } diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp index f3a04fb117..3c4e534116 100644 --- a/core/fpdfapi/page/cpdf_streamparser.cpp +++ b/core/fpdfapi/page/cpdf_streamparser.cpp @@ -53,7 +53,7 @@ uint32_t DecodeAllScanlines(std::unique_ptr<CCodec_ScanlineDecoder> pDecoder, if (!pLine) break; - FXSYS_memcpy(dest_buf + row * pitch, pLine, pitch); + memcpy(dest_buf + row * pitch, pLine, pitch); } return pDecoder->GetSrcOffset(); } @@ -184,7 +184,7 @@ std::unique_ptr<CPDF_Stream> CPDF_StreamParser::ReadInlineStream( if (OrigSize > m_Size - m_Pos) OrigSize = m_Size - m_Pos; pData.reset(FX_Alloc(uint8_t, OrigSize)); - FXSYS_memcpy(pData.get(), m_pBuf + m_Pos, OrigSize); + memcpy(pData.get(), m_pBuf + m_Pos, OrigSize); dwStreamSize = OrigSize; m_Pos += OrigSize; } else { @@ -217,7 +217,7 @@ std::unique_ptr<CPDF_Stream> CPDF_StreamParser::ReadInlineStream( } m_Pos = dwSavePos; pData.reset(FX_Alloc(uint8_t, dwStreamSize)); - FXSYS_memcpy(pData.get(), m_pBuf + m_Pos, dwStreamSize); + memcpy(pData.get(), m_pBuf + m_Pos, dwStreamSize); m_Pos += dwStreamSize; } pDict->SetNewFor<CPDF_Number>("Length", (int)dwStreamSize); diff --git a/core/fpdfapi/page/fpdf_page_colors.cpp b/core/fpdfapi/page/fpdf_page_colors.cpp index adee5ff84b..ffb8da3a10 100644 --- a/core/fpdfapi/page/fpdf_page_colors.cpp +++ b/core/fpdfapi/page/fpdf_page_colors.cpp @@ -27,8 +27,7 @@ float NormalizeChannel(float fVal) { } bool DetectSRGB(const uint8_t* pData, uint32_t dwSize) { - return dwSize == 3144 && - FXSYS_memcmp(pData + 0x190, "sRGB IEC61966-2.1", 17) == 0; + return dwSize == 3144 && memcmp(pData + 0x190, "sRGB IEC61966-2.1", 17) == 0; } } // namespace diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp index 8ea4194eaa..9be1edb7ff 100644 --- a/core/fpdfapi/page/fpdf_page_func.cpp +++ b/core/fpdfapi/page/fpdf_page_func.cpp @@ -801,8 +801,8 @@ bool CPDF_Function::Init(CPDF_Object* pObj) { if (m_pRanges && m_nOutputs > old_outputs) { m_pRanges = FX_Realloc(float, m_pRanges, m_nOutputs * 2); if (m_pRanges) { - FXSYS_memset(m_pRanges + (old_outputs * 2), 0, - sizeof(float) * (m_nOutputs - old_outputs) * 2); + memset(m_pRanges + (old_outputs * 2), 0, + sizeof(float) * (m_nOutputs - old_outputs) * 2); } } return true; |