summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_render
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-03-25 15:18:35 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 15:18:36 -0700
commitb5e8f14e3eefc5da995b332788d3203cee204883 (patch)
tree34fc80504d2034013b18f30df1b0f6f1a94e2d70 /core/fpdfapi/fpdf_render
parent6d18bd3b8ec82ae3c24a439f5c7925786a0e2d8b (diff)
downloadpdfium-b5e8f14e3eefc5da995b332788d3203cee204883.tar.xz
Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692
Review URL: https://codereview.chromium.org/1832173003
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r--core/fpdfapi/fpdf_render/cpdf_pagerendercache.h16
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render.cpp14
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_cache.cpp32
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_image.cpp16
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp108
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp20
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_text.cpp46
-rw-r--r--core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h2
-rw-r--r--core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h4
-rw-r--r--core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h6
-rw-r--r--core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h6
-rw-r--r--core/fpdfapi/fpdf_render/render_int.h66
12 files changed, 168 insertions, 168 deletions
diff --git a/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h b/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h
index 578700c30d..4e47e019b4 100644
--- a/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h
+++ b/core/fpdfapi/fpdf_render/cpdf_pagerendercache.h
@@ -30,17 +30,17 @@ class CPDF_PageRenderCache {
~CPDF_PageRenderCache();
void ClearImageData();
- FX_DWORD EstimateSize();
+ uint32_t EstimateSize();
void CacheOptimization(int32_t dwLimitCacheSize);
- FX_DWORD GetTimeCount() const { return m_nTimeCount; }
- void SetTimeCount(FX_DWORD dwTimeCount) { m_nTimeCount = dwTimeCount; }
+ uint32_t GetTimeCount() const { return m_nTimeCount; }
+ void SetTimeCount(uint32_t dwTimeCount) { m_nTimeCount = dwTimeCount; }
void GetCachedBitmap(CPDF_Stream* pStream,
CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask,
- FX_DWORD& MatteColor,
+ uint32_t& MatteColor,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE,
CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0,
@@ -55,7 +55,7 @@ class CPDF_PageRenderCache {
FX_BOOL StartGetCachedBitmap(CPDF_Stream* pStream,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE,
CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0,
@@ -69,8 +69,8 @@ class CPDF_PageRenderCache {
CPDF_Page* const m_pPage;
CPDF_ImageCacheEntry* m_pCurImageCacheEntry;
std::map<CPDF_Stream*, CPDF_ImageCacheEntry*> m_ImageCache;
- FX_DWORD m_nTimeCount;
- FX_DWORD m_nCacheSize;
+ uint32_t m_nTimeCount;
+ uint32_t m_nCacheSize;
FX_BOOL m_bCurFindCache;
};
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index 24ca282322..216613cc61 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -208,7 +208,7 @@ FX_BOOL CPDF_RenderStatus::Initialize(CPDF_RenderContext* pContext,
FX_BOOL bStdCS,
CPDF_Type3Char* pType3Char,
FX_ARGB fill_color,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask) {
m_pContext = pContext;
m_pDevice = pDevice;
@@ -508,11 +508,11 @@ FX_BOOL CPDF_RenderStatus::ProcessPath(const CPDF_PathObject* pPathObj,
if (FillType == 0 && !bStroke) {
return TRUE;
}
- FX_DWORD fill_argb = 0;
+ uint32_t fill_argb = 0;
if (FillType) {
fill_argb = GetFillArgb(pPathObj);
}
- FX_DWORD stroke_argb = 0;
+ uint32_t stroke_argb = 0;
if (bStroke) {
stroke_argb = GetStrokeArgb(pPathObj);
}
@@ -569,7 +569,7 @@ FX_ARGB CPDF_RenderStatus::GetFillArgb(const CPDF_PageObject* pObj,
m_InitialStates.m_ColorState;
}
FX_COLORREF rgb = pColorData->m_FillRGB;
- if (rgb == (FX_DWORD)-1) {
+ if (rgb == (uint32_t)-1) {
return 0;
}
const CPDF_GeneralStateData* pGeneralData = pObj->m_GeneralState;
@@ -603,7 +603,7 @@ FX_ARGB CPDF_RenderStatus::GetStrokeArgb(const CPDF_PageObject* pObj) const {
m_InitialStates.m_ColorState;
}
FX_COLORREF rgb = pColorData->m_StrokeRGB;
- if (rgb == (FX_DWORD)-1) {
+ if (rgb == (uint32_t)-1) {
return 0;
}
const CPDF_GeneralStateData* pGeneralData = pObj->m_GeneralState;
@@ -847,7 +847,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
pTextMask->Clear(0);
CFX_FxgeDevice text_device;
text_device.Attach(pTextMask.get());
- for (FX_DWORD i = 0; i < pPageObj->m_ClipPath.GetTextCount(); i++) {
+ for (uint32_t i = 0; i < pPageObj->m_ClipPath.GetTextCount(); i++) {
CPDF_TextObject* textobj = pPageObj->m_ClipPath.GetText(i);
if (!textobj) {
break;
@@ -1156,7 +1156,7 @@ CPDF_TransferFunc* CPDF_DocRenderData::GetTransferFunc(CPDF_Object* pObj) {
if (pArray->GetCount() < 3)
return nullptr;
- for (FX_DWORD i = 0; i < 3; ++i) {
+ for (uint32_t i = 0; i < 3; ++i) {
pFuncs[2 - i].reset(CPDF_Function::Load(pArray->GetElementValue(i)));
if (!pFuncs[2 - i])
return nullptr;
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_cache.cpp b/core/fpdfapi/fpdf_render/fpdf_render_cache.cpp
index 15c7dcffcc..f5bc584348 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_cache.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_cache.cpp
@@ -15,7 +15,7 @@
#include "core/include/fxge/fx_ge.h"
struct CACHEINFO {
- FX_DWORD time;
+ uint32_t time;
CPDF_Stream* pStream;
};
@@ -30,7 +30,7 @@ CPDF_PageRenderCache::~CPDF_PageRenderCache() {
delete it.second;
}
void CPDF_PageRenderCache::CacheOptimization(int32_t dwLimitCacheSize) {
- if (m_nCacheSize <= (FX_DWORD)dwLimitCacheSize)
+ if (m_nCacheSize <= (uint32_t)dwLimitCacheSize)
return;
size_t nCount = m_ImageCache.size();
@@ -41,10 +41,10 @@ void CPDF_PageRenderCache::CacheOptimization(int32_t dwLimitCacheSize) {
pCACHEINFO[i++].pStream = it.second->GetStream();
}
FXSYS_qsort(pCACHEINFO, nCount, sizeof(CACHEINFO), compare);
- FX_DWORD nTimeCount = m_nTimeCount;
+ uint32_t nTimeCount = m_nTimeCount;
// Check if time value is about to roll over and reset all entries.
- // The comparision is legal because FX_DWORD is an unsigned type.
+ // The comparision is legal because uint32_t is an unsigned type.
if (nTimeCount + 1 < nTimeCount) {
for (i = 0; i < nCount; i++)
m_ImageCache[pCACHEINFO[i].pStream]->m_dwTimeCount = i;
@@ -55,7 +55,7 @@ void CPDF_PageRenderCache::CacheOptimization(int32_t dwLimitCacheSize) {
while (i + 15 < nCount)
ClearImageCacheEntry(pCACHEINFO[i++].pStream);
- while (i < nCount && m_nCacheSize > (FX_DWORD)dwLimitCacheSize)
+ while (i < nCount && m_nCacheSize > (uint32_t)dwLimitCacheSize)
ClearImageCacheEntry(pCACHEINFO[i++].pStream);
FX_Free(pCACHEINFO);
@@ -69,8 +69,8 @@ void CPDF_PageRenderCache::ClearImageCacheEntry(CPDF_Stream* pStream) {
delete it->second;
m_ImageCache.erase(it);
}
-FX_DWORD CPDF_PageRenderCache::EstimateSize() {
- FX_DWORD dwSize = 0;
+uint32_t CPDF_PageRenderCache::EstimateSize() {
+ uint32_t dwSize = 0;
for (const auto& it : m_ImageCache)
dwSize += it.second->EstimateSize();
@@ -80,9 +80,9 @@ FX_DWORD CPDF_PageRenderCache::EstimateSize() {
void CPDF_PageRenderCache::GetCachedBitmap(CPDF_Stream* pStream,
CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask,
- FX_DWORD& MatteColor,
+ uint32_t& MatteColor,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask,
CPDF_RenderStatus* pRenderStatus,
int32_t downsampleWidth,
@@ -109,7 +109,7 @@ void CPDF_PageRenderCache::GetCachedBitmap(CPDF_Stream* pStream,
FX_BOOL CPDF_PageRenderCache::StartGetCachedBitmap(
CPDF_Stream* pStream,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask,
CPDF_RenderStatus* pRenderStatus,
int32_t downsampleWidth,
@@ -197,18 +197,18 @@ void CPDF_ImageCacheEntry::ClearImageData() {
((CPDF_DIBSource*)m_pCachedBitmap)->ClearImageData();
}
}
-static FX_DWORD FPDF_ImageCache_EstimateImageSize(const CFX_DIBSource* pDIB) {
+static uint32_t FPDF_ImageCache_EstimateImageSize(const CFX_DIBSource* pDIB) {
return pDIB && pDIB->GetBuffer()
- ? (FX_DWORD)pDIB->GetHeight() * pDIB->GetPitch() +
- (FX_DWORD)pDIB->GetPaletteSize() * 4
+ ? (uint32_t)pDIB->GetHeight() * pDIB->GetPitch() +
+ (uint32_t)pDIB->GetPaletteSize() * 4
: 0;
}
FX_BOOL CPDF_ImageCacheEntry::GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask,
- FX_DWORD& MatteColor,
+ uint32_t& MatteColor,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask,
CPDF_RenderStatus* pRenderStatus,
int32_t downsampleWidth,
@@ -264,7 +264,7 @@ CFX_DIBSource* CPDF_ImageCacheEntry::DetachMask() {
int CPDF_ImageCacheEntry::StartGetCachedBitmap(CPDF_Dictionary* pFormResources,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask,
CPDF_RenderStatus* pRenderStatus,
int32_t downsampleWidth,
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
index b28aee6980..ef452daa4e 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -57,7 +57,7 @@ void CPDF_RenderStatus::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
return;
}
} else {
- FX_DWORD fill_argb = m_Options.TranslateColor(mask_argb);
+ uint32_t fill_argb = m_Options.TranslateColor(mask_argb);
if (bitmap_alpha < 255) {
((uint8_t*)&fill_argb)[3] =
((uint8_t*)&fill_argb)[3] * bitmap_alpha / 255;
@@ -137,7 +137,7 @@ void CPDF_RenderStatus::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
std::unique_ptr<CFX_DIBitmap> pBackdrop1(new CFX_DIBitmap);
pBackdrop1->Create(pBackdrop->GetWidth(), pBackdrop->GetHeight(),
FXDIB_Rgb32);
- pBackdrop1->Clear((FX_DWORD)-1);
+ pBackdrop1->Clear((uint32_t)-1);
pBackdrop1->CompositeBitmap(0, 0, pBackdrop->GetWidth(),
pBackdrop->GetHeight(), pBackdrop.get(), 0, 0);
pBackdrop = std::move(pBackdrop1);
@@ -221,7 +221,7 @@ void CPDF_DIBTransferFunc::TranslateScanline(uint8_t* dest_buf,
*dest_buf++ = m_RampG[FXARGB_G(src_argb)];
*dest_buf++ = m_RampR[FXARGB_B(src_argb)];
} else {
- FX_DWORD src_byte = *src_buf;
+ uint32_t src_byte = *src_buf;
*dest_buf++ = m_RampB[src_byte];
*dest_buf++ = m_RampG[src_byte];
*dest_buf++ = m_RampR[src_byte];
@@ -417,7 +417,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
m_Flags |= FXRENDER_IMAGE_LOSSY;
}
} else if (CPDF_Array* pArray = pFilters->AsArray()) {
- for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
+ for (uint32_t i = 0; i < pArray->GetCount(); i++) {
CFX_ByteStringC bsDecodeType = pArray->GetConstStringAt(i);
if (bsDecodeType == "DCTDecode" || bsDecodeType == "JPXDecode") {
m_Flags |= FXRENDER_IMAGE_LOSSY;
@@ -494,7 +494,7 @@ FX_BOOL CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
FX_ARGB bitmap_argb,
int bitmap_alpha,
const CFX_Matrix* pImage2Device,
- FX_DWORD flags,
+ uint32_t flags,
FX_BOOL bStdCS,
int blendType) {
m_pRenderStatus = pStatus;
@@ -788,7 +788,7 @@ FX_BOOL CPDF_ImageRenderer::StartBitmapAlpha() {
CFX_PathData path;
path.AppendRect(0, 0, 1, 1);
path.Transform(&m_ImageMatrix);
- FX_DWORD fill_color =
+ uint32_t fill_color =
ArgbEncode(0xff, m_BitmapAlpha, m_BitmapAlpha, m_BitmapAlpha);
m_pRenderStatus->m_pDevice->DrawPath(&path, NULL, NULL, fill_color, 0,
FXFILL_WINDING);
@@ -868,7 +868,7 @@ FX_BOOL CPDF_ImageRenderer::Continue(IFX_Pause* pPause) {
}
ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(
const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int width,
int height,
int nComps,
@@ -925,7 +925,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
pCS = m_pContext->GetDocument()->LoadColorSpace(pCSObj);
if (pCS) {
FX_FLOAT R, G, B;
- FX_DWORD comps = 8;
+ uint32_t comps = 8;
if (pCS->CountComponents() > comps) {
comps = pCS->CountComponents();
}
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 1ad091e7af..6ed50ead56 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -38,7 +38,7 @@ unsigned int GetBits8(const uint8_t* pData, uint64_t bitpos, size_t nbits) {
return (byte >> (8 - nbits - (bitpos % 8))) & ((1 << nbits) - 1);
}
-FX_SAFE_DWORD CalculatePitch8(FX_DWORD bpc, FX_DWORD components, int width) {
+FX_SAFE_DWORD CalculatePitch8(uint32_t bpc, uint32_t components, int width) {
FX_SAFE_DWORD pitch = bpc;
pitch *= components;
pitch *= width;
@@ -147,11 +147,11 @@ void CPDF_DIBSource::ReleaseBitmap(CFX_DIBitmap* pBitmap) const {
FX_BOOL CPDF_DIBSource::Load(CPDF_Document* pDoc,
const CPDF_Stream* pStream,
CPDF_DIBSource** ppMask,
- FX_DWORD* pMatteColor,
+ uint32_t* pMatteColor,
CPDF_Dictionary* pFormResources,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask) {
if (!pStream) {
return FALSE;
@@ -274,7 +274,7 @@ int CPDF_DIBSource::StartLoadDIBSource(CPDF_Document* pDoc,
CPDF_Dictionary* pFormResources,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask) {
if (!pStream) {
return 0;
@@ -480,7 +480,7 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode,
int max_data = (1 << m_bpc) - 1;
CPDF_Array* pDecode = m_pDict->GetArrayBy("Decode");
if (pDecode) {
- for (FX_DWORD i = 0; i < m_nComponents; i++) {
+ for (uint32_t i = 0; i < m_nComponents; i++) {
pCompData[i].m_DecodeMin = pDecode->GetNumberAt(i * 2);
FX_FLOAT max = pDecode->GetNumberAt(i * 2 + 1);
pCompData[i].m_DecodeStep = (max - pCompData[i].m_DecodeMin) / max_data;
@@ -496,7 +496,7 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode,
}
}
} else {
- for (FX_DWORD i = 0; i < m_nComponents; i++) {
+ for (uint32_t i = 0; i < m_nComponents; i++) {
FX_FLOAT def_value;
m_pColorSpace->GetDefaultValue(i, def_value, pCompData[i].m_DecodeMin,
pCompData[i].m_DecodeStep);
@@ -514,7 +514,7 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode,
}
if (CPDF_Array* pArray = pMask->AsArray()) {
if (pArray->GetCount() >= m_nComponents * 2) {
- for (FX_DWORD i = 0; i < m_nComponents; i++) {
+ for (uint32_t i = 0; i < m_nComponents; i++) {
int min_num = pArray->GetIntegerAt(i * 2);
int max_num = pArray->GetIntegerAt(i * 2 + 1);
pCompData[i].m_ColorKeyMin = std::max(min_num, 0);
@@ -529,14 +529,14 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode,
ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(
const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int width,
int height,
const CPDF_Dictionary* pParams);
ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(
const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int width,
int height,
int nComps,
@@ -552,7 +552,7 @@ int CPDF_DIBSource::CreateDecoder() {
return 0;
}
const uint8_t* src_data = m_pStreamAcc->GetData();
- FX_DWORD src_size = m_pStreamAcc->GetSize();
+ uint32_t src_size = m_pStreamAcc->GetSize();
const CPDF_Dictionary* pParams = m_pStreamAcc->GetImageParam();
if (decoder == "CCITTFaxDecode") {
m_pDecoder.reset(FPDFAPI_CreateFaxDecoder(src_data, src_size, m_Width,
@@ -568,9 +568,9 @@ int CPDF_DIBSource::CreateDecoder() {
ICodec_JpegModule* pJpegModule = CPDF_ModuleMgr::Get()->GetJpegModule();
if (pJpegModule->LoadInfo(src_data, src_size, m_Width, m_Height, comps,
bpc, bTransform)) {
- if (m_nComponents != static_cast<FX_DWORD>(comps)) {
+ if (m_nComponents != static_cast<uint32_t>(comps)) {
FX_Free(m_pCompData);
- m_nComponents = static_cast<FX_DWORD>(comps);
+ m_nComponents = static_cast<uint32_t>(comps);
if (m_Family == PDFCS_LAB && m_nComponents != 3) {
m_pCompData = nullptr;
return 0;
@@ -638,9 +638,9 @@ void CPDF_DIBSource::LoadJpxBitmap() {
if (!context->decoder())
return;
- FX_DWORD width = 0;
- FX_DWORD height = 0;
- FX_DWORD components = 0;
+ uint32_t width = 0;
+ uint32_t height = 0;
+ uint32_t components = 0;
pJpxModule->GetImageInfo(context->decoder(), &width, &height, &components);
if (static_cast<int>(width) < m_Width || static_cast<int>(height) < m_Height)
return;
@@ -682,7 +682,7 @@ void CPDF_DIBSource::LoadJpxBitmap() {
}
m_pCachedBitmap->Clear(0xFFFFFFFF);
std::vector<uint8_t> output_offsets(components);
- for (FX_DWORD i = 0; i < components; ++i)
+ for (uint32_t i = 0; i < components; ++i)
output_offsets[i] = i;
if (bSwapRGB) {
output_offsets[0] = 2;
@@ -696,10 +696,10 @@ void CPDF_DIBSource::LoadJpxBitmap() {
if (m_pColorSpace && m_pColorSpace->GetFamily() == PDFCS_INDEXED &&
m_bpc < 8) {
int scale = 8 - m_bpc;
- for (FX_DWORD row = 0; row < height; ++row) {
+ for (uint32_t row = 0; row < height; ++row) {
uint8_t* scanline =
const_cast<uint8_t*>(m_pCachedBitmap->GetScanline(row));
- for (FX_DWORD col = 0; col < width; ++col) {
+ for (uint32_t col = 0; col < width; ++col) {
*scanline = (*scanline) >> scale;
++scanline;
}
@@ -708,7 +708,7 @@ void CPDF_DIBSource::LoadJpxBitmap() {
m_bpc = 8;
}
-CPDF_DIBSource* CPDF_DIBSource::LoadMask(FX_DWORD& MatteColor) {
+CPDF_DIBSource* CPDF_DIBSource::LoadMask(uint32_t& MatteColor) {
MatteColor = 0xFFFFFFFF;
CPDF_Stream* pSoftMask = m_pDict->GetStreamBy("SMask");
if (pSoftMask) {
@@ -716,7 +716,7 @@ CPDF_DIBSource* CPDF_DIBSource::LoadMask(FX_DWORD& MatteColor) {
if (pMatte && m_pColorSpace &&
m_pColorSpace->CountComponents() <= m_nComponents) {
std::vector<FX_FLOAT> colors(m_nComponents);
- for (FX_DWORD i = 0; i < m_nComponents; i++) {
+ for (uint32_t i = 0; i < m_nComponents; i++) {
colors[i] = pMatte->GetFloatAt(i);
}
FX_FLOAT R, G, B;
@@ -742,7 +742,7 @@ int CPDF_DIBSource::StratLoadMask() {
m_pColorSpace->CountComponents() <= m_nComponents) {
FX_FLOAT R, G, B;
std::vector<FX_FLOAT> colors(m_nComponents);
- for (FX_DWORD i = 0; i < m_nComponents; i++) {
+ for (uint32_t i = 0; i < m_nComponents; i++) {
colors[i] = pMatte->GetFloatAt(i);
}
m_pColorSpace->GetRGB(colors.data(), R, G, B);
@@ -853,7 +853,7 @@ void CPDF_DIBSource::LoadPalette() {
FX_FLOAT* color_value = color_values;
for (int i = 0; i < palette_count; i++) {
int color_data = i;
- for (FX_DWORD j = 0; j < m_nComponents; j++) {
+ for (uint32_t j = 0; j < m_nComponents; j++) {
int encoded_component = color_data % (1 << m_bpc);
color_data /= 1 << m_bpc;
color_value[j] = m_pCompData[j].m_DecodeMin +
@@ -972,7 +972,7 @@ void CPDF_DIBSource::TranslateScanline24bpp(uint8_t* dest_scan,
uint64_t src_byte_pos = 0;
size_t dest_byte_pos = 0;
for (int column = 0; column < m_Width; column++) {
- for (FX_DWORD color = 0; color < m_nComponents; color++) {
+ for (uint32_t color = 0; color < m_nComponents; color++) {
uint8_t data = src_scan[src_byte_pos++];
color_values[color] = m_pCompData[color].m_DecodeMin +
m_pCompData[color].m_DecodeStep * data;
@@ -997,7 +997,7 @@ void CPDF_DIBSource::TranslateScanline24bpp(uint8_t* dest_scan,
uint64_t src_bit_pos = 0;
size_t dest_byte_pos = 0;
for (int column = 0; column < m_Width; column++) {
- for (FX_DWORD color = 0; color < m_nComponents; color++) {
+ for (uint32_t color = 0; color < m_nComponents; color++) {
unsigned int data = GetBits8(src_scan, src_bit_pos, m_bpc);
color_values[color] = m_pCompData[color].m_DecodeMin +
m_pCompData[color].m_DecodeStep * data;
@@ -1033,7 +1033,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
FX_SAFE_DWORD src_pitch = CalculatePitch8(m_bpc, m_nComponents, m_Width);
if (!src_pitch.IsValid())
return nullptr;
- FX_DWORD src_pitch_value = src_pitch.ValueOrDie();
+ uint32_t src_pitch_value = src_pitch.ValueOrDie();
const uint8_t* pSrcLine = nullptr;
if (m_pCachedBitmap && src_pitch_value <= m_pCachedBitmap->GetPitch()) {
if (line >= m_pCachedBitmap->GetHeight()) {
@@ -1054,11 +1054,11 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
}
if (m_bpc * m_nComponents == 1) {
if (m_bImageMask && m_bDefaultDecode) {
- for (FX_DWORD i = 0; i < src_pitch_value; i++) {
+ for (uint32_t i = 0; i < src_pitch_value; i++) {
m_pLineBuf[i] = ~pSrcLine[i];
}
} else if (m_bColorKey) {
- FX_DWORD reset_argb, set_argb;
+ uint32_t reset_argb, set_argb;
reset_argb = m_pPalette ? m_pPalette[0] : 0xFF000000;
set_argb = m_pPalette ? m_pPalette[1] : 0xFFFFFFFF;
if (m_pCompData[0].m_ColorKeyMin == 0) {
@@ -1069,7 +1069,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
}
set_argb = FXARGB_TODIB(set_argb);
reset_argb = FXARGB_TODIB(reset_argb);
- FX_DWORD* dest_scan = reinterpret_cast<FX_DWORD*>(m_pMaskedLine);
+ uint32_t* dest_scan = reinterpret_cast<uint32_t*>(m_pMaskedLine);
for (int col = 0; col < m_Width; col++) {
if (pSrcLine[col / 8] & (1 << (7 - col % 8))) {
*dest_scan = set_argb;
@@ -1091,7 +1091,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
uint64_t src_bit_pos = 0;
for (int col = 0; col < m_Width; col++) {
unsigned int color_index = 0;
- for (FX_DWORD color = 0; color < m_nComponents; color++) {
+ for (uint32_t color = 0; color < m_nComponents; color++) {
unsigned int data = GetBits8(pSrcLine, src_bit_pos, m_bpc);
color_index |= data << (color * m_bpc);
src_bit_pos += m_bpc;
@@ -1175,7 +1175,7 @@ void CPDF_DIBSource::DownSampleScanline(int line,
return;
}
- FX_DWORD src_width = m_Width;
+ uint32_t src_width = m_Width;
FX_SAFE_DWORD pitch = CalculatePitch8(m_bpc, m_nComponents, m_Width);
if (!pitch.IsValid())
return;
@@ -1186,7 +1186,7 @@ void CPDF_DIBSource::DownSampleScanline(int line,
} else if (m_pDecoder) {
pSrcLine = m_pDecoder->GetScanline(line);
} else {
- FX_DWORD src_pitch = pitch.ValueOrDie();
+ uint32_t src_pitch = pitch.ValueOrDie();
pitch *= (line + 1);
if (!pitch.IsValid()) {
return;
@@ -1224,19 +1224,19 @@ void CPDF_DIBSource::DownSampleScanline(int line,
void CPDF_DIBSource::DownSampleScanline1Bit(int orig_Bpp,
int dest_Bpp,
- FX_DWORD src_width,
+ uint32_t src_width,
const uint8_t* pSrcLine,
uint8_t* dest_scan,
int dest_width,
FX_BOOL bFlipX,
int clip_left,
int clip_width) const {
- FX_DWORD set_argb = (FX_DWORD)-1;
- FX_DWORD reset_argb = 0;
+ uint32_t set_argb = (uint32_t)-1;
+ uint32_t reset_argb = 0;
if (m_bImageMask) {
if (m_bDefaultDecode) {
set_argb = 0;
- reset_argb = (FX_DWORD)-1;
+ reset_argb = (uint32_t)-1;
}
} else if (m_bColorKey) {
reset_argb = m_pPalette ? m_pPalette[0] : 0xFF000000;
@@ -1249,9 +1249,9 @@ void CPDF_DIBSource::DownSampleScanline1Bit(int orig_Bpp,
}
set_argb = FXARGB_TODIB(set_argb);
reset_argb = FXARGB_TODIB(reset_argb);
- FX_DWORD* dest_scan_dword = reinterpret_cast<FX_DWORD*>(dest_scan);
+ uint32_t* dest_scan_dword = reinterpret_cast<uint32_t*>(dest_scan);
for (int i = 0; i < clip_width; i++) {
- FX_DWORD src_x = (clip_left + i) * src_width / dest_width;
+ uint32_t src_x = (clip_left + i) * src_width / dest_width;
if (bFlipX) {
src_x = src_width - src_x - 1;
}
@@ -1271,7 +1271,7 @@ void CPDF_DIBSource::DownSampleScanline1Bit(int orig_Bpp,
}
}
for (int i = 0; i < clip_width; i++) {
- FX_DWORD src_x = (clip_left + i) * src_width / dest_width;
+ uint32_t src_x = (clip_left + i) * src_width / dest_width;
if (bFlipX) {
src_x = src_width - src_x - 1;
}
@@ -1285,7 +1285,7 @@ void CPDF_DIBSource::DownSampleScanline1Bit(int orig_Bpp,
dest_scan[dest_pos + 1] = FXARGB_G(set_argb);
dest_scan[dest_pos + 2] = FXARGB_R(set_argb);
} else {
- *reinterpret_cast<FX_DWORD*>(dest_scan + dest_pos) = set_argb;
+ *reinterpret_cast<uint32_t*>(dest_scan + dest_pos) = set_argb;
}
} else {
if (dest_Bpp == 1) {
@@ -1295,7 +1295,7 @@ void CPDF_DIBSource::DownSampleScanline1Bit(int orig_Bpp,
dest_scan[dest_pos + 1] = FXARGB_G(reset_argb);
dest_scan[dest_pos + 2] = FXARGB_R(reset_argb);
} else {
- *reinterpret_cast<FX_DWORD*>(dest_scan + dest_pos) = reset_argb;
+ *reinterpret_cast<uint32_t*>(dest_scan + dest_pos) = reset_argb;
}
}
}
@@ -1303,7 +1303,7 @@ void CPDF_DIBSource::DownSampleScanline1Bit(int orig_Bpp,
void CPDF_DIBSource::DownSampleScanline8Bit(int orig_Bpp,
int dest_Bpp,
- FX_DWORD src_width,
+ uint32_t src_width,
const uint8_t* pSrcLine,
uint8_t* dest_scan,
int dest_width,
@@ -1312,9 +1312,9 @@ void CPDF_DIBSource::DownSampleScanline8Bit(int orig_Bpp,
int clip_width) const {
if (m_bpc < 8) {
uint64_t src_bit_pos = 0;
- for (FX_DWORD col = 0; col < src_width; col++) {
+ for (uint32_t col = 0; col < src_width; col++) {
unsigned int color_index = 0;
- for (FX_DWORD color = 0; color < m_nComponents; color++) {
+ for (uint32_t color = 0; color < m_nComponents; color++) {
unsigned int data = GetBits8(pSrcLine, src_bit_pos, m_bpc);
color_index |= data << (color * m_bpc);
src_bit_pos += m_bpc;
@@ -1325,7 +1325,7 @@ void CPDF_DIBSource::DownSampleScanline8Bit(int orig_Bpp,
}
if (m_bColorKey) {
for (int i = 0; i < clip_width; i++) {
- FX_DWORD src_x = (clip_left + i) * src_width / dest_width;
+ uint32_t src_x = (clip_left + i) * src_width / dest_width;
if (bFlipX) {
src_x = src_width - src_x - 1;
}
@@ -1349,7 +1349,7 @@ void CPDF_DIBSource::DownSampleScanline8Bit(int orig_Bpp,
return;
}
for (int i = 0; i < clip_width; i++) {
- FX_DWORD src_x = (clip_left + i) * src_width / dest_width;
+ uint32_t src_x = (clip_left + i) * src_width / dest_width;
if (bFlipX) {
src_x = src_width - src_x - 1;
}
@@ -1369,7 +1369,7 @@ void CPDF_DIBSource::DownSampleScanline8Bit(int orig_Bpp,
void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp,
int dest_Bpp,
- FX_DWORD src_width,
+ uint32_t src_width,
const uint8_t* pSrcLine,
uint8_t* dest_scan,
int dest_width,
@@ -1378,12 +1378,12 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp,
int clip_width) const {
// last_src_x used to store the last seen src_x position which should be
// in [0, src_width). Set the initial value to be an invalid src_x value.
- FX_DWORD last_src_x = src_width;
+ uint32_t last_src_x = src_width;
FX_ARGB last_argb = FXARGB_MAKE(0xFF, 0xFF, 0xFF, 0xFF);
FX_FLOAT unit_To8Bpc = 255.0f / ((1 << m_bpc) - 1);
for (int i = 0; i < clip_width; i++) {
int dest_x = clip_left + i;
- FX_DWORD src_x = (bFlipX ? (dest_width - dest_x - 1) : dest_x) *
+ uint32_t src_x = (bFlipX ? (dest_width - dest_x - 1) : dest_x) *
(int64_t)src_width / dest_width;
src_x %= src_width;
@@ -1401,7 +1401,7 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp,
size_t num_bits = src_x * m_bpc * m_nComponents;
uint64_t src_bit_pos = num_bits % 8;
pSrcPixel = pSrcLine + num_bits / 8;
- for (FX_DWORD j = 0; j < m_nComponents; ++j) {
+ for (uint32_t j = 0; j < m_nComponents; ++j) {
extracted_components[j] = static_cast<uint8_t>(
GetBits8(pSrcPixel, src_bit_pos, m_bpc) * unit_To8Bpc);
src_bit_pos += m_bpc;
@@ -1410,7 +1410,7 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp,
} else {
pSrcPixel = pSrcLine + src_x * orig_Bpp;
if (m_bpc == 16) {
- for (FX_DWORD j = 0; j < m_nComponents; ++j)
+ for (uint32_t j = 0; j < m_nComponents; ++j)
extracted_components[j] = pSrcPixel[j * 2];
pSrcPixel = extracted_components;
}
@@ -1423,7 +1423,7 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp,
m_pColorSpace->TranslateImageLine(color, pSrcPixel, 1, 0, 0,
bTransMask);
} else {
- for (FX_DWORD j = 0; j < m_nComponents; ++j) {
+ for (uint32_t j = 0; j < m_nComponents; ++j) {
FX_FLOAT component_value =
static_cast<FX_FLOAT>(extracted_components[j]);
int color_value = static_cast<int>(
@@ -1460,7 +1460,7 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp,
last_argb = argb;
}
if (dest_Bpp == 4) {
- *reinterpret_cast<FX_DWORD*>(pDestPixel) = FXARGB_TODIB(argb);
+ *reinterpret_cast<uint32_t*>(pDestPixel) = FXARGB_TODIB(argb);
} else {
*pDestPixel++ = FXARGB_B(argb);
*pDestPixel++ = FXARGB_G(argb);
@@ -1500,7 +1500,7 @@ FX_BOOL CPDF_ImageLoaderHandle::Start(CPDF_ImageLoader* pImageLoader,
const CPDF_ImageObject* pImage,
CPDF_PageRenderCache* pCache,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask,
CPDF_RenderStatus* pRenderStatus,
int32_t nDownsampleWidth,
@@ -1565,7 +1565,7 @@ FX_BOOL CPDF_ImageLoader::Start(const CPDF_ImageObject* pImage,
CPDF_PageRenderCache* pCache,
CPDF_ImageLoaderHandle*& LoadHandle,
FX_BOOL bStdCS,
- FX_DWORD GroupFamily,
+ uint32_t GroupFamily,
FX_BOOL bLoadMask,
CPDF_RenderStatus* pRenderStatus,
int32_t nDownsampleWidth,
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 94f38c5186..9c1fa36b28 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -70,7 +70,7 @@ static void DrawAxialShading(CFX_DIBitmap* pBitmap,
CFX_FixedBufGrow<FX_FLOAT, 16> result_array(total_results);
FX_FLOAT* pResults = result_array;
FXSYS_memset(pResults, 0, total_results * sizeof(FX_FLOAT));
- FX_DWORD rgb_array[SHADING_STEPS];
+ uint32_t rgb_array[SHADING_STEPS];
for (int i = 0; i < SHADING_STEPS; i++) {
FX_FLOAT input = (t_max - t_min) * i / SHADING_STEPS + t_min;
int offset = 0;
@@ -90,7 +90,7 @@ static void DrawAxialShading(CFX_DIBitmap* pBitmap,
}
int pitch = pBitmap->GetPitch();
for (int row = 0; row < height; row++) {
- FX_DWORD* dib_buf = (FX_DWORD*)(pBitmap->GetBuffer() + row * pitch);
+ uint32_t* dib_buf = (uint32_t*)(pBitmap->GetBuffer() + row * pitch);
for (int column = 0; column < width; column++) {
FX_FLOAT x = (FX_FLOAT)column, y = (FX_FLOAT)row;
matrix.Transform(x, y);
@@ -156,7 +156,7 @@ static void DrawRadialShading(CFX_DIBitmap* pBitmap,
CFX_FixedBufGrow<FX_FLOAT, 16> result_array(total_results);
FX_FLOAT* pResults = result_array;
FXSYS_memset(pResults, 0, total_results * sizeof(FX_FLOAT));
- FX_DWORD rgb_array[SHADING_STEPS];
+ uint32_t rgb_array[SHADING_STEPS];
for (int i = 0; i < SHADING_STEPS; i++) {
FX_FLOAT input = (t_max - t_min) * i / SHADING_STEPS + t_min;
int offset = 0;
@@ -189,7 +189,7 @@ static void DrawRadialShading(CFX_DIBitmap* pBitmap,
}
}
for (int row = 0; row < height; row++) {
- FX_DWORD* dib_buf = (FX_DWORD*)(pBitmap->GetBuffer() + row * pitch);
+ uint32_t* dib_buf = (uint32_t*)(pBitmap->GetBuffer() + row * pitch);
for (int column = 0; column < width; column++) {
FX_FLOAT x = (FX_FLOAT)column, y = (FX_FLOAT)row;
matrix.Transform(x, y);
@@ -286,7 +286,7 @@ static void DrawFuncShading(CFX_DIBitmap* pBitmap,
FX_FLOAT* pResults = result_array;
FXSYS_memset(pResults, 0, total_results * sizeof(FX_FLOAT));
for (int row = 0; row < height; row++) {
- FX_DWORD* dib_buf = (FX_DWORD*)(pBitmap->GetBuffer() + row * pitch);
+ uint32_t* dib_buf = (uint32_t*)(pBitmap->GetBuffer() + row * pitch);
for (int column = 0; column < width; column++) {
FX_FLOAT x = (FX_FLOAT)column, y = (FX_FLOAT)row;
matrix.Transform(x, y);
@@ -432,7 +432,7 @@ static void DrawFreeGouraudShading(CFX_DIBitmap* pBitmap,
while (!stream.m_BitStream.IsEOF()) {
CPDF_MeshVertex vertex;
- FX_DWORD flag = stream.GetVertex(vertex, pObject2Bitmap);
+ uint32_t flag = stream.GetVertex(vertex, pObject2Bitmap);
if (flag == 0) {
triangle[0] = vertex;
for (int j = 1; j < 3; j++) {
@@ -782,7 +782,7 @@ static void DrawCoonPatchMeshes(FX_BOOL bTensor,
CFX_PointF coords[16];
int point_count = bTensor ? 16 : 12;
while (!stream.m_BitStream.IsEOF()) {
- FX_DWORD flag = stream.GetFlag();
+ uint32_t flag = stream.GetFlag();
int iStartPoint = 0, iStartColor = 0, i = 0;
if (flag) {
iStartPoint = 4;
@@ -1141,7 +1141,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
return;
}
screen.Clear(0);
- FX_DWORD* src_buf = (FX_DWORD*)pPatternBitmap->GetBuffer();
+ uint32_t* src_buf = (uint32_t*)pPatternBitmap->GetBuffer();
for (int col = min_col; col <= max_col; col++) {
for (int row = min_row; row <= max_row; row++) {
int start_x, start_y;
@@ -1160,8 +1160,8 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
start_y >= clip_box.Height()) {
continue;
}
- FX_DWORD* dest_buf =
- (FX_DWORD*)(screen.GetBuffer() + screen.GetPitch() * start_y +
+ uint32_t* dest_buf =
+ (uint32_t*)(screen.GetBuffer() + screen.GetPitch() * start_y +
start_x * 4);
if (pPattern->m_bColored) {
*dest_buf = *src_buf;
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 04b0c93507..c38362fb70 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -29,7 +29,7 @@ CPDF_Type3Cache::~CPDF_Type3Cache() {
}
m_SizeMap.clear();
}
-CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(FX_DWORD charcode,
+CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(uint32_t charcode,
const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX,
FX_FLOAT retinaScaleY) {
@@ -130,7 +130,7 @@ static int _DetectFirstLastScan(const CFX_DIBitmap* pBitmap, FX_BOOL bFirst) {
return -1;
}
CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize,
- FX_DWORD charcode,
+ uint32_t charcode,
const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX,
FX_FLOAT retinaScaleY) {
@@ -192,10 +192,10 @@ void _CPDF_UniqueKeyGen::Generate(int count, ...) {
va_start(argList, count);
for (int i = 0; i < count; i++) {
int p = va_arg(argList, int);
- ((FX_DWORD*)m_Key)[i] = p;
+ ((uint32_t*)m_Key)[i] = p;
}
va_end(argList);
- m_KeyLen = count * sizeof(FX_DWORD);
+ m_KeyLen = count * sizeof(uint32_t);
}
FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
const CFX_Matrix* pObj2Device,
@@ -334,7 +334,7 @@ class CPDF_RefType3Cache {
ReleaseCachedType3(m_pType3Font);
}
}
- FX_DWORD m_dwCount;
+ uint32_t m_dwCount;
CPDF_Type3Font* m_pType3Font;
};
FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj,
@@ -362,13 +362,13 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj,
return FALSE;
}
CPDF_RefType3Cache refTypeCache(pType3Font);
- FX_DWORD* pChars = textobj->m_pCharCodes;
+ uint32_t* pChars = textobj->m_pCharCodes;
if (textobj->m_nChars == 1) {
- pChars = (FX_DWORD*)(&textobj->m_pCharCodes);
+ pChars = (uint32_t*)(&textobj->m_pCharCodes);
}
for (int iChar = 0; iChar < textobj->m_nChars; iChar++) {
- FX_DWORD charcode = pChars[iChar];
- if (charcode == (FX_DWORD)-1) {
+ uint32_t charcode = pChars[iChar];
+ if (charcode == (uint32_t)-1) {
continue;
}
CPDF_Type3Char* pType3Char = pType3Font->LoadChar(charcode);
@@ -501,12 +501,12 @@ class CPDF_CharPosList {
CPDF_CharPosList();
~CPDF_CharPosList();
void Load(int nChars,
- FX_DWORD* pCharCodes,
+ uint32_t* pCharCodes,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size);
FXTEXT_CHARPOS* m_pCharPos;
- FX_DWORD m_nChars;
+ uint32_t m_nChars;
};
CPDF_CharPosList::CPDF_CharPosList() {
@@ -516,7 +516,7 @@ CPDF_CharPosList::~CPDF_CharPosList() {
FX_Free(m_pCharPos);
}
void CPDF_CharPosList::Load(int nChars,
- FX_DWORD* pCharCodes,
+ uint32_t* pCharCodes,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT FontSize) {
@@ -525,9 +525,9 @@ void CPDF_CharPosList::Load(int nChars,
CPDF_CIDFont* pCIDFont = pFont->AsCIDFont();
FX_BOOL bVertWriting = pCIDFont && pCIDFont->IsVertWriting();
for (int iChar = 0; iChar < nChars; iChar++) {
- FX_DWORD CharCode =
- nChars == 1 ? (FX_DWORD)(uintptr_t)pCharCodes : pCharCodes[iChar];
- if (CharCode == (FX_DWORD)-1) {
+ uint32_t CharCode =
+ nChars == 1 ? (uint32_t)(uintptr_t)pCharCodes : pCharCodes[iChar];
+ if (CharCode == (uint32_t)-1) {
continue;
}
FX_BOOL bVert = FALSE;
@@ -575,7 +575,7 @@ void CPDF_CharPosList::Load(int nChars,
}
FX_BOOL CPDF_TextRenderer::DrawTextPath(CFX_RenderDevice* pDevice,
int nChars,
- FX_DWORD* pCharCodes,
+ uint32_t* pCharCodes,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
@@ -629,16 +629,16 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
if (nChars == 0) {
return;
}
- FX_DWORD charcode;
+ uint32_t charcode;
int offset = 0;
- FX_DWORD* pCharCodes;
+ uint32_t* pCharCodes;
FX_FLOAT* pCharPos;
if (nChars == 1) {
charcode = pFont->GetNextChar(str, str.GetLength(), offset);
- pCharCodes = (FX_DWORD*)(uintptr_t)charcode;
+ pCharCodes = (uint32_t*)(uintptr_t)charcode;
pCharPos = NULL;
} else {
- pCharCodes = FX_Alloc(FX_DWORD, nChars);
+ pCharCodes = FX_Alloc(uint32_t, nChars);
pCharPos = FX_Alloc(FX_FLOAT, nChars - 1);
FX_FLOAT cur_pos = 0;
for (int i = 0; i < nChars; i++) {
@@ -673,7 +673,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
}
FX_BOOL CPDF_TextRenderer::DrawNormalText(CFX_RenderDevice* pDevice,
int nChars,
- FX_DWORD* pCharCodes,
+ uint32_t* pCharCodes,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
@@ -687,7 +687,7 @@ FX_BOOL CPDF_TextRenderer::DrawNormalText(CFX_RenderDevice* pDevice,
CharPosList.Load(nChars, pCharCodes, pCharPos, pFont, font_size);
int FXGE_flags = 0;
if (pOptions) {
- FX_DWORD dwFlags = pOptions->m_Flags;
+ uint32_t dwFlags = pOptions->m_Flags;
if (dwFlags & RENDER_CLEARTYPE) {
FXGE_flags |= FXTEXT_CLEARTYPE;
if (dwFlags & RENDER_BGR_STRIPE) {
@@ -750,7 +750,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
CPDF_CharPosList CharPosList;
CharPosList.Load(textobj->m_nChars, textobj->m_pCharCodes,
textobj->m_pCharPos, pFont, font_size);
- for (FX_DWORD i = 0; i < CharPosList.m_nChars; i++) {
+ for (uint32_t i = 0; i < CharPosList.m_nChars; i++) {
FXTEXT_CHARPOS& charpos = CharPosList.m_pCharPos[i];
const CFX_PathData* pPath = pFaceCache->LoadGlyphPath(
&pFont->m_Font, charpos.m_GlyphIndex, charpos.m_FontCharWidth);
diff --git a/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h b/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h
index 11ece71406..96e30412d5 100644
--- a/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h
+++ b/core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h
@@ -54,7 +54,7 @@ class CPDF_ProgressiveRenderer {
const CPDF_RenderOptions* const m_pOptions;
std::unique_ptr<CPDF_RenderStatus> m_pRenderStatus;
CFX_FloatRect m_ClipRect;
- FX_DWORD m_LayerIndex;
+ uint32_t m_LayerIndex;
CPDF_RenderContext::Layer* m_pCurrentLayer;
CPDF_PageObjectList::iterator m_LastObjectRendered;
};
diff --git a/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h b/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h
index b2566ad007..2974a658b4 100644
--- a/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h
+++ b/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h
@@ -50,8 +50,8 @@ class CPDF_RenderContext {
const CPDF_RenderOptions* pOptions,
CFX_Matrix* pFinalMatrix);
- FX_DWORD CountLayers() const { return m_Layers.GetSize(); }
- Layer* GetLayer(FX_DWORD index) { return m_Layers.GetDataPtr(index); }
+ uint32_t CountLayers() const { return m_Layers.GetSize(); }
+ Layer* GetLayer(uint32_t index) { return m_Layers.GetDataPtr(index); }
CPDF_Document* GetDocument() const { return m_pDocument; }
CPDF_Dictionary* GetPageResources() const { return m_pPageResources; }
diff --git a/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h b/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h
index f28fae4f3d..a78838ac58 100644
--- a/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h
+++ b/core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h
@@ -41,11 +41,11 @@ class CPDF_RenderOptions {
int m_ColorMode;
FX_COLORREF m_BackColor;
FX_COLORREF m_ForeColor;
- FX_DWORD m_Flags;
+ uint32_t m_Flags;
int m_Interpolation;
- FX_DWORD m_AddFlags;
+ uint32_t m_AddFlags;
IPDF_OCContext* m_pOCContext;
- FX_DWORD m_dwLimitCacheSize;
+ uint32_t m_dwLimitCacheSize;
int m_HalftoneLimit;
};
diff --git a/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h b/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h
index 7c04e4a705..2d3ce44e46 100644
--- a/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h
+++ b/core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h
@@ -42,7 +42,7 @@ class CPDF_TextRenderer {
static FX_BOOL DrawTextPath(CFX_RenderDevice* pDevice,
int nChars,
- FX_DWORD* pCharCodes,
+ uint32_t* pCharCodes,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
@@ -56,7 +56,7 @@ class CPDF_TextRenderer {
static FX_BOOL DrawNormalText(CFX_RenderDevice* pDevice,
int nChars,
- FX_DWORD* pCharCodes,
+ uint32_t* pCharCodes,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
@@ -66,7 +66,7 @@ class CPDF_TextRenderer {
static FX_BOOL DrawType3Text(CFX_RenderDevice* pDevice,
int nChars,
- FX_DWORD* pCharCodes,
+ uint32_t* pCharCodes,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
diff --git a/core/fpdfapi/fpdf_render/render_int.h b/core/fpdfapi/fpdf_render/render_int.h
index ea1b1d8f6b..a3b8d76fe7 100644
--- a/core/fpdfapi/fpdf_render/render_int.h
+++ b/core/fpdfapi/fpdf_render/render_int.h
@@ -56,7 +56,7 @@ class CPDF_Type3Glyphs {
int& top_line,
int& bottom_line);
- std::map<FX_DWORD, CFX_GlyphBitmap*> m_GlyphMap;
+ std::map<uint32_t, CFX_GlyphBitmap*> m_GlyphMap;
int m_TopBlue[TYPE3_MAX_BLUES];
int m_BottomBlue[TYPE3_MAX_BLUES];
int m_TopBlueCount;
@@ -67,14 +67,14 @@ class CPDF_Type3Cache {
explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {}
~CPDF_Type3Cache();
- CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode,
+ CFX_GlyphBitmap* LoadGlyph(uint32_t charcode,
const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX = 1.0f,
FX_FLOAT retinaScaleY = 1.0f);
protected:
CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize,
- FX_DWORD charcode,
+ uint32_t charcode,
const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX = 1.0f,
FX_FLOAT retinaScaleY = 1.0f);
@@ -148,7 +148,7 @@ class CPDF_RenderStatus {
FX_BOOL bStdCS = FALSE,
CPDF_Type3Char* pType3Char = NULL,
FX_ARGB fill_color = 0,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE);
void RenderObjectList(const CPDF_PageObjectHolder* pObjectHolder,
const CFX_Matrix* pObj2Device);
@@ -209,7 +209,7 @@ class CPDF_RenderStatus {
int bitmap_alpha,
const CFX_Matrix* pImage2Device,
CPDF_ImageCacheEntry* pImageCache,
- FX_DWORD flags);
+ uint32_t flags);
void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
int left,
int top,
@@ -281,7 +281,7 @@ class CPDF_RenderStatus {
int m_DitherBits;
FX_BOOL m_bDropObjects;
FX_BOOL m_bStdCS;
- FX_DWORD m_GroupFamily;
+ uint32_t m_GroupFamily;
FX_BOOL m_bLoadMask;
CPDF_Type3Char* m_pType3Char;
FX_ARGB m_T3FillColor;
@@ -302,7 +302,7 @@ class CPDF_ImageLoader {
CPDF_PageRenderCache* pCache,
CPDF_ImageLoaderHandle*& LoadHandle,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE,
CPDF_RenderStatus* pRenderStatus = NULL,
int32_t nDownsampleWidth = 0,
@@ -311,7 +311,7 @@ class CPDF_ImageLoader {
CFX_DIBSource* m_pBitmap;
CFX_DIBSource* m_pMask;
- FX_DWORD m_MatteColor;
+ uint32_t m_MatteColor;
FX_BOOL m_bCached;
protected:
@@ -327,7 +327,7 @@ class CPDF_ImageLoaderHandle {
const CPDF_ImageObject* pImage,
CPDF_PageRenderCache* pCache,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE,
CPDF_RenderStatus* pRenderStatus = NULL,
int32_t nDownsampleWidth = 0,
@@ -360,7 +360,7 @@ class CPDF_ImageRenderer : public IPDF_ObjectRenderer {
FX_ARGB bitmap_argb,
int bitmap_alpha,
const CFX_Matrix* pImage2Device,
- FX_DWORD flags,
+ uint32_t flags,
FX_BOOL bStdCS,
int blendType = FXDIB_BLEND_NORMAL);
@@ -377,7 +377,7 @@ class CPDF_ImageRenderer : public IPDF_ObjectRenderer {
FX_BOOL m_bPatternColor;
CPDF_Pattern* m_pPattern;
FX_ARGB m_FillArgb;
- FX_DWORD m_Flags;
+ uint32_t m_Flags;
CFX_ImageTransformer* m_pTransformer;
void* m_DeviceHandle;
CPDF_ImageLoaderHandle* m_LoadHandle;
@@ -447,25 +447,25 @@ class CPDF_ImageCacheEntry {
void Reset(const CFX_DIBitmap* pBitmap);
FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap,
CFX_DIBSource*& pMask,
- FX_DWORD& MatteColor,
+ uint32_t& MatteColor,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE,
CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0,
int32_t downsampleHeight = 0);
- FX_DWORD EstimateSize() const { return m_dwCacheSize; }
- FX_DWORD GetTimeCount() const { return m_dwTimeCount; }
+ uint32_t EstimateSize() const { return m_dwCacheSize; }
+ uint32_t GetTimeCount() const { return m_dwTimeCount; }
CPDF_Stream* GetStream() const { return m_pStream; }
- void SetTimeCount(FX_DWORD dwTimeCount) { m_dwTimeCount = dwTimeCount; }
+ void SetTimeCount(uint32_t dwTimeCount) { m_dwTimeCount = dwTimeCount; }
int m_dwTimeCount;
public:
int StartGetCachedBitmap(CPDF_Dictionary* pFormResources,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE,
CPDF_RenderStatus* pRenderStatus = NULL,
int32_t downsampleWidth = 0,
@@ -475,7 +475,7 @@ class CPDF_ImageCacheEntry {
CFX_DIBSource* DetachMask();
CFX_DIBSource* m_pCurBitmap;
CFX_DIBSource* m_pCurMask;
- FX_DWORD m_MatteColor;
+ uint32_t m_MatteColor;
CPDF_RenderStatus* m_pRenderStatus;
protected:
@@ -485,7 +485,7 @@ class CPDF_ImageCacheEntry {
CPDF_Stream* m_pStream;
CFX_DIBSource* m_pCachedBitmap;
CFX_DIBSource* m_pCachedMask;
- FX_DWORD m_dwCacheSize;
+ uint32_t m_dwCacheSize;
void CalcSize();
};
typedef struct {
@@ -503,11 +503,11 @@ class CPDF_DIBSource : public CFX_DIBSource {
FX_BOOL Load(CPDF_Document* pDoc,
const CPDF_Stream* pStream,
CPDF_DIBSource** ppMask,
- FX_DWORD* pMatteColor,
+ uint32_t* pMatteColor,
CPDF_Dictionary* pFormResources,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE);
// CFX_DIBSource
@@ -526,7 +526,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
CFX_DIBitmap* GetBitmap() const;
void ReleaseBitmap(CFX_DIBitmap* pBitmap) const;
void ClearImageData();
- FX_DWORD GetMatteColor() const { return m_MatteColor; }
+ uint32_t GetMatteColor() const { return m_MatteColor; }
int StartLoadDIBSource(CPDF_Document* pDoc,
const CPDF_Stream* pStream,
@@ -534,7 +534,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
CPDF_Dictionary* pFormResources,
CPDF_Dictionary* pPageResources,
FX_BOOL bStdCS = FALSE,
- FX_DWORD GroupFamily = 0,
+ uint32_t GroupFamily = 0,
FX_BOOL bLoadMask = FALSE);
int ContinueLoadDIBSource(IFX_Pause* pPause);
int StratLoadMask();
@@ -548,7 +548,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
const CPDF_Dictionary* pPageResources);
DIB_COMP_DATA* GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode,
FX_BOOL& bColorKey);
- CPDF_DIBSource* LoadMask(FX_DWORD& MatteColor);
+ CPDF_DIBSource* LoadMask(uint32_t& MatteColor);
CPDF_DIBSource* LoadMaskDIB(CPDF_Stream* pMask);
void LoadJpxBitmap();
void LoadPalette();
@@ -558,7 +558,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
void ValidateDictParam();
void DownSampleScanline1Bit(int orig_Bpp,
int dest_Bpp,
- FX_DWORD src_width,
+ uint32_t src_width,
const uint8_t* pSrcLine,
uint8_t* dest_scan,
int dest_width,
@@ -567,7 +567,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
int clip_width) const;
void DownSampleScanline8Bit(int orig_Bpp,
int dest_Bpp,
- FX_DWORD src_width,
+ uint32_t src_width,
const uint8_t* pSrcLine,
uint8_t* dest_scan,
int dest_width,
@@ -576,7 +576,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
int clip_width) const;
void DownSampleScanline32Bit(int orig_Bpp,
int dest_Bpp,
- FX_DWORD src_width,
+ uint32_t src_width,
const uint8_t* pSrcLine,
uint8_t* dest_scan,
int dest_width,
@@ -590,12 +590,12 @@ class CPDF_DIBSource : public CFX_DIBSource {
std::unique_ptr<CPDF_StreamAcc> m_pStreamAcc;
const CPDF_Dictionary* m_pDict;
CPDF_ColorSpace* m_pColorSpace;
- FX_DWORD m_Family;
- FX_DWORD m_bpc;
- FX_DWORD m_bpc_orig;
- FX_DWORD m_nComponents;
- FX_DWORD m_GroupFamily;
- FX_DWORD m_MatteColor;
+ uint32_t m_Family;
+ uint32_t m_bpc;
+ uint32_t m_bpc_orig;
+ uint32_t m_nComponents;
+ uint32_t m_GroupFamily;
+ uint32_t m_MatteColor;
FX_BOOL m_bLoadMask;
FX_BOOL m_bDefaultDecode;
FX_BOOL m_bImageMask;