summaryrefslogtreecommitdiff
path: root/core/src/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge')
-rw-r--r--core/src/fxge/agg/agg23/fx_agg_driver.cpp120
-rw-r--r--core/src/fxge/agg/include/fx_agg_driver.h8
-rw-r--r--core/src/fxge/android/fpf_skiafont.cpp4
-rw-r--r--core/src/fxge/android/fpf_skiafont.h2
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.cpp10
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.h14
-rw-r--r--core/src/fxge/android/fx_android_font.cpp6
-rw-r--r--core/src/fxge/android/fx_android_font.h6
-rw-r--r--core/src/fxge/apple/apple_int.h14
-rw-r--r--core/src/fxge/apple/fx_mac_imp.cpp10
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp8
-rw-r--r--core/src/fxge/dib/dib_int.h6
-rw-r--r--core/src/fxge/dib/fx_dib_composite.cpp394
-rw-r--r--core/src/fxge/dib/fx_dib_convert.cpp160
-rw-r--r--core/src/fxge/dib/fx_dib_engine.cpp16
-rw-r--r--core/src/fxge/dib/fx_dib_main.cpp108
-rw-r--r--core/src/fxge/dib/fx_dib_transform.cpp44
-rw-r--r--core/src/fxge/ge/fx_ge.cpp2
-rw-r--r--core/src/fxge/ge/fx_ge_device.cpp6
-rw-r--r--core/src/fxge/ge/fx_ge_font.cpp10
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp94
-rw-r--r--core/src/fxge/ge/fx_ge_linux.cpp32
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp10
-rw-r--r--core/src/fxge/ge/fx_ge_ps.cpp54
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp56
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.cpp164
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.h208
-rw-r--r--core/src/fxge/skia/fx_skia_device.cpp6
-rw-r--r--core/src/fxge/skia/fx_skia_device.h8
-rw-r--r--core/src/fxge/win32/dwrite_int.h2
-rw-r--r--core/src/fxge/win32/fx_win32_device.cpp36
-rw-r--r--core/src/fxge/win32/fx_win32_dib.cpp6
-rw-r--r--core/src/fxge/win32/fx_win32_dwrite.cpp4
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp6
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp14
-rw-r--r--core/src/fxge/win32/win32_int.h18
36 files changed, 833 insertions, 833 deletions
diff --git a/core/src/fxge/agg/agg23/fx_agg_driver.cpp b/core/src/fxge/agg/agg23/fx_agg_driver.cpp
index 60843d7441..0198872995 100644
--- a/core/src/fxge/agg/agg23/fx_agg_driver.cpp
+++ b/core/src/fxge/agg/agg23/fx_agg_driver.cpp
@@ -376,12 +376,12 @@ private:
const CFX_DIBitmap* m_pClipMask;
CFX_DIBitmap* m_pDevice;
const CFX_ClipRgn* m_pClipRgn;
- void (CFX_Renderer::*composite_span)(FX_LPBYTE, int, int, int, FX_LPBYTE, int, int, FX_LPBYTE, FX_LPBYTE);
+ void (CFX_Renderer::*composite_span)(uint8_t*, int, int, int, uint8_t*, int, int, uint8_t*, uint8_t*);
public:
void prepare(unsigned) {}
- void CompositeSpan(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan, int Bpp, FX_BOOL bDestAlpha,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan)
+ void CompositeSpan(uint8_t* dest_scan, uint8_t* ori_scan, int Bpp, FX_BOOL bDestAlpha,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -542,7 +542,7 @@ public:
index = i;
}
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
for (int col = col_start; col < col_end; col ++) {
int src_alpha;
if (clip_scan) {
@@ -561,10 +561,10 @@ public:
}
}
}
- void CompositeSpan1bpp(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpan1bpp(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
ASSERT(!m_pDevice->IsCmykImage());
@@ -580,7 +580,7 @@ public:
index = i;
}
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
for (int col = col_start; col < col_end; col ++) {
int src_alpha;
if (clip_scan) {
@@ -598,10 +598,10 @@ public:
dest_scan1 = dest_scan + (span_left % 8 + col - col_start + 1) / 8;
}
}
- void CompositeSpanGray(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanGray(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -659,10 +659,10 @@ public:
}
}
}
- void CompositeSpanARGB(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanARGB(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
int col_start = span_left < clip_left ? clip_left - span_left : 0;
int col_end = (span_left + span_len) < clip_right ? span_len : (clip_right - span_left);
@@ -745,10 +745,10 @@ public:
dest_scan += Bpp;
}
}
- void CompositeSpanRGB(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanRGB(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
int col_start = span_left < clip_left ? clip_left - span_left : 0;
int col_end = (span_left + span_len) < clip_right ? span_len : (clip_right - span_left);
@@ -865,10 +865,10 @@ public:
}
}
}
- void CompositeSpanCMYK(FX_LPBYTE dest_scan, int Bpp,
- int span_left, int span_len, FX_LPBYTE cover_scan,
- int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ void CompositeSpanCMYK(uint8_t* dest_scan, int Bpp,
+ int span_left, int span_len, uint8_t* cover_scan,
+ int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -949,13 +949,13 @@ public:
if (y < m_ClipBox.top || y >= m_ClipBox.bottom) {
return;
}
- FX_LPBYTE dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * y;
- FX_LPBYTE dest_scan_extra_alpha = NULL;
+ uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * y;
+ uint8_t* dest_scan_extra_alpha = NULL;
CFX_DIBitmap* pAlphaMask = m_pDevice->m_pAlphaMask;
if (pAlphaMask) {
dest_scan_extra_alpha = pAlphaMask->GetBuffer() + pAlphaMask->GetPitch() * y;
}
- FX_LPBYTE ori_scan = NULL;
+ uint8_t* ori_scan = NULL;
if (m_pOriDevice) {
ori_scan = m_pOriDevice->GetBuffer() + m_pOriDevice->GetPitch() * y;
}
@@ -966,9 +966,9 @@ public:
while (1) {
int x = span->x;
ASSERT(span->len > 0);
- FX_LPBYTE dest_pos = NULL;
- FX_LPBYTE dest_extra_alpha_pos = NULL;
- FX_LPBYTE ori_pos = NULL;
+ uint8_t* dest_pos = NULL;
+ uint8_t* dest_extra_alpha_pos = NULL;
+ uint8_t* ori_pos = NULL;
if (Bpp) {
ori_pos = ori_scan ? ori_scan + x * Bpp : NULL;
dest_pos = dest_scan + x * Bpp;
@@ -977,7 +977,7 @@ public:
dest_pos = dest_scan + x / 8;
ori_pos = ori_scan ? ori_scan + x / 8 : NULL;
}
- FX_LPBYTE clip_pos = NULL;
+ uint8_t* clip_pos = NULL;
if (m_pClipMask) {
clip_pos = m_pClipMask->GetBuffer() + (y - m_ClipBox.top) * m_pClipMask->GetPitch() + x - m_ClipBox.left;
}
@@ -1031,7 +1031,7 @@ public:
if (pIccTransform) {
uint8_t gray;
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, &gray, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, &gray, (const uint8_t*)&color, 1);
m_Gray = gray;
} else {
if (bObjectCMYK) {
@@ -1052,28 +1052,28 @@ public:
if (bObjectCMYK) {
m_Color = FXCMYK_TODIB(color);
if (pIccTransform) {
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&m_Color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&m_Color, 1);
}
} else {
if (!pIccTransform) {
return FALSE;
}
color = FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
}
- m_Red = ((FX_LPBYTE)&m_Color)[0];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[2];
- m_Gray = ((FX_LPBYTE)&m_Color)[3];
+ m_Red = ((uint8_t*)&m_Color)[0];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[2];
+ m_Gray = ((uint8_t*)&m_Color)[3];
} else {
composite_span = (pDevice->GetFormat() == FXDIB_Argb) ? &CFX_Renderer::CompositeSpanARGB : &CFX_Renderer::CompositeSpanRGB;
if (pIccTransform) {
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
- ((FX_LPBYTE)&m_Color)[3] = m_Alpha;
- m_Red = ((FX_LPBYTE)&m_Color)[2];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[0];
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
+ ((uint8_t*)&m_Color)[3] = m_Alpha;
+ m_Red = ((uint8_t*)&m_Color)[2];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[0];
if (m_bRgbByteOrder) {
m_Color = FXARGB_TODIB(m_Color);
m_Color = FXARGB_TOBGRORDERDIB(m_Color);
@@ -1192,7 +1192,7 @@ void RgbByteOrderSetPixel(CFX_DIBitmap* pBitmap, int x, int y, FX_DWORD argb)
if (x < 0 || x >= pBitmap->GetWidth() || y < 0 || y >= pBitmap->GetHeight()) {
return;
}
- FX_LPBYTE pos = (uint8_t*)pBitmap->GetBuffer() + y * pBitmap->GetPitch() + x * pBitmap->GetBPP() / 8;
+ uint8_t* pos = (uint8_t*)pBitmap->GetBuffer() + y * pBitmap->GetPitch() + x * pBitmap->GetBPP() / 8;
if (pBitmap->GetFormat() == FXDIB_Argb) {
FXARGB_SETRGBORDERDIB(pos, ArgbGamma(argb));
} else {
@@ -1218,7 +1218,7 @@ void RgbByteOrderCompositeRect(CFX_DIBitmap* pBitmap, int left, int top, int wid
uint8_t* pBuffer = pBitmap->GetBuffer();
if (src_alpha == 255) {
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
+ uint8_t* dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
if (Bpp == 4) {
FX_DWORD* scan = (FX_DWORD*)dest_scan;
for (int col = 0; col < width; col ++) {
@@ -1238,7 +1238,7 @@ void RgbByteOrderCompositeRect(CFX_DIBitmap* pBitmap, int left, int top, int wid
src_g = FX_GAMMA(src_g);
src_b = FX_GAMMA(src_b);
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
+ uint8_t* dest_scan = pBuffer + row * pBitmap->GetPitch() + rect.left * Bpp;
if (bAlpha) {
for (int col = 0; col < width; col ++) {
uint8_t back_alpha = dest_scan[3];
@@ -1289,8 +1289,8 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
uint8_t* buffer = pBitmap->GetBuffer();
if (dest_format == src_format) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = buffer + (dest_top + row) * pitch + dest_left * Bpp;
- FX_LPBYTE src_scan = (FX_LPBYTE)pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = buffer + (dest_top + row) * pitch + dest_left * Bpp;
+ uint8_t* src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
if (Bpp == 4) {
for (int col = 0; col < width; col ++) {
FXARGB_SETDIB(dest_scan, FXARGB_MAKE(src_scan[3], src_scan[0], src_scan[1], src_scan[2]));
@@ -1308,12 +1308,12 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
}
return;
}
- FX_LPBYTE dest_buf = buffer + dest_top * pitch + dest_left * Bpp;
+ uint8_t* dest_buf = buffer + dest_top * pitch + dest_left * Bpp;
if (dest_format == FXDIB_Rgb) {
if (src_format == FXDIB_Rgb32) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * pitch;
- FX_LPBYTE src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * pitch;
+ uint8_t* src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
*dest_scan++ = src_scan[2];
*dest_scan++ = src_scan[1];
@@ -1328,7 +1328,7 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
if (src_format == FXDIB_Rgb) {
for (int row = 0; row < height; row ++) {
uint8_t* dest_scan = (uint8_t*)(dest_buf + row * pitch);
- FX_LPBYTE src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
+ uint8_t* src_scan = (uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
if (src_format == FXDIB_Argb) {
for (int col = 0; col < width; col ++) {
FXARGB_SETDIB(dest_scan, FXARGB_MAKE(0xff, FX_GAMMA(src_scan[0]), FX_GAMMA(src_scan[1]), FX_GAMMA(src_scan[2])));
@@ -1346,8 +1346,8 @@ void RgbByteOrderTransferBitmap(CFX_DIBitmap* pBitmap, int dest_left, int dest_t
} else if (src_format == FXDIB_Rgb32) {
ASSERT(dest_format == FXDIB_Argb);
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * pitch;
- FX_LPBYTE src_scan = (FX_LPBYTE)(pSrcBitmap->GetScanline(src_top + row) + src_left * 4);
+ uint8_t* dest_scan = dest_buf + row * pitch;
+ uint8_t* src_scan = (uint8_t*)(pSrcBitmap->GetScanline(src_top + row) + src_left * 4);
for (int col = 0; col < width; col++) {
FXARGB_SETDIB(dest_scan, FXARGB_MAKE(0xff, src_scan[0], src_scan[1], src_scan[2]));
src_scan += 4;
@@ -1373,7 +1373,7 @@ FX_BOOL _DibSetPixel(CFX_DIBitmap* pDevice, int x, int y, FX_DWORD color, int al
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
color = bObjCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&color, (FX_LPBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&color, (uint8_t*)&color, 1);
color = bObjCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
if (!pDevice->IsCmykImage()) {
color = (color & 0xffffff) | (alpha << 24);
@@ -1550,7 +1550,7 @@ FX_BOOL CFX_AggDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWOR
return TRUE;
}
FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
if (m_pBitmap->GetBuffer() == NULL) {
@@ -1561,14 +1561,14 @@ FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitma
handle = pRenderer;
return TRUE;
}
-FX_BOOL CFX_AggDeviceDriver::ContinueDIBits(FX_LPVOID pHandle, IFX_Pause* pPause)
+FX_BOOL CFX_AggDeviceDriver::ContinueDIBits(void* pHandle, IFX_Pause* pPause)
{
if (m_pBitmap->GetBuffer() == NULL) {
return TRUE;
}
return ((CFX_ImageRenderer*)pHandle)->Continue(pPause);
}
-void CFX_AggDeviceDriver::CancelDIBits(FX_LPVOID pHandle)
+void CFX_AggDeviceDriver::CancelDIBits(void* pHandle)
{
if (m_pBitmap->GetBuffer() == NULL) {
return;
diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h
index f4b9368eff..803227e044 100644
--- a/core/src/fxge/agg/include/fx_agg_driver.h
+++ b/core/src/fxge/agg/include/fx_agg_driver.h
@@ -86,10 +86,10 @@ public:
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type);
- virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause);
- virtual void CancelDIBits(FX_LPVOID handle);
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
+ virtual void CancelDIBits(void* handle);
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
@@ -99,7 +99,7 @@ public:
void SetClipMask(FX_NAMESPACE_DECLARE(agg, rasterizer_scanline_aa)& rasterizer);
- virtual FX_LPBYTE GetBuffer() const
+ virtual uint8_t* GetBuffer() const
{
return m_pBitmap->GetBuffer();
}
diff --git a/core/src/fxge/android/fpf_skiafont.cpp b/core/src/fxge/android/fpf_skiafont.cpp
index 290d989851..213a6595aa 100644
--- a/core/src/fxge/android/fpf_skiafont.cpp
+++ b/core/src/fxge/android/fpf_skiafont.cpp
@@ -156,7 +156,7 @@ int32_t CFPF_SkiaFont::GetItalicAngle() const
}
return 0;
}
-FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize)
+FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize)
{
if (!m_Face) {
return FALSE;
@@ -184,7 +184,7 @@ FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescrip
break;
case FPF_SKIAFONTTYPE_Buffer: {
CFPF_SkiaBufferFont *pFont = (CFPF_SkiaBufferFont*)pFontDes;
- m_Face = pFontMgr->GetFontFace((FX_LPCBYTE)pFont->m_pBuffer, pFont->m_szBuffer, pFont->m_iFaceIndex);
+ m_Face = pFontMgr->GetFontFace((const uint8_t*)pFont->m_pBuffer, pFont->m_szBuffer, pFont->m_iFaceIndex);
}
break;
default:
diff --git a/core/src/fxge/android/fpf_skiafont.h b/core/src/fxge/android/fpf_skiafont.h
index 72b569fe2e..af33402846 100644
--- a/core/src/fxge/android/fpf_skiafont.h
+++ b/core/src/fxge/android/fpf_skiafont.h
@@ -44,7 +44,7 @@ public:
virtual int32_t GetHeight() const;
virtual int32_t GetItalicAngle() const;
- virtual FX_DWORD GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize);
+ virtual FX_DWORD GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize);
FX_BOOL InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset);
protected:
CFPF_SkiaFontMgr *m_pFontMgr;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp
index ba1e12acaf..214d67477b 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/src/fxge/android/fpf_skiafontmgr.cpp
@@ -103,7 +103,7 @@ FX_DWORD FPF_SkiaGetSansFont(FX_DWORD dwHash)
}
return 0;
}
-static uint32_t FPF_GetHashCode_StringA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE)
+static uint32_t FPF_GetHashCode_StringA(const FX_CHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE)
{
if (!pStr) {
return 0;
@@ -111,7 +111,7 @@ static uint32_t FPF_GetHashCode_StringA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL
if (iLength < 0) {
iLength = FXSYS_strlen(pStr);
}
- FX_LPCSTR pStrEnd = pStr + iLength;
+ const FX_CHAR* pStrEnd = pStr + iLength;
uint32_t uHashCode = 0;
if (bIgnoreCase) {
while (pStr < pStrEnd) {
@@ -185,7 +185,7 @@ static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily)
{
FX_DWORD dwHash = 0;
int32_t iLength = bsfamily.GetLength();
- FX_LPCSTR pBuffer = bsfamily.GetCStr();
+ const FX_CHAR* pBuffer = bsfamily.GetCStr();
for (int32_t i = 0; i < iLength; i++) {
FX_CHAR ch = pBuffer[i];
if (ch == ' ' || ch == '-' || ch == ',') {
@@ -276,7 +276,7 @@ void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile)
void CFPF_SkiaFontMgr::LoadPrivateFont(FX_BSTR bsFileName)
{
}
-void CFPF_SkiaFontMgr::LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer)
+void CFPF_SkiaFontMgr::LoadPrivateFont(void* pBuffer, size_t szBuffer)
{
}
IFPF_Font* CFPF_SkiaFontMgr::CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch)
@@ -406,7 +406,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex )
FXFT_Set_Pixel_Sizes(face, 0, 64);
return face;
}
-FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_LPCBYTE pBuffer, size_t szBuffer, int32_t iFaceIndex )
+FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const uint8_t* pBuffer, size_t szBuffer, int32_t iFaceIndex )
{
if (!pBuffer || szBuffer < 1) {
return NULL;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.h b/core/src/fxge/android/fpf_skiafontmgr.h
index 44d427f8af..ba9ea9134a 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.h
+++ b/core/src/fxge/android/fpf_skiafontmgr.h
@@ -26,7 +26,7 @@ public:
{
return FPF_SKIAFONTTYPE_Unknown;
}
- void SetFamily(FX_LPCSTR pFamily)
+ void SetFamily(const FX_CHAR* pFamily)
{
if (m_pFamily) {
FX_Free(m_pFamily);
@@ -36,7 +36,7 @@ public:
FXSYS_memcpy32(m_pFamily, pFamily, iSize * sizeof(FX_CHAR));
m_pFamily[iSize] = 0;
}
- FX_LPSTR m_pFamily;
+ FX_CHAR* m_pFamily;
FX_DWORD m_dwStyle;
int32_t m_iFaceIndex;
FX_DWORD m_dwCharsets;
@@ -56,7 +56,7 @@ public:
{
return FPF_SKIAFONTTYPE_Path;
}
- void SetPath(FX_LPCSTR pPath)
+ void SetPath(const FX_CHAR* pPath)
{
if (m_pPath) {
FX_Free(m_pPath);
@@ -66,7 +66,7 @@ public:
FXSYS_memcpy32(m_pPath, pPath, iSize * sizeof(FX_CHAR));
m_pPath[iSize] = 0;
}
- FX_LPSTR m_pPath;
+ FX_CHAR* m_pPath;
};
class CFPF_SkiaFileFont : public CFPF_SkiaFontDescriptor
{
@@ -86,7 +86,7 @@ public:
{
return FPF_SKIAFONTTYPE_Buffer;
}
- FX_LPVOID m_pBuffer;
+ void* m_pBuffer;
size_t m_szBuffer;
};
class CFPF_SkiaFontMgr : public IFPF_FontMgr
@@ -98,12 +98,12 @@ public:
virtual void LoadSystemFonts();
virtual void LoadPrivateFont(IFX_FileRead* pFontFile);
virtual void LoadPrivateFont(FX_BSTR bsFileName);
- virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer);
+ virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer);
virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0);
FXFT_Face GetFontFace(IFX_FileRead *pFileRead, int32_t iFaceIndex = 0);
FXFT_Face GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex = 0);
- FXFT_Face GetFontFace(FX_LPCBYTE pBuffer, size_t szBuffer, int32_t iFaceIndex = 0);
+ FXFT_Face GetFontFace(const uint8_t* pBuffer, size_t szBuffer, int32_t iFaceIndex = 0);
protected:
void ScanPath(FX_BSTR path);
void ScanFile(FX_BSTR file);
diff --git a/core/src/fxge/android/fx_android_font.cpp b/core/src/fxge/android/fx_android_font.cpp
index 5f8aafc393..48331c2dd0 100644
--- a/core/src/fxge/android/fx_android_font.cpp
+++ b/core/src/fxge/android/fx_android_font.cpp
@@ -23,7 +23,7 @@ FX_BOOL CFX_AndroidFontInfo::EnumFontList(CFX_FontMapper* pMapper)
{
return FALSE;
}
-void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact)
+void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact)
{
if (!m_pFontMgr) {
return NULL;
@@ -46,11 +46,11 @@ void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int
}
return m_pFontMgr->CreateFont(face, charset, dwStyle, FPF_MATCHFONT_REPLACEANSI);
}
-void* CFX_AndroidFontInfo::GetFont(FX_LPCSTR face)
+void* CFX_AndroidFontInfo::GetFont(const FX_CHAR* face)
{
return NULL;
}
-FX_DWORD CFX_AndroidFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size)
+FX_DWORD CFX_AndroidFontInfo::GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size)
{
if (!hFont) {
return 0;
diff --git a/core/src/fxge/android/fx_android_font.h b/core/src/fxge/android/fx_android_font.h
index fb7ff7cd92..0e79abaa9f 100644
--- a/core/src/fxge/android/fx_android_font.h
+++ b/core/src/fxge/android/fx_android_font.h
@@ -20,10 +20,10 @@ public:
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper);
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact);
- virtual void* GetFont(FX_LPCSTR face);
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size);
+ virtual void* GetFont(const FX_CHAR* face);
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size);
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name);
virtual FX_BOOL GetFontCharset(void* hFont, int& charset);
diff --git a/core/src/fxge/apple/apple_int.h b/core/src/fxge/apple/apple_int.h
index 6cd880603a..1e620a3a4f 100644
--- a/core/src/fxge/apple/apple_int.h
+++ b/core/src/fxge/apple/apple_int.h
@@ -48,7 +48,7 @@ public:
void* createGraphics(CFX_DIBitmap* bitmap);
void destroyGraphics(void* graphics);
- void* CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize);
+ void* CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize);
void DestroyFont(void* pFont);
void setGraphicsTextMatrix(void* graphics, CFX_AffineMatrix* matrix);
FX_BOOL drawGraphicsString(void* graphics,
@@ -141,17 +141,17 @@ public:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL)
{
return FALSE;
}
- virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause)
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause)
{
return FALSE;
}
- virtual void CancelDIBits(FX_LPVOID handle) {}
+ virtual void CancelDIBits(void* handle) {}
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL);
@@ -239,10 +239,10 @@ private:
int _tableCount;
int _totalSize;
};
-uint32_t FX_GetHashCode( FX_LPCSTR pStr);
-FX_DWORD FX_IOSGetMatchFamilyNameHashcode(FX_LPCSTR pFontName);
+uint32_t FX_GetHashCode( const FX_CHAR* pStr);
+FX_DWORD FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName);
uint32_t FX_IOSGetFamilyNamesCount();
-FX_LPCSTR FX_IOSGetFamilyName( uint32_t uIndex);
+const FX_CHAR* FX_IOSGetFamilyName( uint32_t uIndex);
#endif
#endif // CORE_SRC_FXGE_APPLE_APPLE_INT_H_
diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp
index 75489ea2c3..a4ffd05928 100644
--- a/core/src/fxge/apple/fx_mac_imp.cpp
+++ b/core/src/fxge/apple/fx_mac_imp.cpp
@@ -8,8 +8,8 @@
#include "apple_int.h"
#if _FX_OS_ == _FX_MACOSX_
static const struct {
- FX_LPCSTR m_pName;
- FX_LPCSTR m_pSubstName;
+ const FX_CHAR* m_pName;
+ const FX_CHAR* m_pSubstName;
}
Base14Substs[] = {
{"Courier", "Courier New"},
@@ -28,7 +28,7 @@ Base14Substs[] = {
class CFX_MacFontInfo : public CFX_FolderFontInfo
{
public:
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact);
};
#define JAPAN_GOTHIC "Hiragino Kaku Gothic Pro W6"
#define JAPAN_MINCHO "Hiragino Mincho Pro W6"
@@ -44,7 +44,7 @@ static void GetJapanesePreference(CFX_ByteString& face, int weight, int picth_fa
face = JAPAN_MINCHO;
}
}
-void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR cstr_face, FX_BOOL& bExact)
+void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
{
CFX_ByteString face = cstr_face;
int iBaseFont;
@@ -57,7 +57,7 @@ void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pit
if (iBaseFont < 12) {
return GetFont(face);
}
- FX_LPVOID p;
+ void* p;
if (m_FontList.Lookup(face, p)) {
return p;
}
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index 6a97c7baf2..e10f1b5502 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -48,7 +48,7 @@ void CQuartz2D::destroyGraphics(void* graphics)
CGContextRelease((CGContextRef) graphics);
}
}
-void* CQuartz2D::CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize)
+void* CQuartz2D::CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize)
{
CGDataProviderRef pDataProvider = CGDataProviderCreateWithData(NULL, pFontData, (size_t)dwFontSize, NULL);
if (NULL == pDataProvider) {
@@ -541,7 +541,7 @@ FX_BOOL CFX_QuartzDeviceDriver::GetDIBits(CFX_DIBitmap* bitmap,
CGImageRelease(image);
if (bitmap->HasAlpha()) {
for (int row = 0; row < bitmap->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)bitmap->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)bitmap->GetScanline(row);
for (int col = 0; col < bitmap->GetWidth(); col ++) {
if (pScanline[3] > 0) {
pScanline[0] = (pScanline[0] * 255.f / pScanline[3] + .5f);
@@ -654,7 +654,7 @@ FX_BOOL CFX_QuartzDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap,
}
}
for (int row = 0; row < pBitmap1->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row);
for (int col = 0; col < pBitmap1->GetWidth(); col ++) {
pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f);
pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f);
@@ -779,7 +779,7 @@ FX_BOOL CFX_QuartzDeviceDriver::StretchDIBits(const CFX_DIBSource* pBitmap,
}
}
for (int row = 0; row < pBitmap1->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row);
for (int col = 0; col < pBitmap1->GetWidth(); col ++) {
pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f);
pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f);
diff --git a/core/src/fxge/dib/dib_int.h b/core/src/fxge/dib/dib_int.h
index c82a0378b8..9eeb0fddc0 100644
--- a/core/src/fxge/dib/dib_int.h
+++ b/core/src/fxge/dib/dib_int.h
@@ -54,7 +54,7 @@ public:
return (PixelWeight*)(m_pWeightTables + (pixel - m_DestMin) * m_ItemSize);
}
int m_DestMin, m_ItemSize;
- FX_LPBYTE m_pWeightTables;
+ uint8_t* m_pWeightTables;
};
class CStretchEngine
{
@@ -70,8 +70,8 @@ public:
IFX_ScanlineComposer* m_pDestBitmap;
int m_DestWidth, m_DestHeight;
FX_RECT m_DestClip;
- FX_LPBYTE m_pDestScanline;
- FX_LPBYTE m_pDestMaskScanline;
+ uint8_t* m_pDestScanline;
+ uint8_t* m_pDestMaskScanline;
FX_RECT m_SrcClip;
const CFX_DIBSource* m_pSource;
FX_DWORD* m_pSrcPalette;
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index 970325a2d4..aeee91bb4b 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -227,7 +227,7 @@ static _RGB _SetSat(_RGB color, int s)
}
return color;
}
-void _RGB_Blend(int blend_mode, FX_LPCBYTE src_scan, uint8_t* dest_scan, int results[3])
+void _RGB_Blend(int blend_mode, const uint8_t* src_scan, uint8_t* dest_scan, int results[3])
{
_RGB src, back, result;
src.red = src_scan[2];
@@ -254,7 +254,7 @@ void _RGB_Blend(int blend_mode, FX_LPCBYTE src_scan, uint8_t* dest_scan, int res
results[1] = result.green;
results[2] = result.red;
}
-inline void _CompositeRow_Argb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Argb2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, const uint8_t* clip_scan)
{
src_scan += 3;
for (int col = 0; col < pixel_count; col ++) {
@@ -272,7 +272,7 @@ inline void _CompositeRow_Argb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, in
src_scan += 4;
}
}
-void _CompositeRow_Rgba2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_alpha_scan, int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_Rgba2Mask(uint8_t* dest_scan, const uint8_t* src_alpha_scan, int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha = *src_alpha_scan++;
@@ -288,7 +288,7 @@ void _CompositeRow_Rgba2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_alpha_scan, int
dest_scan ++;
}
}
-void _CompositeRow_Rgb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan)
+void _CompositeRow_Rgb2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan)
{
if (clip_scan) {
for (int i = 0; i < width; i ++) {
@@ -300,8 +300,8 @@ void _CompositeRow_Rgb2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
FXSYS_memset8(dest_scan, 0xff, width);
}
}
-void _CompositeRow_Argb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, FX_LPBYTE dst_alpha_scan, void* pIccTransform)
+void _CompositeRow_Argb2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, uint8_t* dst_alpha_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
if (pIccTransform) {
@@ -493,9 +493,9 @@ void _CompositeRow_Argb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixe
src_scan += 4;
}
}
-inline void _CompositeRow_Argb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, void* pIccTransform)
+inline void _CompositeRow_Argb2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
uint8_t gray;
@@ -584,8 +584,8 @@ inline void _CompositeRow_Argb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, in
src_scan += 4;
}
}
-inline void _CompositeRow_Rgb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_Bpp, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
+inline void _CompositeRow_Rgb2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int src_Bpp, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
@@ -631,9 +631,9 @@ inline void _CompositeRow_Rgb2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int
src_scan += src_Bpp;
}
}
-void _CompositeRow_Rgb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_Bpp, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, void* pIccTransform)
+void _CompositeRow_Rgb2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int src_Bpp, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = NULL;
if (pIccTransform) {
@@ -721,8 +721,8 @@ void _CompositeRow_Rgb2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_B
src_scan += src_Bpp;
}
}
-void _CompositeRow_Argb2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan)
+void _CompositeRow_Argb2Argb(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -928,8 +928,8 @@ void _CompositeRow_Argb2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel
}
}
}
-void _CompositeRow_Rgb2Argb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_Rgb2Argb_Blend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp,
+ uint8_t* dest_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -989,8 +989,8 @@ void _CompositeRow_Rgb2Argb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_sca
}
}
}
-inline void _CompositeRow_Rgb2Argb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_Rgb2Argb_Blend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1067,8 +1067,8 @@ inline void _CompositeRow_Rgb2Argb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE sr
}
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_Rgb2Argb_NoBlend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int src_gap = src_Bpp - 3;
if (dest_alpha_scan == NULL) {
@@ -1129,8 +1129,8 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE
}
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp,
+ uint8_t* dest_alpha_scan)
{
if (dest_alpha_scan == NULL) {
for (int col = 0; col < width; col ++) {
@@ -1153,8 +1153,8 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYT
}
}
}
-inline void _CompositeRow_Argb2Rgb_Blend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_Argb2Rgb_Blend(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1214,8 +1214,8 @@ inline void _CompositeRow_Argb2Rgb_Blend(FX_LPBYTE dest_scan, FX_LPCBYTE src_sca
}
}
}
-inline void _CompositeRow_Argb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_Argb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
int dest_gap = dest_Bpp - 3;
if (src_alpha_scan == NULL) {
@@ -1276,7 +1276,7 @@ inline void _CompositeRow_Argb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_s
}
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_Blend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1299,7 +1299,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE s
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_Blend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -1328,7 +1328,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp)
{
if (dest_Bpp == src_Bpp) {
FXSYS_memcpy32(dest_scan, src_scan, width * dest_Bpp);
@@ -1342,7 +1342,7 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip(FX_LPBYTE dest_scan, FX_LPCBYTE
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
int src_alpha = clip_scan[col];
@@ -1366,10 +1366,10 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip(FX_LPBYTE dest_scan, FX_LPCBYTE s
src_scan += src_Bpp;
}
}
-void _CompositeRow_Argb2Argb_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+void _CompositeRow_Argb2Argb_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_alpha_scan) {
if (dest_alpha_scan == NULL) {
@@ -1451,14 +1451,14 @@ void _CompositeRow_Argb2Argb_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan,
}
_CompositeRow_Argb2Argb(dest_scan, src_cache_scan, pixel_count, blend_type, clip_scan, dest_alpha_scan, src_alpha_scan);
}
-void _CompositeRow_Rgb2Argb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+void _CompositeRow_Rgb2Argb_Blend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1467,14 +1467,14 @@ void _CompositeRow_Rgb2Argb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBY
}
_CompositeRow_Rgb2Argb_Blend_NoClip(dest_scan, src_cache_scan, width, blend_type, 3, dest_alpha_scan);
}
-inline void _CompositeRow_Rgb2Argb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Argb_Blend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1483,14 +1483,14 @@ inline void _CompositeRow_Rgb2Argb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_
}
_CompositeRow_Rgb2Argb_Blend_Clip(dest_scan, src_cache_scan, width, blend_type, 3, clip_scan, dest_alpha_scan);
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1499,14 +1499,14 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, F
}
_CompositeRow_Rgb2Argb_NoBlend_Clip(dest_scan, src_cache_scan, width, 3, clip_scan, dest_alpha_scan);
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp,
- FX_LPBYTE dest_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp,
+ uint8_t* dest_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1515,8 +1515,8 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan,
}
_CompositeRow_Rgb2Argb_NoBlend_NoClip(dest_scan, src_cache_scan, width, 3, dest_alpha_scan);
}
-inline void _CompositeRow_Argb2Rgb_Blend_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Argb2Rgb_Blend_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_alpha_scan) {
@@ -1556,8 +1556,8 @@ inline void _CompositeRow_Argb2Rgb_Blend_Transform(FX_LPBYTE dest_scan, FX_LPCBY
}
_CompositeRow_Argb2Rgb_Blend(dest_scan, src_cache_scan, width, blend_type, dest_Bpp, clip_scan, src_alpha_scan);
}
-inline void _CompositeRow_Argb2Rgb_NoBlend_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan, FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Argb2Rgb_NoBlend_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan, uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_alpha_scan) {
@@ -1596,14 +1596,14 @@ inline void _CompositeRow_Argb2Rgb_NoBlend_Transform(FX_LPBYTE dest_scan, FX_LPC
}
_CompositeRow_Argb2Rgb_NoBlend(dest_scan, src_cache_scan, width, dest_Bpp, clip_scan, src_alpha_scan);
}
-inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1612,14 +1612,14 @@ inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_Transform(FX_LPBYTE dest_scan, FX
}
_CompositeRow_Rgb2Rgb_Blend_NoClip(dest_scan, src_cache_scan, width, blend_type, dest_Bpp, 3);
}
-inline void _CompositeRow_Rgb2Rgb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_Blend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1628,14 +1628,14 @@ inline void _CompositeRow_Rgb2Rgb_Blend_Clip_Transform(FX_LPBYTE dest_scan, FX_L
}
_CompositeRow_Rgb2Rgb_Blend_Clip(dest_scan, src_cache_scan, width, blend_type, dest_Bpp, 3, clip_scan);
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1644,14 +1644,14 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_Transform(FX_LPBYTE dest_scan,
}
_CompositeRow_Rgb2Rgb_NoBlend_NoClip(dest_scan, src_cache_scan, width, dest_Bpp, 3);
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan,
- FX_LPBYTE src_cache_scan, void* pIccTransform)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_Transform(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan,
+ uint8_t* src_cache_scan, void* pIccTransform)
{
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (src_Bpp == 3) {
pIccModule->TranslateScanline(pIccTransform, src_cache_scan, src_scan, width);
} else {
- FX_LPBYTE dp = src_cache_scan;
+ uint8_t* dp = src_cache_scan;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dp, src_scan, 1);
src_scan += 4;
@@ -1660,9 +1660,9 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_Transform(FX_LPBYTE dest_scan, FX
}
_CompositeRow_Rgb2Rgb_NoBlend_Clip(dest_scan, src_cache_scan, width, dest_Bpp, 3, clip_scan);
}
-inline void _CompositeRow_8bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_LPCBYTE pPalette, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppPal2Gray(uint8_t* dest_scan, const uint8_t* src_scan, const uint8_t* pPalette, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
if (blend_type) {
@@ -1734,9 +1734,9 @@ inline void _CompositeRow_8bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan,
}
}
}
-inline void _CompositeRow_8bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_LPCBYTE pPalette, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppPal2Graya(uint8_t* dest_scan, const uint8_t* src_scan, const uint8_t* pPalette, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
if (blend_type) {
@@ -1866,8 +1866,8 @@ inline void _CompositeRow_8bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
}
}
}
-inline void _CompositeRow_1bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_LPCBYTE pPalette, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppPal2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ const uint8_t* pPalette, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
int reset_gray = pPalette[0];
int set_gray = pPalette[1];
@@ -1899,9 +1899,9 @@ inline void _CompositeRow_1bppPal2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan,
dest_scan ++;
}
}
-inline void _CompositeRow_1bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_LPCBYTE pPalette, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+inline void _CompositeRow_1bppPal2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ const uint8_t* pPalette, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int reset_gray = pPalette[0];
int set_gray = pPalette[1];
@@ -1955,9 +1955,9 @@ inline void _CompositeRow_1bppPal2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
dest_scan ++;
}
}
-inline void _CompositeRow_8bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_DWORD* pPalette, int pixel_count,
- int DestBpp, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppRgb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, FX_DWORD* pPalette, int pixel_count,
+ int DestBpp, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
int dest_gap = DestBpp - 3;
@@ -2019,8 +2019,8 @@ inline void _CompositeRow_8bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE sr
}
}
}
-inline void _CompositeRow_1bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_DWORD* pPalette, int pixel_count, int DestBpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ FX_DWORD* pPalette, int pixel_count, int DestBpp, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -2058,9 +2058,9 @@ inline void _CompositeRow_1bppRgb2Rgb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE sr
}
}
}
-inline void _CompositeRow_8bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_alpha_scan)
+inline void _CompositeRow_8bppRgb2Argb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan,
+ const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
for (int col = 0; col < width; col ++) {
@@ -2136,9 +2136,9 @@ inline void _CompositeRow_8bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE s
src_scan ++;
}
}
-void _CompositeRow_8bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan, FX_LPCBYTE src_alpha_scan)
+void _CompositeRow_8bppRgb2Rgba_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan)
{
if (src_alpha_scan) {
for (int col = 0; col < width; col ++) {
@@ -2216,8 +2216,8 @@ void _CompositeRow_8bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
src_scan ++;
}
}
-inline void _CompositeRow_1bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Argb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -2263,9 +2263,9 @@ inline void _CompositeRow_1bppRgb2Argb_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE s
dest_scan ++;
}
}
-void _CompositeRow_1bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width,
- FX_DWORD* pPalette, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_1bppRgb2Rgba_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width,
+ FX_DWORD* pPalette, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -2311,8 +2311,8 @@ void _CompositeRow_1bppRgb2Rgba_NoBlend(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan
dest_scan ++;
}
}
-void _CompositeRow_ByteMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Argb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2368,9 +2368,9 @@ void _CompositeRow_ByteMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan += 2;
}
}
-void _CompositeRow_ByteMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_ByteMask2Rgba(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2431,8 +2431,8 @@ void _CompositeRow_ByteMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
}
}
}
-void _CompositeRow_ByteMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Rgb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, int Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2476,8 +2476,8 @@ void _CompositeRow_ByteMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan += Bpp - 2;
}
}
-void _CompositeRow_ByteMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int pixel_count,
- FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int pixel_count,
+ const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2495,8 +2495,8 @@ void _CompositeRow_ByteMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan ++;
}
}
-void _CompositeRow_ByteMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2511,9 +2511,9 @@ void _CompositeRow_ByteMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan ++;
}
}
-void _CompositeRow_ByteMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int pixel_count, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_ByteMask2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int pixel_count, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -2540,8 +2540,8 @@ void _CompositeRow_ByteMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int
dest_scan ++;
}
}
-void _CompositeRow_BitMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Argb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
FX_ARGB argb = FXARGB_MAKE(0xff, src_r, src_g, src_b);
@@ -2607,9 +2607,9 @@ void _CompositeRow_BitMask2Argb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan += 2;
}
}
-void _CompositeRow_BitMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_BitMask2Rgba(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
for (int col = 0; col < pixel_count; col ++) {
@@ -2683,8 +2683,8 @@ void _CompositeRow_BitMask2Rgba(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
}
}
}
-void _CompositeRow_BitMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Rgb(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, int Bpp, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
for (int col = 0; col < pixel_count; col ++) {
@@ -2743,8 +2743,8 @@ void _CompositeRow_BitMask2Rgb(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mas
dest_scan += Bpp - 2;
}
}
-void _CompositeRow_BitMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_left,
- int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_left,
+ int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
if (!(src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8)))) {
@@ -2766,8 +2766,8 @@ void _CompositeRow_BitMask2Mask(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan ++;
}
}
-void _CompositeRow_BitMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int src_left, int pixel_count, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Gray(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int src_left, int pixel_count, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
if (!(src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8)))) {
@@ -2786,9 +2786,9 @@ void _CompositeRow_BitMask2Gray(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int ma
dest_scan ++;
}
}
-void _CompositeRow_BitMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_gray,
- int src_left, int pixel_count, FX_LPCBYTE clip_scan,
- FX_LPBYTE dest_alpha_scan)
+void _CompositeRow_BitMask2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_gray,
+ int src_left, int pixel_count, const uint8_t* clip_scan,
+ uint8_t* dest_alpha_scan)
{
for (int col = 0; col < pixel_count; col ++) {
if (!(src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8)))) {
@@ -2820,7 +2820,7 @@ void _CompositeRow_BitMask2Graya(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int m
dest_scan ++;
}
}
-void _CompositeRow_Argb2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_Argb2Argb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2877,7 +2877,7 @@ void _CompositeRow_Argb2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_sc
src_scan++;
}
}
-void _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp)
+void _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2914,7 +2914,7 @@ void _CompositeRow_Rgb2Argb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LP
src_scan += src_gap;
}
}
-inline void _CompositeRow_Argb2Rgb_Blend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Argb2Rgb_Blend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2949,7 +2949,7 @@ inline void _CompositeRow_Argb2Rgb_Blend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LP
src_scan ++;
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp)
+inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp)
{
for (int col = 0; col < width; col ++) {
if (src_Bpp == 4) {
@@ -2961,7 +2961,7 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_sc
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -2987,7 +2987,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan += src_gap;
}
}
-inline void _CompositeRow_Argb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Argb2Rgb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
uint8_t src_alpha;
@@ -3018,7 +3018,7 @@ inline void _CompositeRow_Argb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_
src_scan ++;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp)
{
for (int col = 0; col < width; col ++) {
dest_scan[2] = src_scan[0];
@@ -3028,7 +3028,7 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip_RgbByteOrder(FX_LPBYTE dest_sca
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_Rgb2Argb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Argb_Blend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int src_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -3072,7 +3072,7 @@ inline void _CompositeRow_Rgb2Argb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_Blend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int blend_type, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
int blended_colors[3];
FX_BOOL bNonseparableBlend = blend_type >= FXDIB_BLEND_NONSEPARABLE;
@@ -3104,7 +3104,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, F
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int src_Bpp, const uint8_t* clip_scan)
{
int src_gap = src_Bpp - 3;
for (int col = 0; col < width; col ++) {
@@ -3136,7 +3136,7 @@ inline void _CompositeRow_Rgb2Argb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan
src_scan += src_gap;
}
}
-inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, int dest_Bpp, int src_Bpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
int src_alpha = clip_scan[col];
@@ -3158,8 +3158,8 @@ inline void _CompositeRow_Rgb2Rgb_NoBlend_Clip_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan += src_Bpp;
}
}
-inline void _CompositeRow_8bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, FX_ARGB* pPalette, int pixel_count,
- int DestBpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_8bppRgb2Rgb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, FX_ARGB* pPalette, int pixel_count,
+ int DestBpp, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
FX_ARGB argb = pPalette ? pPalette[*src_scan] : (*src_scan) * 0x010101;
@@ -3179,8 +3179,8 @@ inline void _CompositeRow_8bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan ++;
}
}
-inline void _CompositeRow_1bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left,
- FX_ARGB* pPalette, int pixel_count, int DestBpp, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Rgb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int src_left,
+ FX_ARGB* pPalette, int pixel_count, int DestBpp, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -3218,8 +3218,8 @@ inline void _CompositeRow_1bppRgb2Rgb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
dest_scan += DestBpp;
}
}
-inline void _CompositeRow_8bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width,
- FX_ARGB* pPalette, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_8bppRgb2Argb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int width,
+ FX_ARGB* pPalette, const uint8_t* clip_scan)
{
for (int col = 0; col < width; col ++) {
int src_r, src_g, src_b;
@@ -3257,8 +3257,8 @@ inline void _CompositeRow_8bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
src_scan ++;
}
}
-inline void _CompositeRow_1bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width,
- FX_ARGB* pPalette, FX_LPCBYTE clip_scan)
+inline void _CompositeRow_1bppRgb2Argb_NoBlend_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width,
+ FX_ARGB* pPalette, const uint8_t* clip_scan)
{
int reset_r, reset_g, reset_b;
int set_r, set_g, set_b;
@@ -3307,8 +3307,8 @@ inline void _CompositeRow_1bppRgb2Argb_NoBlend_RgbByteOrder(FX_LPBYTE dest_scan,
dest_scan += 4;
}
}
-void _CompositeRow_ByteMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Argb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -3362,8 +3362,8 @@ void _CompositeRow_ByteMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE sr
dest_scan += 4;
}
}
-void _CompositeRow_ByteMask2Rgb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
- int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_ByteMask2Rgb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b, int pixel_count,
+ int blend_type, int Bpp, const uint8_t* clip_scan)
{
for (int col = 0; col < pixel_count; col ++) {
int src_alpha;
@@ -3405,8 +3405,8 @@ void _CompositeRow_ByteMask2Rgb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src
dest_scan += Bpp;
}
}
-void _CompositeRow_BitMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Argb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
FX_ARGB argb = FXARGB_MAKE(0xff, src_r, src_g, src_b);
@@ -3470,8 +3470,8 @@ void _CompositeRow_BitMask2Argb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src
dest_scan += 4;
}
}
-void _CompositeRow_BitMask2Rgb_RgbByteOrder(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int mask_alpha, int src_r, int src_g, int src_b,
- int src_left, int pixel_count, int blend_type, int Bpp, FX_LPCBYTE clip_scan)
+void _CompositeRow_BitMask2Rgb_RgbByteOrder(uint8_t* dest_scan, const uint8_t* src_scan, int mask_alpha, int src_r, int src_g, int src_b,
+ int src_left, int pixel_count, int blend_type, int Bpp, const uint8_t* clip_scan)
{
if (blend_type == FXDIB_BLEND_NORMAL && clip_scan == NULL && mask_alpha == 255) {
for (int col = 0; col < pixel_count; col ++) {
@@ -3554,7 +3554,7 @@ inline FX_BOOL _ScanlineCompositor_InitSourceMask(FXDIB_Format dest_format, int
if ((dest_format & 0xff) == 8) {
if (pIccTransform) {
mask_color = (alpha_flag >> 8) ? FXCMYK_TODIB(mask_color) : FXARGB_TODIB(mask_color);
- FX_LPBYTE gray_p = (FX_LPBYTE)&mask_color;
+ uint8_t* gray_p = (uint8_t*)&mask_color;
pIccModule->TranslateScanline(pIccTransform, gray_p, gray_p, 1);
mask_red = dest_format & 0x0400 ? FX_CCOLOR(gray_p[0]) : gray_p[0];
} else {
@@ -3571,7 +3571,7 @@ inline FX_BOOL _ScanlineCompositor_InitSourceMask(FXDIB_Format dest_format, int
}
}
} else {
- FX_LPBYTE mask_color_p = (FX_LPBYTE)&mask_color;
+ uint8_t* mask_color_p = (uint8_t*)&mask_color;
mask_color = (alpha_flag >> 8) ? FXCMYK_TODIB(mask_color) : FXARGB_TODIB(mask_color);
if (pIccTransform) {
pIccModule->TranslateScanline(pIccTransform, mask_color_p, mask_color_p, 1);
@@ -3600,11 +3600,11 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
if (pSrcPalette) {
if ((dest_format & 0xff) == 8) {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
pDestPalette = (FX_DWORD*)gray_pal;
for (int i = 0; i < pal_count; i ++) {
FX_DWORD color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) : FXARGB_TODIB(pSrcPalette[i]);
- pIccModule->TranslateScanline(pIccTransform, gray_pal, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, gray_pal, (const uint8_t*)&color, 1);
gray_pal ++;
}
} else {
@@ -3612,13 +3612,13 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
pDestPalette = FX_Alloc(FX_DWORD, palsize);
for (int i = 0; i < palsize; i ++) {
FX_DWORD color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) : FXARGB_TODIB(pSrcPalette[i]);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&color, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&color, (const uint8_t*)&color, 1);
pDestPalette[i] = isDstCmyk ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
}
}
} else {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
if (pal_count == 2) {
gray_pal[0] = 0;
gray_pal[1] = 255;
@@ -3633,7 +3633,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
} else {
pDestPalette = FX_Alloc(FX_DWORD, pal_count);
for (int i = 0; i < pal_count; i ++) {
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&pDestPalette[i], &gray_pal[i], 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&pDestPalette[i], &gray_pal[i], 1);
pDestPalette[i] = isDstCmyk ? FXCMYK_TODIB(pDestPalette[i]) : FXARGB_TODIB(pDestPalette[i]);
}
FX_Free(gray_pal);
@@ -3643,7 +3643,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
if (pSrcPalette) {
if ((dest_format & 0xff) == 8) {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
pDestPalette = (FX_DWORD*)gray_pal;
if (isSrcCmyk) {
for (int i = 0; i < pal_count; i ++) {
@@ -3676,7 +3676,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
} else {
if ((dest_format & 0xff) == 8) {
int pal_count = 1 << (src_format & 0xff);
- FX_LPBYTE gray_pal = FX_Alloc(uint8_t, pal_count);
+ uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count);
if (pal_count == 2) {
gray_pal[0] = 0;
gray_pal[1] = 255;
@@ -3774,8 +3774,8 @@ FX_BOOL CFX_ScanlineCompositor::Init(FXDIB_Format dest_format, FXDIB_Format src_
+ (pIccTransform ? 64 : 0);
return TRUE;
}
-void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositeRgbBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha, uint8_t* dst_extra_alpha)
{
int src_Bpp = (m_SrcFormat & 0xff) >> 3;
int dest_Bpp = (m_DestFormat & 0xff) >> 3;
@@ -3967,8 +3967,8 @@ void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB
}
}
}
-void CFX_ScanlineCompositor::CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositePalBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha, uint8_t* dst_extra_alpha)
{
if (m_bRgbByteOrder) {
if (m_SrcFormat == FXDIB_1bppRgb) {
@@ -3996,16 +3996,16 @@ void CFX_ScanlineCompositor::CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCB
} else if ((m_DestFormat & 0xff) == 8) {
if (m_Transparency & 8) {
if (m_DestFormat & 0x0200) {
- _CompositeRow_1bppPal2Graya(dest_scan, src_scan, src_left, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan, dst_extra_alpha);
+ _CompositeRow_1bppPal2Graya(dest_scan, src_scan, src_left, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan, dst_extra_alpha);
} else {
- _CompositeRow_1bppPal2Gray(dest_scan, src_scan, src_left, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan);
+ _CompositeRow_1bppPal2Gray(dest_scan, src_scan, src_left, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan);
}
} else {
if (m_DestFormat & 0x0200)
- _CompositeRow_8bppPal2Graya(dest_scan, src_scan, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan,
+ _CompositeRow_8bppPal2Graya(dest_scan, src_scan, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan,
dst_extra_alpha, src_extra_alpha);
else
- _CompositeRow_8bppPal2Gray(dest_scan, src_scan, (FX_LPCBYTE)m_pSrcPalette, width, m_BlendType, clip_scan,
+ _CompositeRow_8bppPal2Gray(dest_scan, src_scan, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan,
src_extra_alpha);
}
} else {
@@ -4036,8 +4036,8 @@ void CFX_ScanlineCompositor::CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCB
}
}
}
-void CFX_ScanlineCompositor::CompositeByteMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan,
- FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositeByteMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
+ uint8_t* dst_extra_alpha)
{
if (m_DestFormat == FXDIB_8bppMask) {
_CompositeRow_ByteMask2Mask(dest_scan, src_scan, m_MaskAlpha, width, clip_scan);
@@ -4065,8 +4065,8 @@ void CFX_ScanlineCompositor::CompositeByteMaskLine(FX_LPBYTE dest_scan, FX_LPCBY
_CompositeRow_ByteMask2Rgba(dest_scan, src_scan, m_MaskAlpha, m_MaskRed, m_MaskGreen, m_MaskBlue,
width, m_BlendType, clip_scan, dst_extra_alpha);
}
-void CFX_ScanlineCompositor::CompositeBitMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan,
- FX_LPBYTE dst_extra_alpha)
+void CFX_ScanlineCompositor::CompositeBitMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan,
+ uint8_t* dst_extra_alpha)
{
if (m_DestFormat == FXDIB_8bppMask) {
_CompositeRow_BitMask2Mask(dest_scan, src_scan, m_MaskAlpha, src_left, width, clip_scan);
@@ -4126,11 +4126,11 @@ FX_BOOL CFX_DIBitmap::CompositeBitmap(int dest_left, int dest_top, int width, in
FX_BOOL bRgb = src_Bpp > 1 && !pSrcBitmap->IsCmykImage();
CFX_DIBitmap* pSrcAlphaMask = pSrcBitmap->m_pAlphaMask;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * src_Bpp;
- FX_LPCBYTE src_scan_extra_alpha = pSrcAlphaMask ? pSrcAlphaMask->GetScanline(src_top + row) + src_left : NULL;
- FX_LPBYTE dst_scan_extra_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
- FX_LPCBYTE clip_scan = NULL;
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * dest_Bpp;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * src_Bpp;
+ const uint8_t* src_scan_extra_alpha = pSrcAlphaMask ? pSrcAlphaMask->GetScanline(src_top + row) + src_left : NULL;
+ uint8_t* dst_scan_extra_alpha = m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
+ const uint8_t* clip_scan = NULL;
if (pClipMask) {
clip_scan = pClipMask->m_pBuffer + (dest_top + row - clip_box.top) * pClipMask->m_Pitch + (dest_left - clip_box.left);
}
@@ -4176,10 +4176,10 @@ FX_BOOL CFX_DIBitmap::CompositeMask(int dest_left, int dest_top, int width, int
return FALSE;
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
- FX_LPCBYTE src_scan = pMask->GetScanline(src_top + row);
- FX_LPBYTE dst_scan_extra_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
- FX_LPCBYTE clip_scan = NULL;
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
+ const uint8_t* src_scan = pMask->GetScanline(src_top + row);
+ uint8_t* dst_scan_extra_alpha = m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(dest_top + row) + dest_left : NULL;
+ const uint8_t* clip_scan = NULL;
if (pClipMask) {
clip_scan = pClipMask->m_pBuffer + (dest_top + row - clip_box.top) * pClipMask->m_Pitch + (dest_left - clip_box.left);
}
@@ -4212,7 +4212,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
} else {
dst_color = FXARGB_TODIB(color);
}
- FX_LPBYTE color_p = (FX_LPBYTE)&dst_color;
+ uint8_t* color_p = (uint8_t*)&dst_color;
if (m_bpp == 8) {
uint8_t gray = 255;
if (!IsAlphaMask()) {
@@ -4234,7 +4234,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
}
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + row * m_Pitch + rect.left;
+ uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left;
if (src_alpha == 255) {
FXSYS_memset8(dest_scan, gray, width);
} else
@@ -4305,8 +4305,8 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
FX_BOOL bArgb = GetFormat() == FXDIB_Argb ? TRUE : FALSE;
if (src_alpha == 255) {
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
- FX_LPBYTE dest_scan_alpha = m_pAlphaMask ? (FX_LPBYTE)m_pAlphaMask->GetScanline(row) + rect.left : NULL;
+ uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
+ uint8_t* dest_scan_alpha = m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(row) + rect.left : NULL;
if (dest_scan_alpha) {
FXSYS_memset8(dest_scan_alpha, 0xff, width);
}
@@ -4326,7 +4326,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
return TRUE;
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
+ uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
if (bAlpha) {
if (bArgb) {
for (int col = 0; col < width; col ++) {
@@ -4347,7 +4347,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
*dest_scan++ = dest_alpha;
}
} else {
- FX_LPBYTE dest_scan_alpha = (FX_LPBYTE)m_pAlphaMask->GetScanline(row) + rect.left;
+ uint8_t* dest_scan_alpha = (uint8_t*)m_pAlphaMask->GetScanline(row) + rect.left;
for (int col = 0; col < width; col ++) {
uint8_t back_alpha = *dest_scan_alpha;
if (back_alpha == 0) {
@@ -4448,8 +4448,8 @@ FX_BOOL CFX_BitmapComposer::SetInfo(int width, int height, FXDIB_Format src_form
}
return TRUE;
}
-void CFX_BitmapComposer::DoCompose(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int dest_width, FX_LPCBYTE clip_scan,
- FX_LPCBYTE src_extra_alpha, FX_LPBYTE dst_extra_alpha)
+void CFX_BitmapComposer::DoCompose(uint8_t* dest_scan, const uint8_t* src_scan, int dest_width, const uint8_t* clip_scan,
+ const uint8_t* src_extra_alpha, uint8_t* dst_extra_alpha)
{
if (m_BitmapAlpha < 255) {
if (clip_scan) {
@@ -4469,31 +4469,31 @@ void CFX_BitmapComposer::DoCompose(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int
m_Compositor.CompositeRgbBitmapLine(dest_scan, src_scan, dest_width, clip_scan, src_extra_alpha, dst_extra_alpha);
}
}
-void CFX_BitmapComposer::ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha)
+void CFX_BitmapComposer::ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha)
{
if (m_bVertical) {
ComposeScanlineV(line, scanline, scan_extra_alpha);
return;
}
- FX_LPCBYTE clip_scan = NULL;
+ const uint8_t* clip_scan = NULL;
if (m_pClipMask)
clip_scan = m_pClipMask->GetBuffer() + (m_DestTop + line - m_pClipRgn->GetBox().top) *
m_pClipMask->GetPitch() + (m_DestLeft - m_pClipRgn->GetBox().left);
- FX_LPBYTE dest_scan = (FX_LPBYTE)m_pBitmap->GetScanline(line + m_DestTop) +
+ uint8_t* dest_scan = (uint8_t*)m_pBitmap->GetScanline(line + m_DestTop) +
m_DestLeft * m_pBitmap->GetBPP() / 8;
- FX_LPBYTE dest_alpha_scan = m_pBitmap->m_pAlphaMask ?
- (FX_LPBYTE)m_pBitmap->m_pAlphaMask->GetScanline(line + m_DestTop) + m_DestLeft : NULL;
+ uint8_t* dest_alpha_scan = m_pBitmap->m_pAlphaMask ?
+ (uint8_t*)m_pBitmap->m_pAlphaMask->GetScanline(line + m_DestTop) + m_DestLeft : NULL;
DoCompose(dest_scan, scanline, m_DestWidth, clip_scan, scan_extra_alpha, dest_alpha_scan);
}
-void CFX_BitmapComposer::ComposeScanlineV(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha)
+void CFX_BitmapComposer::ComposeScanlineV(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha)
{
int i;
int Bpp = m_pBitmap->GetBPP() / 8;
int dest_pitch = m_pBitmap->GetPitch();
int dest_alpha_pitch = m_pBitmap->m_pAlphaMask ? m_pBitmap->m_pAlphaMask->GetPitch() : 0;
int dest_x = m_DestLeft + (m_bFlipX ? (m_DestWidth - line - 1) : line);
- FX_LPBYTE dest_buf = m_pBitmap->GetBuffer() + dest_x * Bpp + m_DestTop * dest_pitch;
- FX_LPBYTE dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
+ uint8_t* dest_buf = m_pBitmap->GetBuffer() + dest_x * Bpp + m_DestTop * dest_pitch;
+ uint8_t* dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
m_pBitmap->m_pAlphaMask->GetBuffer() + dest_x + m_DestTop * dest_alpha_pitch : NULL;
if (m_bFlipY) {
dest_buf += dest_pitch * (m_DestHeight - 1);
@@ -4505,27 +4505,27 @@ void CFX_BitmapComposer::ComposeScanlineV(int line, FX_LPCBYTE scanline, FX_LPCB
y_step = -y_step;
y_alpha_step = -y_alpha_step;
}
- FX_LPBYTE src_scan = m_pScanlineV;
- FX_LPBYTE dest_scan = dest_buf;
+ uint8_t* src_scan = m_pScanlineV;
+ uint8_t* dest_scan = dest_buf;
for (i = 0; i < m_DestHeight; i ++) {
for (int j = 0; j < Bpp; j ++) {
*src_scan++ = dest_scan[j];
}
dest_scan += y_step;
}
- FX_LPBYTE src_alpha_scan = m_pScanlineAlphaV;
- FX_LPBYTE dest_alpha_scan = dest_alpha_buf;
+ uint8_t* src_alpha_scan = m_pScanlineAlphaV;
+ uint8_t* dest_alpha_scan = dest_alpha_buf;
if (dest_alpha_scan) {
for (i = 0; i < m_DestHeight; i ++) {
*src_alpha_scan++ = *dest_alpha_scan;
dest_alpha_scan += y_alpha_step;
}
}
- FX_LPBYTE clip_scan = NULL;
+ uint8_t* clip_scan = NULL;
if (m_pClipMask) {
clip_scan = m_pClipScanV;
int clip_pitch = m_pClipMask->GetPitch();
- FX_LPCBYTE src_clip = m_pClipMask->GetBuffer() + (m_DestTop - m_pClipRgn->GetBox().top) *
+ const uint8_t* src_clip = m_pClipMask->GetBuffer() + (m_DestTop - m_pClipRgn->GetBox().top) *
clip_pitch + (dest_x - m_pClipRgn->GetBox().left);
if (m_bFlipY) {
src_clip += clip_pitch * (m_DestHeight - 1);
diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp
index 0f866a7cc7..c8de6cae7c 100644
--- a/core/src/fxge/dib/fx_dib_convert.cpp
+++ b/core/src/fxge/dib/fx_dib_convert.cpp
@@ -279,16 +279,16 @@ FX_BOOL CFX_Palette::BuildPalette(const CFX_DIBSource* pBitmap, int pal_type)
_Obtain_Pal(m_aLut, m_cLut, m_pPalette, pal_type, win_mac_pal, m_lut);
return TRUE;
}
-FX_BOOL _ConvertBuffer_1bppMask2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppMask2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
uint8_t set_gray, reset_gray;
set_gray = 0xff;
reset_gray = 0x00;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memset8(dest_scan, reset_gray, width);
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ 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))) {
*dest_scan = set_gray;
@@ -298,17 +298,17 @@ FX_BOOL _ConvertBuffer_1bppMask2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wid
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppMask2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppMask2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
FXSYS_memcpy32(dest_scan, src_scan, width);
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppPlt2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
@@ -319,7 +319,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
plt[0] = FXCMYK_TODIB(src_plt[0]);
plt[1] = FXCMYK_TODIB(src_plt[1]);
} else {
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
bgr_ptr[0] = FXARGB_B(src_plt[0]);
bgr_ptr[1] = FXARGB_G(src_plt[0]);
bgr_ptr[2] = FXARGB_R(src_plt[0]);
@@ -328,7 +328,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
bgr_ptr[5] = FXARGB_R(src_plt[1]);
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, gray, (FX_LPCBYTE)plt, 2);
+ pIccModule->TranslateScanline(pIccTransform, gray, (const uint8_t*)plt, 2);
} else {
uint8_t reset_r, reset_g, reset_b,
set_r, set_g, set_b;
@@ -349,9 +349,9 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
gray[1] = FXRGB2GRAY(set_r, set_g, set_b);
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memset8(dest_scan, gray[0], width);
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ 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))) {
*dest_scan = gray[1];
@@ -361,7 +361,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppPlt2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
@@ -373,7 +373,7 @@ FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
plt[i] = FXCMYK_TODIB(src_plt[i]);
}
} else {
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
for (int i = 0; i < 256; i ++) {
*bgr_ptr++ = FXARGB_B(src_plt[i]);
*bgr_ptr++ = FXARGB_G(src_plt[i]);
@@ -381,7 +381,7 @@ FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
}
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, gray, (FX_LPCBYTE)plt, 256);
+ pIccModule->TranslateScanline(pIccTransform, gray, (const uint8_t*)plt, 256);
} else {
if (pSrcBitmap->IsCmykImage()) {
uint8_t r, g, b;
@@ -396,15 +396,15 @@ FX_BOOL _ConvertBuffer_8bppPlt2Gray(FX_LPBYTE dest_buf, int dest_pitch, int widt
}
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
for (int col = 0; col < width; col ++) {
*dest_scan++ = gray[*src_scan++];
}
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int Bpp = pSrcBitmap->GetBPP() / 8;
@@ -412,14 +412,14 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
if (Bpp == 3 || pSrcBitmap->IsCmykImage()) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, width);
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, 1);
dest_scan++;
@@ -430,8 +430,8 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
} else {
if (pSrcBitmap->IsCmykImage()) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
uint8_t r, g, b;
AdobeCMYK_to_sRGB1(FXSYS_GetCValue((FX_DWORD)src_scan[0]), FXSYS_GetMValue((FX_DWORD)src_scan[1]), FXSYS_GetYValue((FX_DWORD)src_scan[2]), FXSYS_GetKValue((FX_DWORD)src_scan[3]),
@@ -442,8 +442,8 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
for (int col = 0; col < width; col ++) {
*dest_scan++ = FXRGB2GRAY(src_scan[2], src_scan[1], src_scan[0]);
src_scan += Bpp;
@@ -453,14 +453,14 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi
}
return TRUE;
}
-inline void _ConvertBuffer_IndexCopy(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+inline void _ConvertBuffer_IndexCopy(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
if (pSrcBitmap->GetBPP() == 1) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memset32(dest_scan, 0, width);
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ 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))) {
*dest_scan = 1;
@@ -470,13 +470,13 @@ inline void _ConvertBuffer_IndexCopy(FX_LPBYTE dest_buf, int dest_pitch, int wid
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
FXSYS_memcpy32(dest_scan, src_scan, width);
}
}
}
-FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_Plt2PltRgb8(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD* dst_plt, void* pIccTransform)
{
_ConvertBuffer_IndexCopy(dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top);
@@ -484,7 +484,7 @@ FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
int plt_size = pSrcBitmap->GetPaletteSize();
if (pIccTransform) {
FX_DWORD plt[256];
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
if (pSrcBitmap->IsCmykImage()) {
for (int i = 0; i < plt_size; i ++) {
plt[i] = FXCMYK_TODIB(src_plt[i]);
@@ -495,10 +495,10 @@ FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
*bgr_ptr++ = FXARGB_G(src_plt[i]);
*bgr_ptr++ = FXARGB_R(src_plt[i]);
}
- bgr_ptr = (FX_LPBYTE)plt;
+ bgr_ptr = (uint8_t*)plt;
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)plt, (FX_LPCBYTE)plt, plt_size);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)plt, (const uint8_t*)plt, plt_size);
for (int i = 0; i < plt_size; i ++) {
dst_plt[i] = FXARGB_MAKE(0xff, bgr_ptr[2], bgr_ptr[1], bgr_ptr[0]);
bgr_ptr += 3;
@@ -517,7 +517,7 @@ FX_BOOL _ConvertBuffer_Plt2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
}
return TRUE;
}
-inline FX_BOOL _ConvertBuffer_Rgb2PltRgb8_NoTransform(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+inline FX_BOOL _ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD* dst_plt)
{
int bpp = pSrcBitmap->GetBPP() / 8;
@@ -573,7 +573,7 @@ inline FX_BOOL _ConvertBuffer_Rgb2PltRgb8_NoTransform(FX_LPBYTE dest_buf, int de
FXSYS_memcpy32(dst_plt, pPalette, sizeof(FX_DWORD) * 256);
return TRUE;
}
-FX_BOOL _ConvertBuffer_Rgb2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD* dst_plt, void* pIccTransform)
{
FX_BOOL ret = _ConvertBuffer_Rgb2PltRgb8_NoTransform(dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, dst_plt);
@@ -582,13 +582,13 @@ FX_BOOL _ConvertBuffer_Rgb2PltRgb8(FX_LPBYTE dest_buf, int dest_pitch, int width
for (int i = 0; i < 256; i++) {
FX_ARGB* plt = dst_plt + i;
FX_ARGB plt_entry = FXARGB_TODIB(*plt);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&plt_entry, (FX_LPCBYTE)&plt_entry, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&plt_entry, (const uint8_t*)&plt_entry, 1);
*plt = FXARGB_TODIB(plt_entry);
}
}
return ret;
}
-FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
int comps = (dst_format & 0xff) / 8;
@@ -596,8 +596,8 @@ FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
set_gray = 0xff;
reset_gray = 0x00;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ 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))) {
dest_scan[0] = set_gray;
@@ -613,13 +613,13 @@ FX_BOOL _ConvertBuffer_1bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppMask2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top)
{
int comps = (dst_format & 0xff) / 8;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
uint8_t src_pixel;
for (int col = 0; col < width; col ++) {
src_pixel = *src_scan++;
@@ -631,13 +631,13 @@ FX_BOOL _ConvertBuffer_8bppMask2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int comps = (dst_format & 0xff) / 8;
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
FX_DWORD plt[2];
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
if (pSrcBitmap->IsCmykImage()) {
plt[0] = FXCMYK_TODIB(src_plt[0]);
plt[1] = FXCMYK_TODIB(src_plt[1]);
@@ -651,7 +651,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)plt, (FX_LPCBYTE)plt, 2);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)plt, (const uint8_t*)plt, 2);
} else {
if (pSrcBitmap->IsCmykImage()) {
AdobeCMYK_to_sRGB1(FXSYS_GetCValue(src_plt[0]), FXSYS_GetMValue(src_plt[0]), FXSYS_GetYValue(src_plt[0]), FXSYS_GetKValue(src_plt[0]),
@@ -661,8 +661,8 @@ FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ 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))) {
*dest_scan++ = bgr_ptr[3];
@@ -678,20 +678,20 @@ FX_BOOL _ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int comps = (dst_format & 0xff) / 8;
FX_DWORD* src_plt = pSrcBitmap->GetPalette();
FX_DWORD plt[256];
- FX_LPBYTE bgr_ptr = (FX_LPBYTE)plt;
+ uint8_t* bgr_ptr = (uint8_t*)plt;
if (!pSrcBitmap->IsCmykImage()) {
for (int i = 0; i < 256; i++) {
*bgr_ptr++ = FXARGB_B(src_plt[i]);
*bgr_ptr++ = FXARGB_G(src_plt[i]);
*bgr_ptr++ = FXARGB_R(src_plt[i]);
}
- bgr_ptr = (FX_LPBYTE)plt;
+ bgr_ptr = (uint8_t*)plt;
}
if (pIccTransform) {
if (pSrcBitmap->IsCmykImage()) {
@@ -700,7 +700,7 @@ FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
}
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)plt, (FX_LPCBYTE)plt, 256);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)plt, (const uint8_t*)plt, 256);
} else {
if (pSrcBitmap->IsCmykImage()) {
for (int i = 0; i < 256; i++) {
@@ -708,14 +708,14 @@ FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
bgr_ptr[2], bgr_ptr[1], bgr_ptr[0]);
bgr_ptr += 3;
}
- bgr_ptr = (FX_LPBYTE)plt;
+ bgr_ptr = (uint8_t*)plt;
}
}
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
for (int col = 0; col < width; col ++) {
- FX_LPBYTE src_pixel = bgr_ptr + 3 * (*src_scan++);
+ uint8_t* src_pixel = bgr_ptr + 3 * (*src_scan++);
*dest_scan++ = *src_pixel++;
*dest_scan++ = *src_pixel++;
*dest_scan = *src_pixel++;
@@ -724,31 +724,31 @@ FX_BOOL _ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, FX_LPBYTE dest_buf,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_24bppRgb2Rgb24(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_24bppRgb2Rgb24(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, width);
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
FXSYS_memcpy32(dest_scan, src_scan, width * 3);
}
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_32bppRgb2Rgb24(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_32bppRgb2Rgb24(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
*dest_scan++ = *src_scan++;
*dest_scan++ = *src_scan++;
@@ -759,21 +759,21 @@ FX_BOOL _ConvertBuffer_32bppRgb2Rgb24(FX_LPBYTE dest_buf, int dest_pitch, int wi
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
pIccModule->TranslateScanline(pIccTransform, dest_scan, dest_scan, width);
}
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_Rgb2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_Rgb2Rgb32(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
int comps = pSrcBitmap->GetBPP() / 8;
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, 1);
dest_scan += 4;
@@ -782,8 +782,8 @@ FX_BOOL _ConvertBuffer_Rgb2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width,
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * comps;
for (int col = 0; col < width; col ++) {
*dest_scan++ = *src_scan++;
*dest_scan++ = *src_scan++;
@@ -795,14 +795,14 @@ FX_BOOL _ConvertBuffer_Rgb2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width,
}
return TRUE;
}
-FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform)
{
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
pIccModule->TranslateScanline(pIccTransform, dest_scan, src_scan, 1);
dest_scan += 4;
@@ -811,8 +811,8 @@ FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int w
}
} else {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * 4;
for (int col = 0; col < width; col ++) {
AdobeCMYK_to_sRGB1(src_scan[0], src_scan[1], src_scan[2], src_scan[3],
dest_scan[2], dest_scan[1], dest_scan[0]);
@@ -823,7 +823,7 @@ FX_BOOL _ConvertBuffer_32bppCmyk2Rgb32(FX_LPBYTE dest_buf, int dest_pitch, int w
}
return TRUE;
}
-FX_BOOL ConvertBuffer(FXDIB_Format dest_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL ConvertBuffer(FXDIB_Format dest_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD*& d_pal, void* pIccTransform)
{
FXDIB_Format src_format = pSrcBitmap->GetFormat();
@@ -986,7 +986,7 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, void* pIccTransfor
if (dest_format == FXDIB_Argb && src_format == FXDIB_Rgb32 && pIccTransform == NULL) {
m_AlphaFlag = 2;
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch + 3;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch + 3;
for (int col = 0; col < m_Width; col ++) {
*scanline = 0xff;
scanline += 4;
@@ -996,7 +996,7 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, void* pIccTransfor
}
int dest_bpp = dest_format & 0xff;
int dest_pitch = (dest_bpp * m_Width + 31) / 32 * 4;
- FX_LPBYTE dest_buf = FX_TryAlloc(uint8_t, dest_pitch * m_Height + 4);
+ uint8_t* dest_buf = FX_TryAlloc(uint8_t, dest_pitch * m_Height + 4);
if (dest_buf == NULL) {
return FALSE;
}
@@ -1005,8 +1005,8 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, void* pIccTransfor
FXSYS_memset8(dest_buf, 0xff, dest_pitch * m_Height + 4);
if (m_pAlphaMask) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE pDstScanline = dest_buf + row * dest_pitch + 3;
- FX_LPCBYTE pSrcScanline = m_pAlphaMask->GetScanline(row);
+ uint8_t* pDstScanline = dest_buf + row * dest_pitch + 3;
+ const uint8_t* pSrcScanline = m_pAlphaMask->GetScanline(row);
for (int col = 0; col < m_Width; col ++) {
*pDstScanline = *pSrcScanline++;
pDstScanline += 4;
diff --git a/core/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp
index f52c30e95a..be39e35ce0 100644
--- a/core/src/fxge/dib/fx_dib_engine.cpp
+++ b/core/src/fxge/dib/fx_dib_engine.cpp
@@ -350,10 +350,10 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
rows_to_go = FX_STRECH_PAUSE_ROWS;
}
}
- FX_LPCBYTE src_scan = m_pSource->GetScanline(m_CurRow);
- FX_LPBYTE dest_scan = m_pInterBuf + (m_CurRow - m_SrcClip.top) * m_InterPitch;
- FX_LPCBYTE src_scan_mask = NULL;
- FX_LPBYTE dest_scan_mask = NULL;
+ const uint8_t* src_scan = m_pSource->GetScanline(m_CurRow);
+ uint8_t* dest_scan = m_pInterBuf + (m_CurRow - m_SrcClip.top) * m_InterPitch;
+ const uint8_t* src_scan_mask = NULL;
+ uint8_t* dest_scan_mask = NULL;
if (m_pExtraAlphaBuf) {
src_scan_mask = m_pSource->m_pAlphaMask->GetScanline(m_CurRow);
dest_scan_mask = m_pExtraAlphaBuf + (m_CurRow - m_SrcClip.top) * m_ExtraMaskPitch;
@@ -477,7 +477,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * Bpp;
+ const uint8_t* src_pixel = src_scan + j * Bpp;
dest_b_c += pixel_weight * (*src_pixel++);
dest_g_m += pixel_weight * (*src_pixel++);
dest_r_y += pixel_weight * (*src_pixel);
@@ -500,7 +500,7 @@ FX_BOOL CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause)
int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + j * Bpp;
+ const uint8_t* src_pixel = src_scan + j * Bpp;
if (m_DestFormat == FXDIB_Argb) {
pixel_weight = pixel_weight * src_pixel[3] / 255;
} else {
@@ -596,7 +596,7 @@ void CStretchEngine::StretchVert()
int dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
+ const uint8_t* src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
dest_b_c += pixel_weight * (*src_pixel++);
dest_g_m += pixel_weight * (*src_pixel++);
dest_r_y += pixel_weight * (*src_pixel);
@@ -624,7 +624,7 @@ void CStretchEngine::StretchVert()
int dest_a = 0, dest_r_y = 0, dest_g_m = 0, dest_b_c = 0;
for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
- FX_LPCBYTE src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
+ const uint8_t* src_pixel = src_scan + (j - m_SrcClip.top) * m_InterPitch;
int mask_v = 255;
if (src_scan_mask) {
mask_v = src_scan_mask[(j - m_SrcClip.top) * m_ExtraMaskPitch];
diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index f02dd6e382..ddbe554a04 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -9,7 +9,7 @@
#include "../../../include/fxcodec/fx_codec.h"
#include "dib_int.h"
#include <limits.h>
-FX_BOOL ConvertBuffer(FXDIB_Format dest_format, FX_LPBYTE dest_buf, int dest_pitch, int width, int height,
+FX_BOOL ConvertBuffer(FXDIB_Format dest_format, uint8_t* dest_buf, int dest_pitch, int width, int height,
const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, FX_DWORD*& pal, void* pIccTransform);
void CmykDecode(FX_DWORD cmyk, int& c, int& m, int& y, int& k)
{
@@ -59,7 +59,7 @@ CFX_DIBitmap::CFX_DIBitmap()
m_pPalette = NULL;
}
#define _MAX_OOM_LIMIT_ 12000000
-FX_BOOL CFX_DIBitmap::Create(int width, int height, FXDIB_Format format, FX_LPBYTE pBuffer, int pitch)
+FX_BOOL CFX_DIBitmap::Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer, int pitch)
{
m_pBuffer = NULL;
m_bpp = (uint8_t)format;
@@ -188,8 +188,8 @@ CFX_DIBitmap* CFX_DIBSource::Clone(const FX_RECT* pClip) const
copy_len = m_Pitch;
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row) + rect.left * m_bpp / 8;
- FX_LPBYTE dest_scan = (FX_LPBYTE)pNewBitmap->GetScanline(row - rect.top);
+ const uint8_t* src_scan = GetScanline(row) + rect.left * m_bpp / 8;
+ uint8_t* dest_scan = (uint8_t*)pNewBitmap->GetScanline(row - rect.top);
FXSYS_memcpy32(dest_scan, src_scan, copy_len);
}
}
@@ -386,8 +386,8 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
if (dest_format == src_format && pIccTransform == NULL) {
if (GetBPP() == 1) {
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row);
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = 0; col < width; col ++) {
if (src_scan[(src_left + col) / 8] & (1 << (7 - (src_left + col) % 8))) {
dest_scan[(dest_left + col) / 8] |= 1 << (7 - (dest_left + col) % 8);
@@ -399,8 +399,8 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
} else {
int Bpp = GetBPP() / 8;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
- FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
+ uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
+ const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
FXSYS_memcpy32(dest_scan, src_scan, width * Bpp);
}
}
@@ -411,7 +411,7 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
if (m_bpp == 8) {
dest_format = FXDIB_8bppMask;
}
- FX_LPBYTE dest_buf = m_pBuffer + dest_top * m_Pitch + dest_left * GetBPP() / 8;
+ uint8_t* dest_buf = m_pBuffer + dest_top * m_Pitch + dest_left * GetBPP() / 8;
FX_DWORD* d_plt = NULL;
if(!ConvertBuffer(dest_format, dest_buf, m_Pitch, width, height, pSrcBitmap, src_left, src_top, d_plt, pIccTransform)) {
return FALSE;
@@ -444,7 +444,7 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
alpha = FXARGB_A(color);
dst_color = FXARGB_TODIB(color);
}
- FX_LPBYTE color_p = (FX_LPBYTE)&dst_color;
+ uint8_t* color_p = (uint8_t*)&dst_color;
if (pIccTransform && CFX_GEModule::Get()->GetCodecModule() && CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
pIccModule->TranslateScanline(pIccTransform, color_p, color_p, 1);
@@ -462,7 +462,7 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
if (GetFormat() == FXDIB_Argb) {
for (int row = 0; row < height; row ++) {
FX_DWORD* dest_pos = (FX_DWORD*)(m_pBuffer + (dest_top + row) * m_Pitch + dest_left * 4);
- FX_LPCBYTE src_scan = pMask->GetScanline(src_top + row);
+ const uint8_t* src_scan = pMask->GetScanline(src_top + row);
if (src_bpp == 1) {
for (int col = 0; col < width; col ++) {
int src_bitpos = src_left + col;
@@ -485,9 +485,9 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
} else {
int comps = m_bpp / 8;
for (int row = 0; row < height; row ++) {
- FX_LPBYTE dest_color_pos = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * comps;
- FX_LPBYTE dest_alpha_pos = (FX_LPBYTE)m_pAlphaMask->GetScanline(dest_top + row) + dest_left;
- FX_LPCBYTE src_scan = pMask->GetScanline(src_top + row);
+ uint8_t* dest_color_pos = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * comps;
+ uint8_t* dest_alpha_pos = (uint8_t*)m_pAlphaMask->GetScanline(dest_top + row) + dest_left;
+ const uint8_t* src_scan = pMask->GetScanline(src_top + row);
if (src_bpp == 1) {
for (int col = 0; col < width; col ++) {
int src_bitpos = src_left + col;
@@ -565,8 +565,8 @@ CFX_DIBitmap* CFX_DIBSource::GetAlphaMask(const FX_RECT* pClip) const
return NULL;
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row) + rect.left * 4 + 3;
- FX_LPBYTE dest_scan = (FX_LPBYTE)pMask->GetScanline(row - rect.top);
+ const uint8_t* src_scan = GetScanline(row) + rect.left * 4 + 3;
+ uint8_t* dest_scan = (uint8_t*)pMask->GetScanline(row - rect.top);
for (int col = rect.left; col < rect.right; col ++) {
*dest_scan ++ = *src_scan;
src_scan += 4;
@@ -725,8 +725,8 @@ FX_BOOL CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel, const CFX_DIBSource
int srcBytes = pSrcClone->GetBPP() / 8;
int destBytes = pDst->GetBPP() / 8;
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_pos = (FX_LPBYTE)pDst->GetScanline(row) + destOffset;
- FX_LPCBYTE src_pos = pSrcClone->GetScanline(row) + srcOffset;
+ uint8_t* dest_pos = (uint8_t*)pDst->GetScanline(row) + destOffset;
+ const uint8_t* src_pos = pSrcClone->GetScanline(row) + srcOffset;
for (int col = 0; col < m_Width; col ++) {
*dest_pos = *src_pos;
dest_pos += destBytes;
@@ -791,7 +791,7 @@ FX_BOOL CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel, int value)
return TRUE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scan_line = m_pBuffer + row * m_Pitch + destOffset;
+ uint8_t* scan_line = m_pBuffer + row * m_Pitch + destOffset;
for (int col = 0; col < m_Width; col ++) {
*scan_line = value;
scan_line += Bpp;
@@ -827,8 +827,8 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(const CFX_DIBSource* pSrcBitmap)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + m_Pitch * row;
- FX_LPBYTE src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
+ uint8_t* dest_scan = m_pBuffer + m_Pitch * row;
+ uint8_t* src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
if (pSrcClone->GetBPP() == 1) {
for (int col = 0; col < m_Width; col ++) {
if (!((1 << (7 - col % 8)) & src_scan[col / 8])) {
@@ -851,8 +851,8 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(const CFX_DIBSource* pSrcBitmap)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_scan = m_pBuffer + m_Pitch * row + 3;
- FX_LPBYTE src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
+ uint8_t* dest_scan = m_pBuffer + m_Pitch * row + 3;
+ uint8_t* src_scan = pSrcClone->m_pBuffer + pSrcClone->m_Pitch * row;
for (int col = 0; col < m_Width; col ++) {
*dest_scan = (*dest_scan) * src_scan[col] / 255;
dest_scan += 4;
@@ -891,8 +891,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
}
FXSYS_memset8(pMask->GetBuffer(), gray[0], pMask->GetPitch() * m_Height);
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
- FX_LPBYTE dest_pos = (FX_LPBYTE)pMask->GetScanline(row);
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = (uint8_t*)pMask->GetScanline(row);
for (int col = 0; col < m_Width; col ++) {
if (src_pos[col / 8] & (1 << (7 - col % 8))) {
*dest_pos = gray[1];
@@ -921,8 +921,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
*dest_pos ++ = gray[*src_pos ++];
}
@@ -938,8 +938,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
- FX_LPBYTE dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
for (int col = 0; col < m_Width; col ++) {
*dest_pos ++ = FXRGB2GRAY(src_pos[2], src_pos[1], *src_pos);
src_pos += 3;
@@ -956,8 +956,8 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
return FALSE;
}
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE src_pos = m_pBuffer + row * m_Pitch;
- FX_LPBYTE dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
+ uint8_t* src_pos = m_pBuffer + row * m_Pitch;
+ uint8_t* dest_pos = pMask->GetBuffer() + row * pMask->GetPitch();
for (int col = 0; col < m_Width; col ++) {
*dest_pos ++ = FXRGB2GRAY(src_pos[2], src_pos[1], *src_pos);
src_pos += 4;
@@ -986,7 +986,7 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(int alpha)
break;
case FXDIB_8bppMask: {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scan_line = m_pBuffer + row * m_Pitch;
+ uint8_t* scan_line = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
scan_line[col] = scan_line[col] * alpha / 255;
}
@@ -995,7 +995,7 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(int alpha)
}
case FXDIB_Argb: {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scan_line = m_pBuffer + row * m_Pitch + 3;
+ uint8_t* scan_line = m_pBuffer + row * m_Pitch + 3;
for (int col = 0; col < m_Width; col ++) {
*scan_line = (*scan_line) * alpha / 255;
scan_line += 4;
@@ -1026,7 +1026,7 @@ FX_DWORD CFX_DIBitmap::GetPixel(int x, int y) const
if (m_pBuffer == NULL) {
return 0;
}
- FX_LPBYTE pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
+ uint8_t* pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
switch (GetFormat()) {
case FXDIB_1bppMask: {
if ((*pos) & (1 << (7 - x % 8))) {
@@ -1065,7 +1065,7 @@ void CFX_DIBitmap::SetPixel(int x, int y, FX_DWORD color)
if (x < 0 || x >= m_Width || y < 0 || y >= m_Height) {
return;
}
- FX_LPBYTE pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
+ uint8_t* pos = m_pBuffer + y * m_Pitch + x * GetBPP() / 8;
switch (GetFormat()) {
case FXDIB_1bppMask:
if (color >> 24) {
@@ -1127,14 +1127,14 @@ void CFX_DIBitmap::SetPixel(int x, int y, FX_DWORD color)
break;
}
}
-void CFX_DIBitmap::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+void CFX_DIBitmap::DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const
{
if (m_pBuffer == NULL) {
return;
}
int src_Bpp = m_bpp / 8;
- FX_LPBYTE scanline = m_pBuffer + line * m_Pitch;
+ uint8_t* scanline = m_pBuffer + line * m_Pitch;
if (src_Bpp == 0) {
for (int i = 0; i < clip_width; i ++) {
FX_DWORD dest_x = clip_left + i;
@@ -1243,7 +1243,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
if (isCmykImage) {
if (forecolor == 0xff && backcolor == 0x00) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
uint8_t b, g, r;
AdobeCMYK_to_sRGB1(scanline[0], scanline[1], scanline[2], scanline[3],
@@ -1258,7 +1258,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
}
} else if (forecolor == 0 && backcolor == 0xffffff) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
int gap = m_bpp / 8 - 2;
for (int col = 0; col < m_Width; col ++) {
int gray = FXRGB2GRAY(scanline[2], scanline[1], scanline[0]);
@@ -1272,7 +1272,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
}
if (isCmykImage) {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
for (int col = 0; col < m_Width; col ++) {
uint8_t b, g, r;
AdobeCMYK_to_sRGB1(scanline[0], scanline[1], scanline[2], scanline[3],
@@ -1286,7 +1286,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor)
}
} else {
for (int row = 0; row < m_Height; row ++) {
- FX_LPBYTE scanline = m_pBuffer + row * m_Pitch;
+ uint8_t* scanline = m_pBuffer + row * m_Pitch;
int gap = m_bpp / 8 - 2;
for (int col = 0; col < m_Width; col ++) {
int gray = FXRGB2GRAY(scanline[2], scanline[1], scanline[0]);
@@ -1327,8 +1327,8 @@ FX_BOOL CFX_DIBitmap::DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_
}
}
for (int row = rect.top; row < rect.bottom; row ++) {
- FX_LPBYTE scan = m_pBuffer + row * m_Pitch;
- FX_LPBYTE next_scan = m_pBuffer + (row + 1) * m_Pitch;
+ uint8_t* scan = m_pBuffer + row * m_Pitch;
+ uint8_t* next_scan = m_pBuffer + (row + 1) * m_Pitch;
for (int col = rect.left; col < rect.right; col ++) {
int src_pixel = scan[col];
int dest_pixel = translate[src_pixel];
@@ -1390,11 +1390,11 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const
return NULL;
}
pFlipped->CopyPalette(m_pPalette);
- FX_LPBYTE pDestBuffer = pFlipped->GetBuffer();
+ uint8_t* pDestBuffer = pFlipped->GetBuffer();
int Bpp = m_bpp / 8;
for (int row = 0; row < m_Height; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row);
- FX_LPBYTE dest_scan = pDestBuffer + m_Pitch * (bYFlip ? (m_Height - row - 1) : row);
+ const uint8_t* src_scan = GetScanline(row);
+ uint8_t* dest_scan = pDestBuffer + m_Pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
FXSYS_memcpy32(dest_scan, src_scan, m_Pitch);
continue;
@@ -1436,8 +1436,8 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const
pDestBuffer = pFlipped->m_pAlphaMask->GetBuffer();
FX_DWORD dest_pitch = pFlipped->m_pAlphaMask->GetPitch();
for (int row = 0; row < m_Height; row ++) {
- FX_LPCBYTE src_scan = m_pAlphaMask->GetScanline(row);
- FX_LPBYTE dest_scan = pDestBuffer + dest_pitch * (bYFlip ? (m_Height - row - 1) : row);
+ const uint8_t* src_scan = m_pAlphaMask->GetScanline(row);
+ uint8_t* dest_scan = pDestBuffer + dest_pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
FXSYS_memcpy32(dest_scan, src_scan, dest_pitch);
continue;
@@ -1501,12 +1501,12 @@ void CFX_FilteredDIB::LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc)
m_pPalette = GetDestPalette();
m_pScanline = FX_Alloc(uint8_t, m_Pitch);
}
-FX_LPCBYTE CFX_FilteredDIB::GetScanline(int line) const
+const uint8_t* CFX_FilteredDIB::GetScanline(int line) const
{
TranslateScanline(m_pScanline, m_pSrc->GetScanline(line));
return m_pScanline;
}
-void CFX_FilteredDIB::DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp,
+void CFX_FilteredDIB::DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const
{
m_pSrc->DownSampleScanline(line, dest_scan, dest_bpp, dest_width, bFlipX, clip_left, clip_width);
@@ -1654,11 +1654,11 @@ void CFX_BitmapStorer::Replace(CFX_DIBitmap* pBitmap)
}
m_pBitmap = pBitmap;
}
-void CFX_BitmapStorer::ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha)
+void CFX_BitmapStorer::ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha)
{
- FX_LPBYTE dest_buf = (FX_LPBYTE)m_pBitmap->GetScanline(line);
- FX_LPBYTE dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
- (FX_LPBYTE)m_pBitmap->m_pAlphaMask->GetScanline(line) : NULL;
+ uint8_t* dest_buf = (uint8_t*)m_pBitmap->GetScanline(line);
+ uint8_t* dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
+ (uint8_t*)m_pBitmap->m_pAlphaMask->GetScanline(line) : NULL;
if (dest_buf) {
FXSYS_memcpy32(dest_buf, scanline, m_pBitmap->GetPitch());
}
diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp
index 073248823d..5a104c702d 100644
--- a/core/src/fxge/dib/fx_dib_transform.cpp
+++ b/core/src/fxge/dib/fx_dib_transform.cpp
@@ -71,7 +71,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
}
pTransBitmap->CopyPalette(m_pPalette);
int dest_pitch = pTransBitmap->GetPitch();
- FX_LPBYTE dest_buf = pTransBitmap->GetBuffer();
+ uint8_t* dest_buf = pTransBitmap->GetBuffer();
int row_start = bXFlip ? m_Height - dest_clip.right : dest_clip.left;
int row_end = bXFlip ? m_Height - dest_clip.left : dest_clip.right;
int col_start = bYFlip ? m_Width - dest_clip.bottom : dest_clip.top;
@@ -79,9 +79,9 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
if (GetBPP() == 1) {
FXSYS_memset8(dest_buf, 0xff, dest_pitch * result_height);
for (int row = row_start; row < row_end; row ++) {
- FX_LPCBYTE src_scan = GetScanline(row);
+ const uint8_t* src_scan = GetScanline(row);
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) - dest_clip.left;
- FX_LPBYTE dest_scan = dest_buf;
+ uint8_t* dest_scan = dest_buf;
if (bYFlip) {
dest_scan += (result_height - 1) * dest_pitch;
}
@@ -101,7 +101,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
}
for (int row = row_start; row < row_end; row ++) {
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) - dest_clip.left;
- FX_LPBYTE dest_scan = dest_buf + dest_col * nBytes;
+ uint8_t* dest_scan = dest_buf + dest_col * nBytes;
if (bYFlip) {
dest_scan += (result_height - 1) * dest_pitch;
}
@@ -112,7 +112,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
dest_scan += dest_step;
}
} else {
- FX_LPCBYTE src_scan = GetScanline(row) + col_start * nBytes;
+ const uint8_t* src_scan = GetScanline(row) + col_start * nBytes;
if (nBytes == 1)
for (int col = col_start; col < col_end; col ++) {
*dest_scan = *src_scan++;
@@ -134,11 +134,11 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
int dest_step = bYFlip ? -dest_pitch : dest_pitch;
for (int row = row_start; row < row_end; row ++) {
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) - dest_clip.left;
- FX_LPBYTE dest_scan = dest_buf + dest_col;
+ uint8_t* dest_scan = dest_buf + dest_col;
if (bYFlip) {
dest_scan += (result_height - 1) * dest_pitch;
}
- FX_LPCBYTE src_scan = m_pAlphaMask->GetScanline(row) + col_start;
+ const uint8_t* src_scan = m_pAlphaMask->GetScanline(row) + col_start;
for (int col = col_start; col < col_end; col ++) {
*dest_scan = *src_scan++;
dest_scan += dest_step;
@@ -256,24 +256,24 @@ FX_BOOL CFX_ImageTransformer::Start(const CFX_DIBSource* pSrc, const CFX_AffineM
m_Status = 3;
return TRUE;
}
-uint8_t _bilinear_interpol(FX_LPCBYTE buf, int row_offset_l, int row_offset_r,
+uint8_t _bilinear_interpol(const uint8_t* buf, int row_offset_l, int row_offset_r,
int src_col_l, int src_col_r, int res_x, int res_y,
int bpp, int c_offset)
{
int i_resx = 255 - res_x;
int col_bpp_l = src_col_l * bpp;
int col_bpp_r = src_col_r * bpp;
- FX_LPCBYTE buf_u = buf + row_offset_l + c_offset;
- FX_LPCBYTE buf_d = buf + row_offset_r + c_offset;
- FX_LPCBYTE src_pos0 = buf_u + col_bpp_l;
- FX_LPCBYTE src_pos1 = buf_u + col_bpp_r;
- FX_LPCBYTE src_pos2 = buf_d + col_bpp_l;
- FX_LPCBYTE src_pos3 = buf_d + col_bpp_r;
+ const uint8_t* buf_u = buf + row_offset_l + c_offset;
+ const uint8_t* buf_d = buf + row_offset_r + c_offset;
+ const uint8_t* src_pos0 = buf_u + col_bpp_l;
+ const uint8_t* src_pos1 = buf_u + col_bpp_r;
+ const uint8_t* src_pos2 = buf_d + col_bpp_l;
+ const uint8_t* src_pos3 = buf_d + col_bpp_r;
uint8_t r_pos_0 = (*src_pos0 * i_resx + *src_pos1 * res_x) >> 8;
uint8_t r_pos_1 = (*src_pos2 * i_resx + *src_pos3 * res_x) >> 8;
return (r_pos_0 * (255 - res_y) + r_pos_1 * res_y) >> 8;
}
-uint8_t _bicubic_interpol(FX_LPCBYTE buf, int pitch, int pos_pixel[], int u_w[], int v_w[], int res_x, int res_y,
+uint8_t _bicubic_interpol(const uint8_t* buf, int pitch, int pos_pixel[], int u_w[], int v_w[], int res_x, int res_y,
int bpp, int c_offset)
{
int s_result = 0;
@@ -358,8 +358,8 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (m_Storer.GetBitmap() == NULL) {
return FALSE;
}
- FX_LPCBYTE stretch_buf = m_Storer.GetBitmap()->GetBuffer();
- FX_LPCBYTE stretch_buf_mask = NULL;
+ const uint8_t* stretch_buf = m_Storer.GetBitmap()->GetBuffer();
+ const uint8_t* stretch_buf_mask = NULL;
if (m_Storer.GetBitmap()->m_pAlphaMask) {
stretch_buf_mask = m_Storer.GetBitmap()->m_pAlphaMask->GetBuffer();
}
@@ -457,7 +457,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (!(m_Flags & FXDIB_DOWNSAMPLE) && !(m_Flags & FXDIB_BICUBIC_INTERPOL)) {
CFX_BilinearMatrix result2stretch_fix(result2stretch, 8);
for (int row = 0; row < m_ResultHeight; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)pTransformed->GetScanline(row);
for (int col = 0; col < m_ResultWidth; col ++) {
int src_col_l, src_row_l, res_x, res_y;
result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y);
@@ -486,7 +486,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
} else if (m_Flags & FXDIB_BICUBIC_INTERPOL) {
CFX_BilinearMatrix result2stretch_fix(result2stretch, 8);
for (int row = 0; row < m_ResultHeight; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)pTransformed->GetScanline(row);
for (int col = 0; col < m_ResultWidth; col ++) {
int src_col_l, src_row_l, res_x, res_y;
result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y);
@@ -508,7 +508,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
} else {
CPDF_FixedMatrix result2stretch_fix(result2stretch, 8);
for (int row = 0; row < m_ResultHeight; row ++) {
- FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row);
+ uint8_t* dest_scan = (uint8_t*)pTransformed->GetScanline(row);
for (int col = 0; col < m_ResultWidth; col ++) {
int src_col, src_row;
result2stretch_fix.Transform(col, row, src_col, src_row);
@@ -519,7 +519,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (src_row == stretch_height) {
src_row --;
}
- FX_LPCBYTE src_pixel = stretch_buf + stretch_pitch * src_row + src_col;
+ const uint8_t* src_pixel = stretch_buf + stretch_pitch * src_row + src_col;
*dest_scan = *src_pixel;
}
dest_scan ++;
@@ -756,7 +756,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause)
if (src_row == stretch_height) {
src_row --;
}
- FX_LPCBYTE src_pos = stretch_buf + src_row * stretch_pitch + src_col * Bpp;
+ const uint8_t* src_pos = stretch_buf + src_row * stretch_pitch + src_col * Bpp;
if (bHasAlpha) {
if (transformF != FXDIB_Argb) {
if (transformF == FXDIB_Rgba) {
diff --git a/core/src/fxge/ge/fx_ge.cpp b/core/src/fxge/ge/fx_ge.cpp
index dffc98962f..734d0d4eb7 100644
--- a/core/src/fxge/ge/fx_ge.cpp
+++ b/core/src/fxge/ge/fx_ge.cpp
@@ -65,7 +65,7 @@ void CFX_GEModule::SetTextGamma(FX_FLOAT gammaValue)
i++;
}
}
-FX_LPCBYTE CFX_GEModule::GetTextGammaTable()
+const uint8_t* CFX_GEModule::GetTextGammaTable()
{
return m_GammaValue;
}
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp
index 0b4ffd5f4c..8461396c1f 100644
--- a/core/src/fxge/ge/fx_ge_device.cpp
+++ b/core/src/fxge/ge/fx_ge_device.cpp
@@ -390,16 +390,16 @@ FX_BOOL CFX_RenderDevice::StretchBitMask(const CFX_DIBSource* pBitmap, int left,
return m_pDeviceDriver->StretchDIBits(pBitmap, argb, left, top, dest_width, dest_height, &clip_box, flags, alpha_flag, pIccTransform);
}
FX_BOOL CFX_RenderDevice::StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_mode)
{
return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix, flags, handle, alpha_flag, pIccTransform, blend_mode);
}
-FX_BOOL CFX_RenderDevice::ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause)
+FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause)
{
return m_pDeviceDriver->ContinueDIBits(handle, pPause);
}
-void CFX_RenderDevice::CancelDIBits(FX_LPVOID handle)
+void CFX_RenderDevice::CancelDIBits(void* handle)
{
m_pDeviceDriver->CancelDIBits(handle);
}
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index 8928d25d4c..21c1081480 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -8,7 +8,7 @@
#include "../../../include/fxge/fx_freetype.h"
#include "text_int.h"
#define EM_ADJUST(em, a) (em == 0?(a): (a)*1000/em)
-extern void _FPDFAPI_GetInternalFontData(int id1, FX_LPCBYTE& data, FX_DWORD& size);
+extern void _FPDFAPI_GetInternalFontData(int id1, const uint8_t*& data, FX_DWORD& size);
CFX_Font::CFX_Font()
{
m_pSubstFont = NULL;
@@ -153,7 +153,7 @@ int CFX_Font::GetGlyphWidth(FX_DWORD glyph_index)
int width = EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Glyph_HoriAdvance(m_Face));
return width;
}
-static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size)
+static FXFT_Face FT_LoadFont(uint8_t* pData, int size)
{
FXFT_Library library;
if (CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary == NULL) {
@@ -171,12 +171,12 @@ static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size)
}
return face;
}
-FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size)
+FX_BOOL CFX_Font::LoadEmbedded(const uint8_t* data, FX_DWORD size)
{
m_pFontDataAllocation = FX_Alloc(uint8_t, size);
FXSYS_memcpy32(m_pFontDataAllocation, data, size);
- m_Face = FT_LoadFont((FX_LPBYTE)m_pFontDataAllocation, size);
- m_pFontData = (FX_LPBYTE)m_pFontDataAllocation;
+ m_Face = FT_LoadFont((uint8_t*)m_pFontDataAllocation, size);
+ m_pFontData = (uint8_t*)m_pFontDataAllocation;
m_bEmbedded = TRUE;
m_dwSize = size;
return m_Face != NULL;
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 9bb53c638f..afa9918690 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -117,7 +117,7 @@ FXFT_Face CFX_FontMgr::FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bT
CharsetCP, pSubstFont);
}
FXFT_Face CFX_FontMgr::GetCachedFace(const CFX_ByteString& face_name,
- int weight, FX_BOOL bItalic, FX_LPBYTE& pFontData)
+ int weight, FX_BOOL bItalic, uint8_t*& pFontData)
{
CFX_ByteString key(face_name);
key += ',';
@@ -133,7 +133,7 @@ FXFT_Face CFX_FontMgr::GetCachedFace(const CFX_ByteString& face_name,
return NULL;
}
FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name,
- int weight, FX_BOOL bItalic, FX_LPBYTE pData, FX_DWORD size, int face_index)
+ int weight, FX_BOOL bItalic, uint8_t* pData, FX_DWORD size, int face_index)
{
CTTFontDesc* pFontDesc = new CTTFontDesc;
pFontDesc->m_Type = 1;
@@ -164,7 +164,7 @@ FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name,
m_FaceMap.SetAt(key, pFontDesc);
return pFontDesc->m_SingleFace.m_pFace;
}
-const FX_LPCSTR g_Base14FontNames[14] = {
+const FX_CHAR* const g_Base14FontNames[14] = {
"Courier",
"Courier-Bold",
"Courier-BoldOblique",
@@ -278,7 +278,7 @@ g_AltFontNames[] = {
extern "C" {
static int compareString(const void* key, const void* element)
{
- return FXSYS_stricmp((FX_LPCSTR)key, ((_AltFontName*)element)->m_pName);
+ return FXSYS_stricmp((const FX_CHAR*)key, ((_AltFontName*)element)->m_pName);
}
}
int _PDF_GetStandardFontName(CFX_ByteString& name)
@@ -291,10 +291,10 @@ int _PDF_GetStandardFontName(CFX_ByteString& name)
name = g_Base14FontNames[found->m_Index];
return found->m_Index;
}
-int GetTTCIndex(FX_LPCBYTE pFontData, FX_DWORD ttc_size, FX_DWORD font_offset)
+int GetTTCIndex(const uint8_t* pFontData, FX_DWORD ttc_size, FX_DWORD font_offset)
{
int face_index = 0;
- FX_LPCBYTE p = pFontData + 8;
+ const uint8_t* p = pFontData + 8;
FX_DWORD nfont = GET_TT_LONG(p);
FX_DWORD index;
for (index = 0; index < nfont; index ++) {
@@ -311,7 +311,7 @@ int GetTTCIndex(FX_LPCBYTE pFontData, FX_DWORD ttc_size, FX_DWORD font_offset)
return face_index;
}
FXFT_Face CFX_FontMgr::GetCachedTTCFace(int ttc_size, FX_DWORD checksum,
- int font_offset, FX_LPBYTE& pFontData)
+ int font_offset, uint8_t*& pFontData)
{
CFX_ByteString key;
key.Format("%d:%d", ttc_size, checksum);
@@ -329,7 +329,7 @@ FXFT_Face CFX_FontMgr::GetCachedTTCFace(int ttc_size, FX_DWORD checksum,
return pFontDesc->m_TTCFace.m_pFaces[face_index];
}
FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size, FX_DWORD checksum,
- FX_LPBYTE pData, FX_DWORD size, int font_offset)
+ uint8_t* pData, FX_DWORD size, int font_offset)
{
CFX_ByteString key;
key.Format("%d:%d", ttc_size, checksum);
@@ -346,7 +346,7 @@ FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size, FX_DWORD checksum,
pFontDesc->m_TTCFace.m_pFaces[face_index] = GetFixedFace(pFontDesc->m_pFontData, ttc_size, face_index);
return pFontDesc->m_TTCFace.m_pFaces[face_index];
}
-FXFT_Face CFX_FontMgr::GetFixedFace(FX_LPCBYTE pData, FX_DWORD size, int face_index)
+FXFT_Face CFX_FontMgr::GetFixedFace(const uint8_t* pData, FX_DWORD size, int face_index)
{
FXFT_Library library;
if (m_FTLibrary == NULL) {
@@ -364,7 +364,7 @@ FXFT_Face CFX_FontMgr::GetFixedFace(FX_LPCBYTE pData, FX_DWORD size, int face_in
}
return face;
}
-FXFT_Face CFX_FontMgr::GetFileFace(FX_LPCSTR filename, int face_index)
+FXFT_Face CFX_FontMgr::GetFileFace(const FX_CHAR* filename, int face_index)
{
FXFT_Library library;
if (m_FTLibrary == NULL) {
@@ -431,11 +431,11 @@ const FoxitFonts g_FoxitFonts[14] = {
{g_FoxitSymbolFontData, 16729},
{g_FoxitDingbatsFontData, 29513},
};
-void _FPDFAPI_GetInternalFontData(int id, FX_LPCBYTE& data, FX_DWORD& size)
+void _FPDFAPI_GetInternalFontData(int id, const uint8_t*& data, FX_DWORD& size)
{
CFX_GEModule::Get()->GetFontMgr()->GetStandardFont(data, size, id);
}
-FX_BOOL CFX_FontMgr::GetStandardFont(FX_LPCBYTE& pFontData, FX_DWORD& size, int index)
+FX_BOOL CFX_FontMgr::GetStandardFont(const uint8_t*& pFontData, FX_DWORD& size, int index)
{
if (index > 15 || index < 0) {
return FALSE;
@@ -490,7 +490,7 @@ void CFX_FontMapper::SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo)
}
m_pFontInfo = pFontInfo;
}
-static CFX_ByteString _TT_NormalizeName(FX_LPCSTR family)
+static CFX_ByteString _TT_NormalizeName(const FX_CHAR* family)
{
CFX_ByteString norm(family, -1);
norm.Remove(' ');
@@ -503,12 +503,12 @@ static CFX_ByteString _TT_NormalizeName(FX_LPCSTR family)
norm.MakeLower();
return norm;
}
-CFX_ByteString _FPDF_GetNameFromTT(FX_LPCBYTE name_table, FX_DWORD name_id)
+CFX_ByteString _FPDF_GetNameFromTT(const uint8_t* name_table, FX_DWORD name_id)
{
- FX_LPCBYTE ptr = name_table + 2;
+ const uint8_t* ptr = name_table + 2;
int name_count = GET_TT_SHORT(ptr);
int string_offset = GET_TT_SHORT(ptr + 2);
- FX_LPCBYTE string_ptr = name_table + string_offset;
+ const uint8_t* string_ptr = name_table + string_offset;
ptr += 4;
for (int i = 0; i < name_count; i ++) {
if (GET_TT_SHORT(ptr + 6) == name_id && GET_TT_SHORT(ptr) == 1 && GET_TT_SHORT(ptr + 2) == 0) {
@@ -527,10 +527,10 @@ static CFX_ByteString _FPDF_ReadStringFromFile(FXSYS_FILE* pFile, FX_DWORD size)
buffer.ReleaseBuffer(size);
return buffer;
}
-CFX_ByteString _FPDF_LoadTableFromTT(FXSYS_FILE* pFile, FX_LPCBYTE pTables, FX_DWORD nTables, FX_DWORD tag)
+CFX_ByteString _FPDF_LoadTableFromTT(FXSYS_FILE* pFile, const uint8_t* pTables, FX_DWORD nTables, FX_DWORD tag)
{
for (FX_DWORD i = 0; i < nTables; i ++) {
- FX_LPCBYTE p = pTables + i * 16;
+ const uint8_t* p = pTables + i * 16;
if (GET_TT_LONG(p) == tag) {
FX_DWORD offset = GET_TT_LONG(p + 8);
FX_DWORD size = GET_TT_LONG(p + 12);
@@ -540,10 +540,10 @@ CFX_ByteString _FPDF_LoadTableFromTT(FXSYS_FILE* pFile, FX_LPCBYTE pTables, FX_D
}
return CFX_ByteString();
}
-CFX_ByteString _FPDF_LoadTableFromTTStreamFile(IFX_FileStream* pFile, FX_LPCBYTE pTables, FX_DWORD nTables, FX_DWORD tag)
+CFX_ByteString _FPDF_LoadTableFromTTStreamFile(IFX_FileStream* pFile, const uint8_t* pTables, FX_DWORD nTables, FX_DWORD tag)
{
for (FX_DWORD i = 0; i < nTables; i ++) {
- FX_LPCBYTE p = pTables + i * 16;
+ const uint8_t* p = pTables + i * 16;
if (GET_TT_LONG(p) == tag) {
FX_DWORD offset = GET_TT_LONG(p + 8);
FX_DWORD size = GET_TT_LONG(p + 12);
@@ -565,7 +565,7 @@ CFX_ByteString CFX_FontMapper::GetPSNameFromTT(void* hFont)
CFX_ByteString result;
FX_DWORD size = m_pFontInfo->GetFontData(hFont, 0x6e616d65, NULL, 0);
if (size) {
- FX_LPBYTE buffer = FX_Alloc(uint8_t, size);
+ uint8_t* buffer = FX_Alloc(uint8_t, size);
m_pFontInfo->GetFontData(hFont, 0x6e616d65, buffer, size);
result = _FPDF_GetNameFromTT(buffer, 6);
FX_Free(buffer);
@@ -584,7 +584,7 @@ void CFX_FontMapper::AddInstalledFont(const CFX_ByteString& name, int charset)
if (name == m_LastFamily) {
return;
}
- FX_LPCBYTE ptr = name;
+ const uint8_t* ptr = name;
FX_BOOL bLocalized = FALSE;
for (int i = 0; i < name.GetLength(); i ++)
if (ptr[i] > 0x80) {
@@ -744,7 +744,7 @@ FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseF
if (m_FoxitFaces[iBaseFont]) {
return m_FoxitFaces[iBaseFont];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
if (m_pFontMgr->GetStandardFont(pFontData, size, iBaseFont)) {
m_FoxitFaces[iBaseFont] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -762,7 +762,7 @@ FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseF
if (m_MMFaces[1]) {
return m_MMFaces[1];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size;
m_pFontMgr->GetStandardFont(pFontData, size, 14);
m_MMFaces[1] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -772,15 +772,15 @@ FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseF
if (m_MMFaces[0]) {
return m_MMFaces[0];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 15);
m_MMFaces[0] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
return m_MMFaces[0];
}
const struct _AltFontFamily {
- FX_LPCSTR m_pFontName;
- FX_LPCSTR m_pFontFamily;
+ const FX_CHAR* m_pFontName;
+ const FX_CHAR* m_pFontFamily;
}
g_AltFontFamilies[] = {
{"AGaramondPro", "Adobe Garamond Pro"},
@@ -790,11 +790,11 @@ g_AltFontFamilies[] = {
extern "C" {
static int compareFontFamilyString(const void* key, const void* element)
{
- CFX_ByteString str_key((FX_LPCSTR)key);
+ CFX_ByteString str_key((const FX_CHAR*)key);
if (str_key.Find(((_AltFontFamily*)element)->m_pFontName) != -1) {
return 0;
}
- return FXSYS_stricmp((FX_LPCSTR)key, ((_AltFontFamily*)element)->m_pFontName);
+ return FXSYS_stricmp((const FX_CHAR*)key, ((_AltFontFamily*)element)->m_pFontName);
}
}
#define FX_FONT_STYLE_None 0x00
@@ -823,7 +823,7 @@ static CFX_ByteString _GetFontFamily(CFX_ByteString fontName, int nStyle)
return found->m_pFontFamily;
};
typedef struct _FX_FontStyle {
- FX_LPCSTR style;
+ const FX_CHAR* style;
int32_t len;
} FX_FontStyle;
const FX_FontStyle g_FontStyles[] = {
@@ -833,7 +833,7 @@ const FX_FontStyle g_FontStyles[] = {
{ "Reg", 3 },
{ "Regular", 7 },
};
-CFX_ByteString ParseStyle(FX_LPCSTR pStyle, int iLen, int iIndex)
+CFX_ByteString ParseStyle(const FX_CHAR* pStyle, int iLen, int iIndex)
{
CFX_ByteTextBuf buf;
if (!iLen || iLen <= iIndex) {
@@ -903,7 +903,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
if (m_FoxitFaces[12]) {
return m_FoxitFaces[12];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 12);
m_FoxitFaces[12] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -916,7 +916,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
if (m_FoxitFaces[13]) {
return m_FoxitFaces[13];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 13);
m_FoxitFaces[13] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -994,7 +994,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
}
if (!style.IsEmpty()) {
int nLen = style.GetLength();
- FX_LPCSTR pStyle = style;
+ const FX_CHAR* pStyle = style;
int i = 0;
FX_BOOL bFirstItem = TRUE;
CFX_ByteString buf;
@@ -1156,7 +1156,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
if (m_FoxitFaces[12]) {
return m_FoxitFaces[12];
}
- FX_LPCBYTE pFontData = NULL;
+ const uint8_t* pFontData = NULL;
FX_DWORD size = 0;
m_pFontMgr->GetStandardFont(pFontData, size, 12);
m_FoxitFaces[12] = m_pFontMgr->GetFixedFace(pFontData, size, 0);
@@ -1204,7 +1204,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
for (int i = 0; i < 256; i ++) {
checksum += ((FX_DWORD*)temp)[i];
}
- FX_LPBYTE pFontData;
+ uint8_t* pFontData;
face = m_pFontMgr->GetCachedTTCFace(ttc_size, checksum, ttc_size - font_size, pFontData);
if (face == NULL) {
pFontData = FX_Alloc(uint8_t, ttc_size);
@@ -1213,7 +1213,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
ttc_size - font_size);
}
} else {
- FX_LPBYTE pFontData;
+ uint8_t* pFontData;
face = m_pFontMgr->GetCachedFace(SubstName, weight, bItalic, pFontData);
if (face == NULL) {
pFontData = FX_Alloc(uint8_t, font_size);
@@ -1293,7 +1293,7 @@ CFX_FolderFontInfo::~CFX_FolderFontInfo()
FX_POSITION pos = m_FontList.GetStartPosition();
while (pos) {
CFX_ByteString key;
- FX_LPVOID value;
+ void* value;
m_FontList.GetNextAssoc(pos, key, value);
delete (CFontFaceInfo*)value;
}
@@ -1372,7 +1372,7 @@ void CFX_FolderFontInfo::ScanFile(CFX_ByteString& path)
return;
}
FX_DWORD face_bytes = nFaces * 4;
- FX_LPBYTE offsets = FX_Alloc(uint8_t, face_bytes);
+ uint8_t* offsets = FX_Alloc(uint8_t, face_bytes);
readCnt = FXSYS_fread(offsets, face_bytes, 1, pFile);
if (readCnt != face_bytes) {
FX_Free(offsets);
@@ -1380,7 +1380,7 @@ void CFX_FolderFontInfo::ScanFile(CFX_ByteString& path)
return;
}
for (FX_DWORD i = 0; i < nFaces; i ++) {
- FX_LPBYTE p = offsets + i * 4;
+ uint8_t* p = offsets + i * 4;
ReportFace(path, pFile, filesize, GET_TT_LONG(p));
}
FX_Free(offsets);
@@ -1407,7 +1407,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
if (style != "Regular") {
facename += " " + style;
}
- FX_LPVOID p;
+ void* p;
if (m_FontList.Lookup(facename, p)) {
return;
}
@@ -1420,7 +1420,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
pInfo->m_Charsets = 0;
CFX_ByteString os2 = _FPDF_LoadTableFromTT(pFile, tables, nTables, 0x4f532f32);
if (os2.GetLength() >= 86) {
- FX_LPCBYTE p = (FX_LPCBYTE)os2 + 78;
+ const uint8_t* p = (const uint8_t*)os2 + 78;
FX_DWORD codepages = GET_TT_LONG(p);
if (codepages & (1 << 17)) {
m_pMapper->AddInstalledFont(facename, FXFONT_SHIFTJIS_CHARSET);
@@ -1457,19 +1457,19 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
}
m_FontList.SetAt(facename, pInfo);
}
-void* CFX_FolderFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact)
+void* CFX_FolderFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact)
{
return NULL;
}
-void* CFX_FolderFontInfo::GetFont(FX_LPCSTR face)
+void* CFX_FolderFontInfo::GetFont(const FX_CHAR* face)
{
- FX_LPVOID p;
+ void* p;
if (!m_FontList.Lookup(face, p)) {
return NULL;
}
return p;
}
-FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size)
+FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size)
{
if (hFont == NULL) {
return 0;
@@ -1493,7 +1493,7 @@ FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE
} else {
FX_DWORD nTables = pFont->m_FontTables.GetLength() / 16;
for (FX_DWORD i = 0; i < nTables; i ++) {
- FX_LPCBYTE p = (FX_LPCBYTE)pFont->m_FontTables + i * 16;
+ const uint8_t* p = (const uint8_t*)pFont->m_FontTables + i * 16;
if (GET_TT_LONG(p) == table) {
offset = GET_TT_LONG(p + 8);
datasize = GET_TT_LONG(p + 12);
diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp
index e2ed84e081..027c519fea 100644
--- a/core/src/fxge/ge/fx_ge_linux.cpp
+++ b/core/src/fxge/ge/fx_ge_linux.cpp
@@ -9,8 +9,8 @@
#include "text_int.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
static const struct {
- FX_LPCSTR m_pName;
- FX_LPCSTR m_pSubstName;
+ const FX_CHAR* m_pName;
+ const FX_CHAR* m_pSubstName;
}
Base14Substs[] = {
{"Courier", "Courier New"},
@@ -29,13 +29,13 @@ Base14Substs[] = {
class CFX_LinuxFontInfo : public CFX_FolderFontInfo
{
public:
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact);
FX_BOOL ParseFontCfg();
- void* FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL bMatchName);
+ void* FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName);
};
#define LINUX_GPNAMESIZE 6
static const struct {
- FX_LPCSTR NameArr[LINUX_GPNAMESIZE];
+ const FX_CHAR* NameArr[LINUX_GPNAMESIZE];
}
LinuxGpFontList[] = {
{{"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic", "Kochi Gothic", "VL Gothic regular"}},
@@ -43,20 +43,20 @@ LinuxGpFontList[] = {
{{"TakaoPMincho", "IPAPMincho", "VL Gothic", "Kochi Mincho", NULL, "VL Gothic regular"}},
{{"TakaoMincho", "IPAMincho", "VL Gothic", "Kochi Mincho", NULL, "VL Gothic regular"}},
};
-static const FX_LPCSTR g_LinuxGbFontList[] = {
+static const FX_CHAR* const g_LinuxGbFontList[] = {
"AR PL UMing CN Light",
"WenQuanYi Micro Hei",
"AR PL UKai CN",
};
-static const FX_LPCSTR g_LinuxB5FontList[] = {
+static const FX_CHAR* const g_LinuxB5FontList[] = {
"AR PL UMing TW Light",
"WenQuanYi Micro Hei",
"AR PL UKai TW",
};
-static const FX_LPCSTR g_LinuxHGFontList[] = {
+static const FX_CHAR* const g_LinuxHGFontList[] = {
"UnDotum",
};
-static int32_t GetJapanesePreference(FX_LPCSTR facearr, int weight, int picth_family)
+static int32_t GetJapanesePreference(const FX_CHAR* facearr, int weight, int picth_family)
{
CFX_ByteString face = facearr;
if (face.Find("Gothic") >= 0 || face.Find("\x83\x53\x83\x56\x83\x62\x83\x4e") >= 0) {
@@ -77,7 +77,7 @@ static int32_t GetJapanesePreference(FX_LPCSTR facearr, int weight, int picth_fa
}
return 2;
}
-void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR cstr_face, FX_BOOL& bExact)
+void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
{
CFX_ByteString face = cstr_face;
int iBaseFont;
@@ -90,7 +90,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
if (iBaseFont < 12) {
return GetFont(face);
}
- FX_LPVOID p = NULL;
+ void* p = NULL;
FX_BOOL bCJK = TRUE;
switch (charset) {
case FXFONT_SHIFTJIS_CHARSET: {
@@ -105,7 +105,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
}
break;
case FXFONT_GB2312_CHARSET: {
- static int32_t s_gbCount = sizeof(g_LinuxGbFontList) / sizeof(FX_LPCSTR);
+ static int32_t s_gbCount = sizeof(g_LinuxGbFontList) / sizeof(const FX_CHAR*);
for (int32_t i = 0; i < s_gbCount; i++)
if (m_FontList.Lookup(g_LinuxGbFontList[i], p)) {
return p;
@@ -113,7 +113,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
}
break;
case FXFONT_CHINESEBIG5_CHARSET: {
- static int32_t s_b5Count = sizeof(g_LinuxB5FontList) / sizeof(FX_LPCSTR);
+ static int32_t s_b5Count = sizeof(g_LinuxB5FontList) / sizeof(const FX_CHAR*);
for (int32_t i = 0; i < s_b5Count; i++)
if (m_FontList.Lookup(g_LinuxB5FontList[i], p)) {
return p;
@@ -121,7 +121,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p
}
break;
case FXFONT_HANGEUL_CHARSET: {
- static int32_t s_hgCount = sizeof(g_LinuxHGFontList) / sizeof(FX_LPCSTR);
+ static int32_t s_hgCount = sizeof(g_LinuxHGFontList) / sizeof(const FX_CHAR*);
for (int32_t i = 0; i < s_hgCount; i++)
if (m_FontList.Lookup(g_LinuxHGFontList[i], p)) {
return p;
@@ -177,7 +177,7 @@ static int32_t _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_fami
}
return iSimilarValue;
}
-void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL bMatchName)
+void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName)
{
CFontFaceInfo* pFind = NULL;
FX_DWORD charset_flag = _LinuxGetCharset(charset);
@@ -186,7 +186,7 @@ void* CFX_LinuxFontInfo::FindFont(int weight, FX_BOOL bItalic, int charset, int
while (pos) {
CFX_ByteString bsName;
CFontFaceInfo* pFont = NULL;
- m_FontList.GetNextAssoc(pos, bsName, (FX_LPVOID&)pFont);
+ m_FontList.GetNextAssoc(pos, bsName, (void*&)pFont);
if (!(pFont->m_Charsets & charset_flag) && charset != FXFONT_DEFAULT_CHARSET) {
continue;
}
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 51d5908a81..4ae7b42b39 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -65,8 +65,8 @@ void CFX_ClipRgn::IntersectMaskRect(FX_RECT rect, FX_RECT mask_rect, CFX_DIBitma
}
new_dib->Create(m_Box.Width(), m_Box.Height(), FXDIB_8bppMask);
for (int row = m_Box.top; row < m_Box.bottom; row ++) {
- FX_LPBYTE dest_scan = new_dib->GetBuffer() + new_dib->GetPitch() * (row - m_Box.top);
- FX_LPBYTE src_scan = mask_dib->GetBuffer() + mask_dib->GetPitch() * (row - mask_rect.top);
+ uint8_t* dest_scan = new_dib->GetBuffer() + new_dib->GetPitch() * (row - m_Box.top);
+ uint8_t* src_scan = mask_dib->GetBuffer() + mask_dib->GetPitch() * (row - mask_rect.top);
for (int col = m_Box.left; col < m_Box.right; col ++) {
dest_scan[col - m_Box.left] = src_scan[col - mask_rect.left];
}
@@ -98,9 +98,9 @@ void CFX_ClipRgn::IntersectMaskF(int left, int top, CFX_DIBitmapRef Mask)
new_dib->Create(new_box.Width(), new_box.Height(), FXDIB_8bppMask);
const CFX_DIBitmap* old_dib = m_Mask;
for (int row = new_box.top; row < new_box.bottom; row ++) {
- FX_LPBYTE old_scan = old_dib->GetBuffer() + (row - m_Box.top) * old_dib->GetPitch();
- FX_LPBYTE mask_scan = mask_dib->GetBuffer() + (row - top) * mask_dib->GetPitch();
- FX_LPBYTE new_scan = new_dib->GetBuffer() + (row - new_box.top) * new_dib->GetPitch();
+ uint8_t* old_scan = old_dib->GetBuffer() + (row - m_Box.top) * old_dib->GetPitch();
+ uint8_t* mask_scan = mask_dib->GetBuffer() + (row - top) * mask_dib->GetPitch();
+ uint8_t* new_scan = new_dib->GetBuffer() + (row - new_box.top) * new_dib->GetPitch();
for (int col = new_box.left; col < new_box.right; col ++) {
new_scan[col - new_box.left] = old_scan[col - m_Box.left] * mask_scan[col - left] / 255;
}
diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp
index 1829386755..c8e56ada85 100644
--- a/core/src/fxge/ge/fx_ge_ps.cpp
+++ b/core/src/fxge/ge/fx_ge_ps.cpp
@@ -131,7 +131,7 @@ void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData, const CFX_AffineM
}
}
}
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
void CFX_PSRenderer::SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
@@ -163,7 +163,7 @@ void CFX_PSRenderer::SetClip_PathStroke(const CFX_PathData* pPathData,
buf << FX_BSTRC("mx Cm [") << pObject2Device->a << FX_BSTRC(" ") << pObject2Device->b << FX_BSTRC(" ") <<
pObject2Device->c << FX_BSTRC(" ") << pObject2Device->d << FX_BSTRC(" ") << pObject2Device->e <<
FX_BSTRC(" ") << pObject2Device->f << FX_BSTRC("]cm ");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
OutputPath(pPathData, NULL);
CFX_FloatRect rect = pPathData->GetBoundingBox(pGraphState->m_LineWidth, pGraphState->m_MiterLimit);
@@ -204,7 +204,7 @@ FX_BOOL CFX_PSRenderer::DrawPath(const CFX_PathData* pPathData,
buf << FX_BSTRC("mx Cm [") << pObject2Device->a << FX_BSTRC(" ") << pObject2Device->b << FX_BSTRC(" ") <<
pObject2Device->c << FX_BSTRC(" ") << pObject2Device->d << FX_BSTRC(" ") << pObject2Device->e <<
FX_BSTRC(" ") << pObject2Device->f << FX_BSTRC("]cm ");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
}
OutputPath(pPathData, stroke_alpha ? NULL : pObject2Device);
@@ -261,10 +261,10 @@ void CFX_PSRenderer::SetGraphState(const CFX_GraphStateData* pGraphState)
m_CurGraphState.Copy(*pGraphState);
m_bGraphStateSet = TRUE;
if (buf.GetSize()) {
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
}
-static void FaxCompressData(FX_LPBYTE src_buf, int width, int height, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
+static void FaxCompressData(uint8_t* src_buf, int width, int height, uint8_t*& dest_buf, FX_DWORD& dest_size)
{
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
if (width * height > 128 && pEncoders && pEncoders->GetFaxModule()->Encode(src_buf, width, height, (width + 7) / 8, dest_buf, dest_size)) {
@@ -274,8 +274,8 @@ static void FaxCompressData(FX_LPBYTE src_buf, int width, int height, FX_LPBYTE&
dest_size = (width + 7) / 8 * height;
}
}
-static void PSCompressData(int PSLevel, FX_LPBYTE src_buf, FX_DWORD src_size,
- FX_LPBYTE& output_buf, FX_DWORD& output_size, FX_LPCSTR& filter)
+static void PSCompressData(int PSLevel, uint8_t* src_buf, FX_DWORD src_size,
+ uint8_t*& output_buf, FX_DWORD& output_size, const FX_CHAR*& filter)
{
output_buf = src_buf;
output_size = src_size;
@@ -284,7 +284,7 @@ static void PSCompressData(int PSLevel, FX_LPBYTE src_buf, FX_DWORD src_size,
return;
}
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
- FX_LPBYTE dest_buf = NULL;
+ uint8_t* dest_buf = NULL;
FX_DWORD dest_size = src_size;
if (PSLevel >= 3) {
if (pEncoders && pEncoders->GetFlateModule()->Encode(src_buf, src_size, dest_buf, dest_size)) {
@@ -348,12 +348,12 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
if (pSource->GetBPP() == 1 && pSource->GetPalette() == NULL) {
int pitch = (width + 7) / 8;
FX_DWORD src_size = height * pitch;
- FX_LPBYTE src_buf = FX_Alloc(uint8_t, src_size);
+ uint8_t* src_buf = FX_Alloc(uint8_t, src_size);
for (int row = 0; row < height; row ++) {
- FX_LPCBYTE src_scan = pSource->GetScanline(row);
+ const uint8_t* src_scan = pSource->GetScanline(row);
FXSYS_memcpy32(src_buf + row * pitch, src_scan, pitch);
}
- FX_LPBYTE output_buf;
+ uint8_t* output_buf;
FX_DWORD output_size;
FaxCompressData(src_buf, width, height, output_buf, output_size);
if (pSource->IsAlphaMask()) {
@@ -373,7 +373,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
} else {
buf << FX_BSTRC("false 1 colorimage\n");
}
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
WritePSBinary(output_buf, output_size);
FX_Free(output_buf);
} else {
@@ -409,9 +409,9 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
return FALSE;
}
int Bpp = pConverted->GetBPP() / 8;
- FX_LPBYTE output_buf = NULL;
+ uint8_t* output_buf = NULL;
FX_STRSIZE output_size = 0;
- FX_LPCSTR filter = NULL;
+ const FX_CHAR* filter = NULL;
if (flags & FXRENDER_IMAGE_LOSSY) {
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
if (pEncoders && pEncoders->GetJpegModule()->Encode(pConverted, output_buf, output_size)) {
@@ -423,8 +423,8 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
output_size = height * src_pitch;
output_buf = FX_Alloc(uint8_t, output_size);
for (int row = 0; row < height; row ++) {
- FX_LPCBYTE src_scan = pConverted->GetScanline(row);
- FX_LPBYTE dest_scan = output_buf + row * src_pitch;
+ const uint8_t* src_scan = pConverted->GetScanline(row);
+ uint8_t* dest_scan = output_buf + row * src_pitch;
if (Bpp == 3) {
for (int col = 0; col < width; col ++) {
*dest_scan++ = src_scan[2];
@@ -436,7 +436,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
FXSYS_memcpy32(dest_scan, src_scan, src_pitch);
}
}
- FX_LPBYTE compressed_buf;
+ uint8_t* compressed_buf;
FX_DWORD compressed_size;
PSCompressData(m_PSLevel, output_buf, output_size, compressed_buf, compressed_size, filter);
if (output_buf != compressed_buf) {
@@ -457,7 +457,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
}
buf << FX_BSTRC("false ") << Bpp;
buf << FX_BSTRC(" colorimage\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
WritePSBinary(output_buf, output_size);
FX_Free(output_buf);
}
@@ -473,7 +473,7 @@ void CFX_PSRenderer::SetColor(FX_DWORD color, int alpha_flag, void* pIccTransfor
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- FX_LPBYTE pColor = (FX_LPBYTE)&color;
+ uint8_t* pColor = (uint8_t*)&color;
pIccModule->TranslateScanline(pIccTransform, pColor, pColor, 1);
color = m_bCmykOutput ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
bCMYK = m_bCmykOutput;
@@ -493,7 +493,7 @@ void CFX_PSRenderer::SetColor(FX_DWORD color, int alpha_flag, void* pIccTransfor
m_bColorSet = TRUE;
m_LastColor = color;
}
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
}
void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont, const FXTEXT_CHARPOS& charpos,
@@ -527,7 +527,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont,
"/BuildChar{1 index/Encoding get exch get 1 index/BuildGlyph get exec}bind def\n"
"currentdict end\n");
buf << FX_BSTRC("/X") << m_PSFontList.GetSize() - 1 << FX_BSTRC(" exch definefont pop\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
buf.Clear();
}
ps_fontnum = m_PSFontList.GetSize() - 1;
@@ -586,7 +586,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont,
buf << FX_BSTRC("}bind def end\n");
buf << FX_BSTRC("/X") << ps_fontnum << FX_BSTRC(" Ff/Encoding get ") << ps_glyphindex
<< FX_BSTRC("/") << ps_glyphindex << FX_BSTRC(" put\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
FX_BOOL CFX_PSRenderer::DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device,
@@ -627,18 +627,18 @@ FX_BOOL CFX_PSRenderer::DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX
buf << hex << FX_BSTRC("Tj\n");
}
buf << FX_BSTRC("Q\n");
- m_pOutput->OutputPS((FX_LPCSTR)buf.GetBuffer(), buf.GetSize());
+ m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
return TRUE;
}
-void CFX_PSRenderer::WritePSBinary(FX_LPCBYTE data, int len)
+void CFX_PSRenderer::WritePSBinary(const uint8_t* data, int len)
{
- FX_LPBYTE dest_buf;
+ uint8_t* dest_buf;
FX_DWORD dest_size;
CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
if (pEncoders && pEncoders->GetBasicModule()->A85Encode(data, len, dest_buf, dest_size)) {
- m_pOutput->OutputPS((FX_LPCSTR)dest_buf, dest_size);
+ m_pOutput->OutputPS((const FX_CHAR*)dest_buf, dest_size);
FX_Free(dest_buf);
} else {
- m_pOutput->OutputPS((FX_LPCSTR)data, len);
+ m_pOutput->OutputPS((const FX_CHAR*)data, len);
}
}
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index f3a720397b..1cdf5b2ef3 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -111,7 +111,7 @@ void _Color2Argb(FX_ARGB& argb, FX_DWORD color, int alpha_flag, void* pIccTransf
if (pIccTransform) {
ICodec_IccModule* pIccModule = CFX_GEModule::Get()->GetCodecModule()->GetIccModule();
color = FXGETFLAG_COLORTYPE(alpha_flag) ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, bgra, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, bgra, (const uint8_t*)&color, 1);
bgra[3] = FXGETFLAG_COLORTYPE(alpha_flag) ?
(alpha_flag >> 24) ? FXGETFLAG_ALPHA_FILL(alpha_flag) : FXGETFLAG_ALPHA_STROKE(alpha_flag) :
FXARGB_A(color);
@@ -298,7 +298,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
}
}
int dest_width = pixel_width;
- FX_LPBYTE dest_buf = bitmap.GetBuffer();
+ uint8_t* dest_buf = bitmap.GetBuffer();
int dest_pitch = bitmap.GetPitch();
int Bpp = bitmap.GetBPP() / 8;
int a, r, g, b;
@@ -330,7 +330,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
FX_BOOL bBGRStripe = text_flags & FXTEXT_BGR_STRIPE;
ncols /= 3;
int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3;
- FX_LPBYTE src_buf = pGlyph->GetBuffer();
+ uint8_t* src_buf = pGlyph->GetBuffer();
int src_pitch = pGlyph->GetPitch();
int start_col = left;
if (start_col < 0) {
@@ -349,8 +349,8 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
if (dest_row < 0 || dest_row >= bitmap.GetHeight()) {
continue;
}
- FX_LPBYTE src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
- FX_LPBYTE dest_scan = dest_buf + dest_row * dest_pitch + (start_col << 2);
+ uint8_t* src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
+ uint8_t* dest_scan = dest_buf + dest_row * dest_pitch + (start_col << 2);
if (bBGRStripe) {
if (x_subpixel == 0) {
for (int col = start_col; col < end_col; col ++) {
@@ -662,8 +662,8 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, const FXTEXT_CHARPOS* pChar
if (dest_row < 0 || dest_row >= bitmap.GetHeight()) {
continue;
}
- FX_LPBYTE src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
- FX_LPBYTE dest_scan = dest_buf + dest_row * dest_pitch + start_col * Bpp;
+ uint8_t* src_scan = src_buf + row * src_pitch + (start_col - left) * 3;
+ uint8_t* dest_scan = dest_buf + dest_row * dest_pitch + start_col * Bpp;
if (bBGRStripe) {
if (x_subpixel == 0) {
for (int col = start_col; col < end_col; col ++) {
@@ -1045,10 +1045,10 @@ CFX_FaceCache::~CFX_FaceCache()
}
m_SizeMap.RemoveAll();
pos = m_PathMap.GetStartPosition();
- FX_LPVOID key1;
+ void* key1;
CFX_PathData* pPath;
while (pos) {
- m_PathMap.GetNextAssoc(pos, key1, (FX_LPVOID&)pPath);
+ m_PathMap.GetNextAssoc(pos, key1, (void*&)pPath);
delete pPath;
}
if (m_pBitmap) {
@@ -1071,14 +1071,14 @@ CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(CFX_Font* pFont, const CFX_Aff
m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache);
}
CFX_GlyphBitmap* pGlyphBitmap = NULL;
- if (pSizeCache->m_GlyphMap.Lookup((FX_LPVOID)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
+ if (pSizeCache->m_GlyphMap.Lookup((void*)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
return pGlyphBitmap;
}
pGlyphBitmap = RenderGlyph(pFont, glyph_index, bFontStyle, pMatrix, dest_width, anti_alias);
if (pGlyphBitmap == NULL) {
return NULL;
}
- pSizeCache->m_GlyphMap.SetAt((FX_LPVOID)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
return pGlyphBitmap;
}
const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD glyph_index, FX_BOOL bFontStyle, const CFX_AffineMatrix* pMatrix,
@@ -1125,12 +1125,12 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD
CFX_GlyphBitmap* pGlyphBitmap;
CFX_SizeGlyphCache* pSizeCache = NULL;
if (m_SizeMap.Lookup(FaceGlyphsKey, (void*&)pSizeCache)) {
- if (pSizeCache->m_GlyphMap.Lookup((FX_LPVOID)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
+ if (pSizeCache->m_GlyphMap.Lookup((void*)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) {
return pGlyphBitmap;
}
pGlyphBitmap = RenderGlyph_Nativetext(pFont, glyph_index, pMatrix, dest_width, anti_alias);
if (pGlyphBitmap) {
- pSizeCache->m_GlyphMap.SetAt((FX_LPVOID)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
return pGlyphBitmap;
}
} else {
@@ -1138,7 +1138,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD
if (pGlyphBitmap) {
pSizeCache = new CFX_SizeGlyphCache;
m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache);
- pSizeCache->m_GlyphMap.SetAt((FX_LPVOID)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
return pGlyphBitmap;
}
}
@@ -1158,7 +1158,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD
CFX_SizeGlyphCache::~CFX_SizeGlyphCache()
{
FX_POSITION pos = m_GlyphMap.GetStartPosition();
- FX_LPVOID Key;
+ void* Key;
CFX_GlyphBitmap* pGlyphBitmap = NULL;
while(pos) {
m_GlyphMap.GetNextAssoc(pos, Key, (void*&)pGlyphBitmap);
@@ -1232,20 +1232,20 @@ static const uint8_t g_WeightPow_SHIFTJIS[WEIGHTPOW_ARRAY_SIZE] = {
55, 55, 55, 56, 56, 56, 56, 56 , 56, 57, 57, 57 , 57 , 57, 57, 57, 58, 58, 58, 58, 58,
58, 58, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60,
};
-static void _GammaAdjust(FX_LPBYTE pData, int nWid, int nHei, int src_pitch, FX_LPCBYTE gammaTable)
+static void _GammaAdjust(uint8_t* pData, int nWid, int nHei, int src_pitch, const uint8_t* gammaTable)
{
int count = nHei * src_pitch;
for(int i = 0; i < count; i++) {
pData[i] = gammaTable[pData[i]];
}
}
-static void _ContrastAdjust(FX_LPBYTE pDataIn, FX_LPBYTE pDataOut, int nWid, int nHei, int nSrcRowBytes, int nDstRowBytes)
+static void _ContrastAdjust(uint8_t* pDataIn, uint8_t* pDataOut, int nWid, int nHei, int nSrcRowBytes, int nDstRowBytes)
{
int col, row, temp;
int max = 0, min = 255;
FX_FLOAT rate;
for (row = 0; row < nHei; row ++) {
- FX_LPBYTE pRow = pDataIn + row * nSrcRowBytes;
+ uint8_t* pRow = pDataIn + row * nSrcRowBytes;
for (col = 0; col < nWid; col++) {
temp = *pRow ++;
if (temp > max) {
@@ -1266,8 +1266,8 @@ static void _ContrastAdjust(FX_LPBYTE pDataIn, FX_LPBYTE pDataOut, int nWid, int
}
rate = 255.f / temp;
for (row = 0; row < nHei; row ++) {
- FX_LPBYTE pSrcRow = pDataIn + row * nSrcRowBytes;
- FX_LPBYTE pDstRow = pDataOut + row * nDstRowBytes;
+ uint8_t* pSrcRow = pDataIn + row * nSrcRowBytes;
+ uint8_t* pDstRow = pDataOut + row * nDstRowBytes;
for (col = 0; col < nWid; col ++) {
temp = (int)((*(pSrcRow++) - min) * rate + 0.5);
if (temp > 255) {
@@ -1407,15 +1407,15 @@ FX_BOOL _OutputGlyph(void* dib, int x, int y, CFX_Font* pFont,
int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(face));
int left = FXFT_Get_Glyph_BitmapLeft(face);
int top = FXFT_Get_Glyph_BitmapTop(face);
- FX_LPCBYTE src_buf = (FX_LPCBYTE)FXFT_Get_Bitmap_Buffer(FXFT_Get_Glyph_Bitmap(face));
+ const uint8_t* src_buf = (const uint8_t*)FXFT_Get_Bitmap_Buffer(FXFT_Get_Glyph_Bitmap(face));
int src_pitch = FXFT_Get_Bitmap_Pitch(FXFT_Get_Glyph_Bitmap(face));
CFX_DIBitmap mask;
mask.Create(bmwidth, bmheight, FXDIB_8bppMask);
- FX_LPBYTE dest_buf = mask.GetBuffer();
+ uint8_t* dest_buf = mask.GetBuffer();
int dest_pitch = mask.GetPitch();
for (int row = 0; row < bmheight; row ++) {
- FX_LPCBYTE src_scan = src_buf + row * src_pitch;
- FX_LPBYTE dest_scan = dest_buf + row * dest_pitch;
+ const uint8_t* src_scan = src_buf + row * src_pitch;
+ uint8_t* dest_scan = dest_buf + row * dest_pitch;
FXSYS_memcpy32(dest_scan, src_scan, dest_pitch);
}
pDib->CompositeMask(x + left, y - top, bmwidth, bmheight, &mask, argb, 0, 0);
@@ -1483,15 +1483,15 @@ const CFX_PathData* CFX_FaceCache::LoadGlyphPath(CFX_Font* pFont, FX_DWORD glyph
return NULL;
}
CFX_PathData* pGlyphPath = NULL;
- FX_LPVOID key;
+ void* key;
if (pFont->GetSubstFont())
- key = (FX_LPVOID)(uintptr_t)(glyph_index + ((pFont->GetSubstFont()->m_Weight / 16) << 15) +
+ key = (void*)(uintptr_t)(glyph_index + ((pFont->GetSubstFont()->m_Weight / 16) << 15) +
((pFont->GetSubstFont()->m_ItalicAngle / 2) << 21) + ((dest_width / 16) << 25) +
(pFont->IsVertical() << 31));
else {
- key = (FX_LPVOID)(uintptr_t)glyph_index;
+ key = (void*)(uintptr_t)glyph_index;
}
- if (m_PathMap.Lookup(key, (FX_LPVOID&)pGlyphPath)) {
+ if (m_PathMap.Lookup(key, (void*&)pGlyphPath)) {
return pGlyphPath;
}
pGlyphPath = pFont->LoadGlyphPath(glyph_index, dest_width);
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.cpp b/core/src/fxge/skia/fx_skia_blitter_new.cpp
index 3b3bd3349c..362e8bf59f 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.cpp
+++ b/core/src/fxge/skia/fx_skia_blitter_new.cpp
@@ -73,10 +73,10 @@
blitV(x, y, height, rightAlpha);
}
/*---------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpan1bpp_0(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpan1bpp_0(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
ASSERT(!m_pDevice->IsCmykImage());
@@ -94,7 +94,7 @@
if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color)
index = i;
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
int src_alpha = m_Alpha * cover_scan / 255;
for (int col = col_start; col < col_end; col ++) {
if (src_alpha) {
@@ -106,10 +106,10 @@
dest_scan1 = dest_scan+(span_left%8+col-col_start+1)/8;
}
}
- void CFX_SkiaRenderer::CompositeSpan1bpp_4(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpan1bpp_4(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
ASSERT(!m_pDevice->IsCmykImage());
@@ -128,7 +128,7 @@
if (FXARGB_TODIB(m_pDevice->GetPalette()[i]) == m_Color)
index = i;
}
- FX_LPBYTE dest_scan1 = dest_scan;
+ uint8_t* dest_scan1 = dest_scan;
int src_alpha = m_Alpha * cover_scan / 255;
for (int col = col_start; col < col_end; col ++) {
int src_alpha1 = src_alpha * clip_scan[col] / 255;
@@ -142,10 +142,10 @@
}
}
/*-----------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanGray_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
ASSERT(!m_bRgbByteOrder);
@@ -164,10 +164,10 @@
dest_scan++;
}
}
- void CFX_SkiaRenderer::CompositeSpanGray_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
ASSERT(!m_bRgbByteOrder);
@@ -207,10 +207,10 @@
}
}
- void CFX_SkiaRenderer::CompositeSpanGray_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left;
@@ -235,10 +235,10 @@
}
}
- void CFX_SkiaRenderer::CompositeSpanGray_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanGray_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left;
@@ -295,10 +295,10 @@
}
/*--------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanARGB_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -343,10 +343,10 @@
}
}
- void CFX_SkiaRenderer::CompositeSpanARGB_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
@@ -392,10 +392,10 @@
dest_scan += 2;
}
}
- void CFX_SkiaRenderer::CompositeSpanARGB_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
clip_scan = (uint8_t*)m_pClipMask->GetScanline(span_top-clip_top) - clip_left + span_left;
@@ -507,10 +507,10 @@
#endif
}
- void CFX_SkiaRenderer::CompositeSpanARGB_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanARGB_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
@@ -557,10 +557,10 @@
}
/*-----------------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanRGB32_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -588,10 +588,10 @@
dest_scan += 2;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB32_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
ori_scan = (uint8_t*)m_pOriDevice->GetScanline(span_top) + (span_left<<2);
@@ -627,10 +627,10 @@
dest_scan += 2;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB32_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
clip_scan = (uint8_t*)m_pClipMask->GetScanline(span_top-clip_top) - clip_left + span_left;
@@ -705,10 +705,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB32_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB32_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + (span_left<<2);
@@ -784,10 +784,10 @@
#endif
}
/*-----------------------------------------------------------------------------------------------------*/
- void CFX_SkiaRenderer::CompositeSpanRGB24_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left + (span_left<<1);
int col_start = span_left < clip_left ? clip_left - span_left : 0;
@@ -818,10 +818,10 @@
dest_scan ++;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left + (span_left<<1);
@@ -859,10 +859,10 @@
dest_scan ++;
}
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
clip_scan = (uint8_t*)m_pClipMask->GetScanline(span_top-clip_top) - clip_left + span_left;
@@ -939,10 +939,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_pDevice->IsCmykImage());
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
@@ -1017,10 +1017,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
dest_extra_alpha_scan = (uint8_t*)m_pDevice->m_pAlphaMask->GetScanline(span_top)+span_left;
@@ -1106,10 +1106,10 @@
}
#endif
}
- void CFX_SkiaRenderer::CompositeSpanRGB24_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanRGB24_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
dest_scan = (uint8_t*)m_pDevice->GetScanline(span_top) + span_left+(span_left<<1);
dest_extra_alpha_scan = (uint8_t*)m_pDevice->m_pAlphaMask->GetScanline(span_top)+span_left;
@@ -1211,10 +1211,10 @@
/*-----------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Cmyka/Cmyk device.
- void CFX_SkiaRenderer::CompositeSpanCMYK(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CFX_SkiaRenderer::CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan)
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan)
{
ASSERT(!m_bRgbByteOrder);
// Cmyk(a)
@@ -1353,7 +1353,7 @@
if (pIccTransform) {
uint8_t gray;
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, &gray, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, &gray, (const uint8_t*)&color, 1);
m_Gray = gray;
} else {
if (bObjectCMYK) {
@@ -1374,31 +1374,31 @@
if (bObjectCMYK) {
m_Color = FXCMYK_TODIB(color);
if (pIccTransform)
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&m_Color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&m_Color, 1);
} else { // Object RGB
if (!pIccTransform)
return FALSE;
color = FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
}
- m_Red = ((FX_LPBYTE)&m_Color)[0];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[2];
- m_Gray = ((FX_LPBYTE)&m_Color)[3];
+ m_Red = ((uint8_t*)&m_Color)[0];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[2];
+ m_Gray = ((uint8_t*)&m_Color)[3];
return TRUE;
} else {
if (pIccTransform) {
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
- pIccModule->TranslateScanline(pIccTransform, (FX_LPBYTE)&m_Color, (FX_LPCBYTE)&color, 1);
- ((FX_LPBYTE)&m_Color)[3] = m_Alpha;
- m_Red = ((FX_LPBYTE)&m_Color)[2];
- m_Green = ((FX_LPBYTE)&m_Color)[1];
- m_Blue = ((FX_LPBYTE)&m_Color)[0];
+ pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
+ ((uint8_t*)&m_Color)[3] = m_Alpha;
+ m_Red = ((uint8_t*)&m_Color)[2];
+ m_Green = ((uint8_t*)&m_Color)[1];
+ m_Blue = ((uint8_t*)&m_Color)[0];
// Need Johnson to improvement it.
if (m_bRgbByteOrder) {
// swap
- m_Red = ((FX_LPBYTE)&m_Color)[0];
- m_Blue = ((FX_LPBYTE)&m_Color)[2];
+ m_Red = ((uint8_t*)&m_Color)[0];
+ m_Blue = ((uint8_t*)&m_Color)[2];
m_Color = FXARGB_TODIB(m_Color);
m_Color = FXARGB_TOBGRORDERDIB(m_Color);
}
@@ -1509,8 +1509,8 @@
if (dst_y < 0 || dst_y >= m_pDevice->GetHeight())
return;
- FX_LPBYTE dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
- FX_LPBYTE dest_pos = dest_scan;
+ uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
+ uint8_t* dest_pos = dest_scan;
while (1)
{
if (x >= m_dstWidth)
@@ -1546,7 +1546,7 @@
return;
if (x >= m_dstWidth)
return;
- FX_LPBYTE dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
+ uint8_t* dest_scan = m_pDevice->GetBuffer() + m_pDevice->GetPitch() * dst_y;
int col_start = x < m_Left ? 0 : x - m_Left;
int col_end = x + width;
col_end = col_end < m_dstWidth ? col_end - m_Left: m_pDevice->GetWidth();
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.h b/core/src/fxge/skia/fx_skia_blitter_new.h
index a80e56b2aa..8372ca3355 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.h
+++ b/core/src/fxge/skia/fx_skia_blitter_new.h
@@ -25,12 +25,12 @@ protected:
const CFX_ClipRgn* m_pClipRgn;
const CFX_DIBitmap* m_pClipMask;
- FX_LPBYTE m_pDestScan;
- FX_LPBYTE m_pDestExtraAlphaScan;
- FX_LPBYTE m_pOriScan;
- FX_LPBYTE m_pClipScan;
+ uint8_t* m_pDestScan;
+ uint8_t* m_pDestExtraAlphaScan;
+ uint8_t* m_pOriScan;
+ uint8_t* m_pClipScan;
- void (CFX_SkiaRenderer::*composite_span)(FX_LPBYTE,FX_LPBYTE,int,int,int,int,uint8_t,int,int,int,FX_LPBYTE,FX_LPBYTE);
+ void (CFX_SkiaRenderer::*composite_span)(uint8_t*,uint8_t*,int,int,int,int,uint8_t,int,int,int,uint8_t*,uint8_t*);
public:
//--------------------------------------------------------------------
@@ -42,166 +42,166 @@ public:
/*------------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Gray device.
- void CompositeSpan1bpp_0(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpan1bpp_0(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_1(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_1(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_4(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_4(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_5(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_5(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_8(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_8(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_9(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_9(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_12(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_12(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpan1bpp_13(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpan1bpp_13(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*--------------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Gray device.
- void CompositeSpanGray_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_11(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_11(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanGray_15(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanGray_15(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*--------------------------------------------------------------------------------------------------------*/
- void CompositeSpanARGB_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanARGB_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanARGB_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
- void CompositeSpanARGB_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanARGB_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
// ...
/*--------------------------------------------------------------------------------------------------------*/
- void CompositeSpanRGB32_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanRGB32_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB32_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB32_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB32_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB32_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB32_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB32_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*---------------------------------------------------------------------------------------------------------*/
- void CompositeSpanRGB24_2(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanRGB24_2(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_3(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_3(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_6(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_6(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_7(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_7(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_10(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_10(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_11(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_11(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_14(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_14(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
- void CompositeSpanRGB24_15(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
+ void CompositeSpanRGB24_15(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
/*----------------------------------------------------------------------------------------------------------*/
// A general alpha merge function (with clipping mask). Cmyka/Cmyk device.
- void CompositeSpanCMYK(FX_LPBYTE dest_scan, FX_LPBYTE ori_scan,int Bpp,
+ void CompositeSpanCMYK(uint8_t* dest_scan, uint8_t* ori_scan,int Bpp,
int span_left, int span_len, int span_top, uint8_t cover_scan,
- int clip_top, int clip_left, int clip_right, FX_LPBYTE clip_scan,
- FX_LPBYTE dest_extra_alpha_scan);
+ int clip_top, int clip_left, int clip_right, uint8_t* clip_scan,
+ uint8_t* dest_extra_alpha_scan);
//--------------------------------------------------------------------
diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp
index a483eca5ca..a11b92526c 100644
--- a/core/src/fxge/skia/fx_skia_device.cpp
+++ b/core/src/fxge/skia/fx_skia_device.cpp
@@ -478,19 +478,19 @@ FX_BOOL CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWO
}
FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform)
{
return m_pAggDriver->StartDIBits(pSource, bitmap_alpha, argb,
pMatrix, render_flags, handle, alpha_flag, pIccTransform);
}
-FX_BOOL CFX_SkiaDeviceDriver::ContinueDIBits(FX_LPVOID pHandle, IFX_Pause* pPause)
+FX_BOOL CFX_SkiaDeviceDriver::ContinueDIBits(void* pHandle, IFX_Pause* pPause)
{
return m_pAggDriver->ContinueDIBits(pHandle, pPause);
}
-void CFX_SkiaDeviceDriver::CancelDIBits(FX_LPVOID pHandle)
+void CFX_SkiaDeviceDriver::CancelDIBits(void* pHandle)
{
m_pAggDriver->CancelDIBits(pHandle);
}
diff --git a/core/src/fxge/skia/fx_skia_device.h b/core/src/fxge/skia/fx_skia_device.h
index 7ae019c124..582b844fb9 100644
--- a/core/src/fxge/skia/fx_skia_device.h
+++ b/core/src/fxge/skia/fx_skia_device.h
@@ -67,10 +67,10 @@ public:
int alpha_flag = 0, void* pIccTransform = NULL);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag = 0, void* pIccTransform = NULL);
- virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause);
- virtual void CancelDIBits(FX_LPVOID handle);
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
+ virtual void CancelDIBits(void* handle);
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color,
@@ -82,7 +82,7 @@ public:
int alpha_flag, void* pIccTransform, FX_BOOL bFill = TRUE);
void SetClipMask(rasterizer_scanline_aa& rasterizer);
void SetClipMask(SkPath& skPath, SkPaint* spaint);
- virtual FX_LPBYTE GetBuffer() const {return m_pAggDriver->GetBuffer();}
+ virtual uint8_t* GetBuffer() const {return m_pAggDriver->GetBuffer();}
CFX_AggDeviceDriver* m_pAggDriver;
};
diff --git a/core/src/fxge/win32/dwrite_int.h b/core/src/fxge/win32/dwrite_int.h
index d95f115fbc..4192fb74ae 100644
--- a/core/src/fxge/win32/dwrite_int.h
+++ b/core/src/fxge/win32/dwrite_int.h
@@ -40,7 +40,7 @@ public:
return m_pDWriteFactory != NULL;
}
- void* DwCreateFontFaceFromStream(FX_LPBYTE pData, FX_DWORD size, int simulation_style);
+ void* DwCreateFontFaceFromStream(uint8_t* pData, FX_DWORD size, int simulation_style);
FX_BOOL DwCreateRenderingTarget(CFX_DIBitmap* pSrc, void** renderTarget);
void DwDeleteRenderingTarget(void* renderTarget);
FX_BOOL DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, FX_RECT& stringRect, CFX_AffineMatrix* pMatrix,
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp
index d2d83dea75..effff0922f 100644
--- a/core/src/fxge/win32/fx_win32_device.cpp
+++ b/core/src/fxge/win32/fx_win32_device.cpp
@@ -23,12 +23,12 @@ public:
~CWin32FontInfo();
virtual void Release();
virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper);
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact);
- virtual void* GetFont(FX_LPCSTR face)
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact);
+ virtual void* GetFont(const FX_CHAR* face)
{
return NULL;
}
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size);
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size);
virtual void DeleteFont(void* hFont);
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name);
virtual FX_BOOL GetFontCharset(void* hFont, int& charset);
@@ -152,15 +152,15 @@ FX_BOOL CWin32FontInfo::EnumFontList(CFX_FontMapper* pMapper)
return TRUE;
}
static const struct {
- FX_LPCSTR m_pFaceName;
- FX_LPCSTR m_pVariantName;
+ const FX_CHAR* m_pFaceName;
+ const FX_CHAR* m_pVariantName;
}
VariantNames[] = {
{"DFKai-SB", "\x19\x6A\x77\x69\xD4\x9A"},
};
static const struct {
- FX_LPCSTR m_pName;
- FX_LPCSTR m_pWinName;
+ const FX_CHAR* m_pName;
+ const FX_CHAR* m_pWinName;
FX_BOOL m_bBold;
FX_BOOL m_bItalic;
}
@@ -197,8 +197,8 @@ CFX_ByteString CWin32FontInfo::FindFont(const CFX_ByteString& name)
return CFX_ByteString();
}
struct _FontNameMap {
- FX_LPCSTR m_pSubFontName;
- FX_LPCSTR m_pSrcFontName;
+ const FX_CHAR* m_pSubFontName;
+ const FX_CHAR* m_pSrcFontName;
};
const _FontNameMap g_JpFontNameMap[] = {
{"MS Mincho", "Heiseimin-W3"},
@@ -207,7 +207,7 @@ const _FontNameMap g_JpFontNameMap[] = {
extern "C" {
static int compareString(const void* key, const void* element)
{
- return FXSYS_stricmp((FX_LPCSTR)key, ((_FontNameMap*)element)->m_pSrcFontName);
+ return FXSYS_stricmp((const FX_CHAR*)key, ((_FontNameMap*)element)->m_pSrcFontName);
}
}
FX_BOOL _GetSubFontName(CFX_ByteString& name)
@@ -282,7 +282,7 @@ void CWin32FontInfo::GetJapanesePreference(CFX_ByteString& face, int weight, int
face = "MS PMincho";
}
}
-void* CWin32FontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR cstr_face, FX_BOOL& bExact)
+void* CWin32FontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
{
CFX_ByteString face = cstr_face;
int iBaseFont;
@@ -359,7 +359,7 @@ void CWin32FontInfo::DeleteFont(void* hFont)
{
::DeleteObject(hFont);
}
-FX_DWORD CWin32FontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size)
+FX_DWORD CWin32FontInfo::GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size)
{
HFONT hOldFont = (HFONT)::SelectObject(m_hDC, (HFONT)hFont);
table = FXDWORD_FROM_MSBFIRST(table);
@@ -456,14 +456,14 @@ int CGdiDeviceDriver::GetDeviceCaps(int caps_id)
}
return 0;
}
-FX_LPVOID CGdiDeviceDriver::GetClipRgn()
+void* CGdiDeviceDriver::GetClipRgn()
{
HRGN hClipRgn = CreateRectRgn(0, 0, 1, 1);
if (::GetClipRgn(m_hDC, hClipRgn) == 0) {
DeleteObject(hClipRgn);
hClipRgn = NULL;
}
- return (FX_LPVOID)hClipRgn;
+ return (void*)hClipRgn;
}
FX_BOOL CGdiDeviceDriver::GDI_SetDIBits(const CFX_DIBitmap* pBitmap1, const FX_RECT* pSrcRect, int left, int top, void* pIccTransform)
{
@@ -597,7 +597,7 @@ BOOL CGdiDeviceDriver::GetClipBox(FX_RECT* pRect)
{
return ::GetClipBox(m_hDC, (RECT*)pRect);
}
-FX_BOOL CGdiDeviceDriver::SetClipRgn(FX_LPVOID hRgn)
+FX_BOOL CGdiDeviceDriver::SetClipRgn(void* hRgn)
{
::SelectClipRgn(m_hDC, (HRGN)hRgn);
return TRUE;
@@ -927,7 +927,7 @@ FX_BOOL CGdiDeviceDriver::DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2
DeleteObject(hPen);
return TRUE;
}
-FX_BOOL CGdiDeviceDriver::DeleteDeviceRgn(FX_LPVOID pRgn)
+FX_BOOL CGdiDeviceDriver::DeleteDeviceRgn(void* pRgn)
{
DeleteObject((HGDIOBJ)pRgn);
return TRUE;
@@ -1176,8 +1176,8 @@ CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, int height, FXDIB_Format for
bmih.biHeight = -height;
bmih.biPlanes = 1;
bmih.biWidth = width;
- FX_LPBYTE pBuffer;
- m_hBitmap = CreateDIBSection(NULL, (BITMAPINFO*)&bmih, DIB_RGB_COLORS, (FX_LPVOID*)&pBuffer, NULL, 0);
+ uint8_t* pBuffer;
+ m_hBitmap = CreateDIBSection(NULL, (BITMAPINFO*)&bmih, DIB_RGB_COLORS, (void**)&pBuffer, NULL, 0);
if (m_hBitmap == NULL) {
return;
}
diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp
index 659e602e1a..a9b3662b15 100644
--- a/core/src/fxge/win32/fx_win32_dib.cpp
+++ b/core/src/fxge/win32/fx_win32_dib.cpp
@@ -68,7 +68,7 @@ CFX_DIBitmap* _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, LPVOID pData, FX_BOOL
}
FXSYS_memcpy32(pBitmap->GetBuffer(), pData, pitch * height);
if (bBottomUp) {
- FX_LPBYTE temp_buf = FX_Alloc(uint8_t, pitch);
+ uint8_t* temp_buf = FX_Alloc(uint8_t, pitch);
int top = 0, bottom = height - 1;
while (top < bottom) {
FXSYS_memcpy32(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
@@ -110,7 +110,7 @@ void GetBitmapSize(HBITMAP hBitmap, int& w, int& h)
w = bmp.bmWidth;
h = bmp.bmHeight;
}
-CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(FX_LPCWSTR filename)
+CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_WCHAR* filename)
{
CWin32Platform* pPlatform = (CWin32Platform*)CFX_GEModule::Get()->GetPlatformData();
if (pPlatform->m_GdiplusExt.IsAvailable()) {
@@ -253,7 +253,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pP
}
CFX_WindowsDIB::CFX_WindowsDIB(HDC hDC, int width, int height)
{
- Create(width, height, FXDIB_Rgb, (FX_LPBYTE)1);
+ Create(width, height, FXDIB_Rgb, (uint8_t*)1);
BITMAPINFOHEADER bmih;
FXSYS_memset32(&bmih, 0, sizeof bmih);
bmih.biSize = sizeof bmih;
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index e2951e4d07..b310bcf73f 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -128,7 +128,7 @@ CDWriteExt::~CDWriteExt()
{
Unload();
}
-LPVOID CDWriteExt::DwCreateFontFaceFromStream(FX_LPBYTE pData, FX_DWORD size, int simulation_style)
+LPVOID CDWriteExt::DwCreateFontFaceFromStream(uint8_t* pData, FX_DWORD size, int simulation_style)
{
IDWriteFactory* pDwFactory = (IDWriteFactory*)m_pDWriteFactory;
IDWriteFontFile* pDwFontFile = NULL;
@@ -433,7 +433,7 @@ STDMETHODIMP CDwGdiTextRenderer::DrawGlyphRun(
bitmap.bmWidth,
bitmap.bmHeight,
bitmap.bmBitsPixel == 24 ? FXDIB_Rgb : FXDIB_Rgb32,
- (FX_LPBYTE)bitmap.bmBits
+ (uint8_t*)bitmap.bmBits
);
dib.CompositeBitmap(
text_bbox.left,
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index 944266c1c9..863281b8e5 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -349,7 +349,7 @@ static void OutputImageMask(GpGraphics* pGraphics, BOOL bMonoDevice, const CFX_D
CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt;
int src_width = pBitmap->GetWidth(), src_height = pBitmap->GetHeight();
int src_pitch = pBitmap->GetPitch();
- FX_LPBYTE scan0 = pBitmap->GetBuffer();
+ uint8_t* scan0 = pBitmap->GetBuffer();
if (src_width == 1 && src_height == 1) {
if ((scan0[0] & 0x80) == 0) {
return;
@@ -430,7 +430,7 @@ static void OutputImage(GpGraphics* pGraphics, const CFX_DIBitmap* pBitmap, cons
return;
}
int src_pitch = pBitmap->GetPitch();
- FX_LPBYTE scan0 = pBitmap->GetBuffer() + pSrcRect->top * src_pitch + pBitmap->GetBPP() * pSrcRect->left / 8;
+ uint8_t* scan0 = pBitmap->GetBuffer() + pSrcRect->top * src_pitch + pBitmap->GetBPP() * pSrcRect->left / 8;
GpBitmap* bitmap = NULL;
switch (pBitmap->GetFormat()) {
case FXDIB_Argb:
@@ -569,7 +569,7 @@ FX_BOOL CGdiplusExt::GdipCreateFromImage(void* bitmap, void** graphics)
}
return FALSE;
}
-FX_BOOL CGdiplusExt::GdipCreateFontFamilyFromName(FX_LPCWSTR name, void* pFontCollection, void**pFamily)
+FX_BOOL CGdiplusExt::GdipCreateFontFamilyFromName(const FX_WCHAR* name, void* pFontCollection, void**pFamily)
{
CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt;
GpStatus status = CallFunc(GdipCreateFontFamilyFromName)((GDIPCONST WCHAR *)name, (GpFontCollection*)pFontCollection, (GpFontFamily**)pFamily);
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 7740fbd87a..e921d4c7a9 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -121,7 +121,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
return NULL;
}
int src_width = pSrcBitmap->GetWidth(), src_height = pSrcBitmap->GetHeight();
- FX_LPBYTE src_buf = pSrcBitmap->GetBuffer();
+ uint8_t* src_buf = pSrcBitmap->GetBuffer();
FX_DWORD src_pitch = pSrcBitmap->GetPitch();
FX_FLOAT dest_area = pDestMatrix->GetUnitArea();
FX_FLOAT area_scale = FXSYS_Div((FX_FLOAT)(src_width * src_height), dest_area);
@@ -152,12 +152,12 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
return NULL;
}
pTempBitmap->CopyPalette(pSrc->GetPalette());
- FX_LPBYTE dest_buf = pTempBitmap->GetBuffer();
+ uint8_t* dest_buf = pTempBitmap->GetBuffer();
int dest_pitch = pTempBitmap->GetPitch();
FXSYS_memset8(dest_buf, pSrc->IsAlphaMask() ? 0 : 0xff, dest_pitch * result_height);
if (pSrcBitmap->IsAlphaMask()) {
for (int dest_y = 0; dest_y < result_height; dest_y ++) {
- FX_LPBYTE dest_scan = dest_buf + dest_y * dest_pitch;
+ uint8_t* dest_scan = dest_buf + dest_y * dest_pitch;
for (int dest_x = 0; dest_x < result_width; dest_x ++) {
int src_x, src_y;
result2src_fix.Transform(dest_x, dest_y, src_x, src_y);
@@ -172,7 +172,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
}
} else {
for (int dest_y = 0; dest_y < result_height; dest_y ++) {
- FX_LPBYTE dest_scan = dest_buf + dest_y * dest_pitch;
+ uint8_t* dest_scan = dest_buf + dest_y * dest_pitch;
for (int dest_x = 0; dest_x < result_width; dest_x ++) {
int src_x, src_y;
result2src_fix.Transform(dest_x, dest_y, src_x, src_y);
@@ -192,7 +192,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
return pTempBitmap;
}
FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
if (bitmap_alpha < 255 || pSource->HasAlpha() || (pSource->IsAlphaMask() && (pSource->GetBPP() != 1 || !m_bSupportROP))) {
@@ -250,7 +250,7 @@ void CPSOutput::Init()
{
m_pBuf = FX_Alloc(FX_CHAR, 1026);
}
-void CPSOutput::OutputPS(FX_LPCSTR string, int len)
+void CPSOutput::OutputPS(const FX_CHAR* string, int len)
{
if (len < 0) {
len = (int)FXSYS_strlen(string);
@@ -393,7 +393,7 @@ FX_BOOL CPSPrinterDriver::StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD c
return m_PSRenderer.StretchDIBits(pBitmap, color, dest_left, dest_top, dest_width, dest_height, flags, alpha_flag, pIccTransform);
}
FX_BOOL CPSPrinterDriver::StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
if (blend_type != FXDIB_BLEND_NORMAL) {
diff --git a/core/src/fxge/win32/win32_int.h b/core/src/fxge/win32/win32_int.h
index a3380f3b5b..1f8f5d7995 100644
--- a/core/src/fxge/win32/win32_int.h
+++ b/core/src/fxge/win32/win32_int.h
@@ -41,7 +41,7 @@ public:
void GdipDeleteBrush(void* pBrush);
void GdipCreateMatrix(FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f, void** matrix);
void GdipDeleteMatrix(void* matrix);
- FX_BOOL GdipCreateFontFamilyFromName(FX_LPCWSTR name, void* pFontCollection, void**pFamily);
+ FX_BOOL GdipCreateFontFamilyFromName(const FX_WCHAR* name, void* pFontCollection, void**pFamily);
void GdipDeleteFontFamily(void* pFamily);
FX_BOOL GdipCreateFontFromFamily(void* pFamily, FX_FLOAT font_size, int fontstyle, int flag, void** pFont);
void* GdipCreateFontFromCollection(void* pFontCollection, FX_FLOAT font_size, int fontstyle);
@@ -105,10 +105,10 @@ protected:
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
int alpha_flag, void* pIccTransform, int blend_type);
- virtual FX_LPVOID GetClipRgn() ;
- virtual FX_BOOL SetClipRgn(FX_LPVOID pRgn) ;
+ virtual void* GetClipRgn() ;
+ virtual FX_BOOL SetClipRgn(void* pRgn) ;
virtual FX_BOOL GetClipBox(FX_RECT* pRect);
- virtual FX_BOOL DeleteDeviceRgn(FX_LPVOID pRgn);
+ virtual FX_BOOL DeleteDeviceRgn(void* pRgn);
virtual void DrawLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2);
virtual void* GetPlatformSurface()
{
@@ -140,7 +140,7 @@ protected:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type)
{
return FALSE;
@@ -161,7 +161,7 @@ protected:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type);
int m_HorzSize, m_VertSize;
FX_BOOL m_bSupportROP;
@@ -176,9 +176,9 @@ public:
delete this;
}
void Init();
- virtual void OutputPS(FX_LPCSTR string, int len);
+ virtual void OutputPS(const FX_CHAR* string, int len);
HDC m_hDC;
- FX_LPSTR m_pBuf;
+ FX_CHAR* m_pBuf;
};
class CPSPrinterDriver : public IFX_RenderDeviceDriver
{
@@ -221,7 +221,7 @@ protected:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
- const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, FX_LPVOID& handle,
+ const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform, int blend_type);
virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,